@warlock.js/seal 4.0.31 → 4.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +2 -1
- package/cjs/index.js.map +1 -1
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -1
- package/package.json +36 -48
- package/cjs/config.d.ts +0 -48
- package/cjs/config.d.ts.map +0 -1
- package/cjs/config.js +0 -42
- package/cjs/config.js.map +0 -1
- package/cjs/factory/index.d.ts +0 -3
- package/cjs/factory/index.d.ts.map +0 -1
- package/cjs/factory/validate.d.ts +0 -8
- package/cjs/factory/validate.d.ts.map +0 -1
- package/cjs/factory/validate.js +0 -21
- package/cjs/factory/validate.js.map +0 -1
- package/cjs/factory/validators.d.ts +0 -36
- package/cjs/factory/validators.d.ts.map +0 -1
- package/cjs/factory/validators.js +0 -39
- package/cjs/factory/validators.js.map +0 -1
- package/cjs/helpers/date-helpers.d.ts +0 -16
- package/cjs/helpers/date-helpers.d.ts.map +0 -1
- package/cjs/helpers/date-helpers.js +0 -20
- package/cjs/helpers/date-helpers.js.map +0 -1
- package/cjs/helpers/get-field-value.d.ts +0 -37
- package/cjs/helpers/get-field-value.d.ts.map +0 -1
- package/cjs/helpers/get-field-value.js +0 -40
- package/cjs/helpers/get-field-value.js.map +0 -1
- package/cjs/helpers/index.d.ts +0 -5
- package/cjs/helpers/index.d.ts.map +0 -1
- package/cjs/helpers/path-helpers.d.ts +0 -5
- package/cjs/helpers/path-helpers.d.ts.map +0 -1
- package/cjs/helpers/path-helpers.js +0 -8
- package/cjs/helpers/path-helpers.js.map +0 -1
- package/cjs/helpers/validation-helpers.d.ts +0 -4
- package/cjs/helpers/validation-helpers.d.ts.map +0 -1
- package/cjs/helpers/validation-helpers.js +0 -48
- package/cjs/helpers/validation-helpers.js.map +0 -1
- package/cjs/index.d.ts +0 -29
- package/cjs/index.d.ts.map +0 -1
- package/cjs/mutators/array-mutators.d.ts +0 -12
- package/cjs/mutators/array-mutators.d.ts.map +0 -1
- package/cjs/mutators/array-mutators.js +0 -37
- package/cjs/mutators/array-mutators.js.map +0 -1
- package/cjs/mutators/date-mutators.d.ts +0 -39
- package/cjs/mutators/date-mutators.d.ts.map +0 -1
- package/cjs/mutators/date-mutators.js +0 -120
- package/cjs/mutators/date-mutators.js.map +0 -1
- package/cjs/mutators/index.d.ts +0 -7
- package/cjs/mutators/index.d.ts.map +0 -1
- package/cjs/mutators/number-mutators.d.ts +0 -9
- package/cjs/mutators/number-mutators.d.ts.map +0 -1
- package/cjs/mutators/number-mutators.js +0 -23
- package/cjs/mutators/number-mutators.js.map +0 -1
- package/cjs/mutators/object-mutators.d.ts +0 -8
- package/cjs/mutators/object-mutators.d.ts.map +0 -1
- package/cjs/mutators/object-mutators.js +0 -50
- package/cjs/mutators/object-mutators.js.map +0 -1
- package/cjs/mutators/scalar-mutators.d.ts +0 -3
- package/cjs/mutators/scalar-mutators.d.ts.map +0 -1
- package/cjs/mutators/scalar-mutators.js +0 -6
- package/cjs/mutators/scalar-mutators.js.map +0 -1
- package/cjs/mutators/string-mutators.d.ts +0 -72
- package/cjs/mutators/string-mutators.d.ts.map +0 -1
- package/cjs/mutators/string-mutators.js +0 -193
- package/cjs/mutators/string-mutators.js.map +0 -1
- package/cjs/plugins/index.d.ts +0 -7
- package/cjs/plugins/index.d.ts.map +0 -1
- package/cjs/plugins/plugin-system.d.ts +0 -71
- package/cjs/plugins/plugin-system.d.ts.map +0 -1
- package/cjs/plugins/plugin-system.js +0 -68
- package/cjs/plugins/plugin-system.js.map +0 -1
- package/cjs/rules/array/array-rules.d.ts +0 -12
- package/cjs/rules/array/array-rules.d.ts.map +0 -1
- package/cjs/rules/array/array-rules.js +0 -44
- package/cjs/rules/array/array-rules.js.map +0 -1
- package/cjs/rules/array/index.d.ts +0 -2
- package/cjs/rules/array/index.d.ts.map +0 -1
- package/cjs/rules/color/color-rules.d.ts +0 -30
- package/cjs/rules/color/color-rules.d.ts.map +0 -1
- package/cjs/rules/color/color-rules.js +0 -120
- package/cjs/rules/color/color-rules.js.map +0 -1
- package/cjs/rules/color/index.d.ts +0 -2
- package/cjs/rules/color/index.d.ts.map +0 -1
- package/cjs/rules/common/enum.d.ts +0 -26
- package/cjs/rules/common/enum.d.ts.map +0 -1
- package/cjs/rules/common/enum.js +0 -55
- package/cjs/rules/common/enum.js.map +0 -1
- package/cjs/rules/common/equals-field-rules.d.ts +0 -18
- package/cjs/rules/common/equals-field-rules.d.ts.map +0 -1
- package/cjs/rules/common/equals-field-rules.js +0 -38
- package/cjs/rules/common/equals-field-rules.js.map +0 -1
- package/cjs/rules/common/index.d.ts +0 -5
- package/cjs/rules/common/index.d.ts.map +0 -1
- package/cjs/rules/common/type-rules.d.ts +0 -34
- package/cjs/rules/common/type-rules.d.ts.map +0 -1
- package/cjs/rules/common/type-rules.js +0 -104
- package/cjs/rules/common/type-rules.js.map +0 -1
- package/cjs/rules/common/unknown-key.d.ts +0 -9
- package/cjs/rules/common/unknown-key.d.ts.map +0 -1
- package/cjs/rules/common/unknown-key.js +0 -20
- package/cjs/rules/common/unknown-key.js.map +0 -1
- package/cjs/rules/conditional/forbidden-if-rules.d.ts +0 -54
- package/cjs/rules/conditional/forbidden-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/forbidden-if-rules.js +0 -112
- package/cjs/rules/conditional/forbidden-if-rules.js.map +0 -1
- package/cjs/rules/conditional/index.d.ts +0 -10
- package/cjs/rules/conditional/index.d.ts.map +0 -1
- package/cjs/rules/conditional/present-if-rules.d.ts +0 -45
- package/cjs/rules/conditional/present-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-if-rules.js +0 -98
- package/cjs/rules/conditional/present-if-rules.js.map +0 -1
- package/cjs/rules/conditional/present-unless-rules.d.ts +0 -11
- package/cjs/rules/conditional/present-unless-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-unless-rules.js +0 -20
- package/cjs/rules/conditional/present-unless-rules.js.map +0 -1
- package/cjs/rules/conditional/present-with-rules.d.ts +0 -26
- package/cjs/rules/conditional/present-with-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-with-rules.js +0 -63
- package/cjs/rules/conditional/present-with-rules.js.map +0 -1
- package/cjs/rules/conditional/present-without-rules.d.ts +0 -26
- package/cjs/rules/conditional/present-without-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/present-without-rules.js +0 -63
- package/cjs/rules/conditional/present-without-rules.js.map +0 -1
- package/cjs/rules/conditional/required-if-rules.d.ts +0 -45
- package/cjs/rules/conditional/required-if-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-if-rules.js +0 -98
- package/cjs/rules/conditional/required-if-rules.js.map +0 -1
- package/cjs/rules/conditional/required-unless-rules.d.ts +0 -11
- package/cjs/rules/conditional/required-unless-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-unless-rules.js +0 -20
- package/cjs/rules/conditional/required-unless-rules.js.map +0 -1
- package/cjs/rules/conditional/required-with-rules.d.ts +0 -26
- package/cjs/rules/conditional/required-with-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-with-rules.js +0 -63
- package/cjs/rules/conditional/required-with-rules.js.map +0 -1
- package/cjs/rules/conditional/required-without-rules.d.ts +0 -26
- package/cjs/rules/conditional/required-without-rules.d.ts.map +0 -1
- package/cjs/rules/conditional/required-without-rules.js +0 -63
- package/cjs/rules/conditional/required-without-rules.js.map +0 -1
- package/cjs/rules/core/equal.d.ts +0 -8
- package/cjs/rules/core/equal.d.ts.map +0 -1
- package/cjs/rules/core/equal.js +0 -13
- package/cjs/rules/core/equal.js.map +0 -1
- package/cjs/rules/core/forbidden.d.ts +0 -6
- package/cjs/rules/core/forbidden.d.ts.map +0 -1
- package/cjs/rules/core/forbidden.js +0 -13
- package/cjs/rules/core/forbidden.js.map +0 -1
- package/cjs/rules/core/index.d.ts +0 -6
- package/cjs/rules/core/index.d.ts.map +0 -1
- package/cjs/rules/core/required.d.ts +0 -11
- package/cjs/rules/core/required.d.ts.map +0 -1
- package/cjs/rules/core/required.js +0 -31
- package/cjs/rules/core/required.js.map +0 -1
- package/cjs/rules/core/union.d.ts +0 -9
- package/cjs/rules/core/union.d.ts.map +0 -1
- package/cjs/rules/core/union.js +0 -40
- package/cjs/rules/core/union.js.map +0 -1
- package/cjs/rules/core/when.d.ts +0 -6
- package/cjs/rules/core/when.d.ts.map +0 -1
- package/cjs/rules/core/when.js +0 -40
- package/cjs/rules/core/when.js.map +0 -1
- package/cjs/rules/date/date-comparison-rules.d.ts +0 -25
- package/cjs/rules/date/date-comparison-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-comparison-rules.js +0 -78
- package/cjs/rules/date/date-comparison-rules.js.map +0 -1
- package/cjs/rules/date/date-day-rules.d.ts +0 -21
- package/cjs/rules/date/date-day-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-day-rules.js +0 -65
- package/cjs/rules/date/date-day-rules.js.map +0 -1
- package/cjs/rules/date/date-field-comparison-rules.d.ts +0 -28
- package/cjs/rules/date/date-field-comparison-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-field-comparison-rules.js +0 -90
- package/cjs/rules/date/date-field-comparison-rules.js.map +0 -1
- package/cjs/rules/date/date-period-rules.d.ts +0 -108
- package/cjs/rules/date/date-period-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-period-rules.js +0 -566
- package/cjs/rules/date/date-period-rules.js.map +0 -1
- package/cjs/rules/date/date-relative-rules.d.ts +0 -20
- package/cjs/rules/date/date-relative-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-relative-rules.js +0 -57
- package/cjs/rules/date/date-relative-rules.js.map +0 -1
- package/cjs/rules/date/date-special-rules.d.ts +0 -20
- package/cjs/rules/date/date-special-rules.d.ts.map +0 -1
- package/cjs/rules/date/date-special-rules.js +0 -72
- package/cjs/rules/date/date-special-rules.js.map +0 -1
- package/cjs/rules/date/date.d.ts +0 -93
- package/cjs/rules/date/date.d.ts.map +0 -1
- package/cjs/rules/date/date.js +0 -279
- package/cjs/rules/date/date.js.map +0 -1
- package/cjs/rules/date/index.d.ts +0 -8
- package/cjs/rules/date/index.d.ts.map +0 -1
- package/cjs/rules/file/dimensions.d.ts +0 -26
- package/cjs/rules/file/dimensions.d.ts.map +0 -1
- package/cjs/rules/file/dimensions.js +0 -56
- package/cjs/rules/file/dimensions.js.map +0 -1
- package/cjs/rules/file/file-size.d.ts +0 -14
- package/cjs/rules/file/file-size.d.ts.map +0 -1
- package/cjs/rules/file/file-size.js +0 -26
- package/cjs/rules/file/file-size.js.map +0 -1
- package/cjs/rules/file/index.d.ts +0 -11
- package/cjs/rules/file/index.d.ts.map +0 -1
- package/cjs/rules/index.d.ts +0 -19
- package/cjs/rules/index.d.ts.map +0 -1
- package/cjs/rules/length/index.d.ts +0 -2
- package/cjs/rules/length/index.d.ts.map +0 -1
- package/cjs/rules/length/length-rules.d.ts +0 -49
- package/cjs/rules/length/length-rules.d.ts.map +0 -1
- package/cjs/rules/length/length-rules.js +0 -116
- package/cjs/rules/length/length-rules.js.map +0 -1
- package/cjs/rules/number/index.d.ts +0 -2
- package/cjs/rules/number/index.d.ts.map +0 -1
- package/cjs/rules/number/number-rules.d.ts +0 -65
- package/cjs/rules/number/number-rules.d.ts.map +0 -1
- package/cjs/rules/number/number-rules.js +0 -234
- package/cjs/rules/number/number-rules.js.map +0 -1
- package/cjs/rules/scalar/accepted-rule.d.ts +0 -39
- package/cjs/rules/scalar/accepted-rule.d.ts.map +0 -1
- package/cjs/rules/scalar/accepted-rule.js +0 -110
- package/cjs/rules/scalar/accepted-rule.js.map +0 -1
- package/cjs/rules/scalar/declined-rule.d.ts +0 -39
- package/cjs/rules/scalar/declined-rule.d.ts.map +0 -1
- package/cjs/rules/scalar/declined-rule.js +0 -110
- package/cjs/rules/scalar/declined-rule.js.map +0 -1
- package/cjs/rules/scalar/index.d.ts +0 -3
- package/cjs/rules/scalar/index.d.ts.map +0 -1
- package/cjs/rules/string/alpha.d.ts +0 -14
- package/cjs/rules/string/alpha.d.ts.map +0 -1
- package/cjs/rules/string/alpha.js +0 -39
- package/cjs/rules/string/alpha.js.map +0 -1
- package/cjs/rules/string/credit-card.d.ts +0 -6
- package/cjs/rules/string/credit-card.d.ts.map +0 -1
- package/cjs/rules/string/credit-card.js +0 -31
- package/cjs/rules/string/credit-card.js.map +0 -1
- package/cjs/rules/string/email.d.ts +0 -6
- package/cjs/rules/string/email.d.ts.map +0 -1
- package/cjs/rules/string/email.js +0 -13
- package/cjs/rules/string/email.js.map +0 -1
- package/cjs/rules/string/index.d.ts +0 -17
- package/cjs/rules/string/index.d.ts.map +0 -1
- package/cjs/rules/string/ip.d.ts +0 -14
- package/cjs/rules/string/ip.d.ts.map +0 -1
- package/cjs/rules/string/ip.js +0 -39
- package/cjs/rules/string/ip.js.map +0 -1
- package/cjs/rules/string/matches.d.ts +0 -8
- package/cjs/rules/string/matches.d.ts.map +0 -1
- package/cjs/rules/string/matches.js +0 -14
- package/cjs/rules/string/matches.js.map +0 -1
- package/cjs/rules/string/pattern.d.ts +0 -8
- package/cjs/rules/string/pattern.d.ts.map +0 -1
- package/cjs/rules/string/pattern.js +0 -13
- package/cjs/rules/string/pattern.js.map +0 -1
- package/cjs/rules/string/string-comparison.d.ts +0 -26
- package/cjs/rules/string/string-comparison.d.ts.map +0 -1
- package/cjs/rules/string/string-comparison.js +0 -52
- package/cjs/rules/string/string-comparison.js.map +0 -1
- package/cjs/rules/string/strong-password-rule.d.ts +0 -14
- package/cjs/rules/string/strong-password-rule.d.ts.map +0 -1
- package/cjs/rules/string/strong-password-rule.js +0 -38
- package/cjs/rules/string/strong-password-rule.js.map +0 -1
- package/cjs/rules/string/url.d.ts +0 -6
- package/cjs/rules/string/url.d.ts.map +0 -1
- package/cjs/rules/string/url.js +0 -16
- package/cjs/rules/string/url.js.map +0 -1
- package/cjs/rules/string/without-whitespace.d.ts +0 -6
- package/cjs/rules/string/without-whitespace.d.ts.map +0 -1
- package/cjs/rules/string/without-whitespace.js +0 -13
- package/cjs/rules/string/without-whitespace.js.map +0 -1
- package/cjs/types/conditional-types.d.ts +0 -15
- package/cjs/types/conditional-types.d.ts.map +0 -1
- package/cjs/types/context-types.d.ts +0 -44
- package/cjs/types/context-types.d.ts.map +0 -1
- package/cjs/types/data-transformer-types.d.ts +0 -25
- package/cjs/types/data-transformer-types.d.ts.map +0 -1
- package/cjs/types/date-types.d.ts +0 -9
- package/cjs/types/date-types.d.ts.map +0 -1
- package/cjs/types/date-types.js +0 -12
- package/cjs/types/date-types.js.map +0 -1
- package/cjs/types/index.d.ts +0 -10
- package/cjs/types/index.d.ts.map +0 -1
- package/cjs/types/inference-types.d.ts +0 -29
- package/cjs/types/inference-types.d.ts.map +0 -1
- package/cjs/types/mutator-types.d.ts +0 -27
- package/cjs/types/mutator-types.d.ts.map +0 -1
- package/cjs/types/result-types.d.ts +0 -19
- package/cjs/types/result-types.d.ts.map +0 -1
- package/cjs/types/rule-types.d.ts +0 -54
- package/cjs/types/rule-types.d.ts.map +0 -1
- package/cjs/types/schema-types.d.ts +0 -6
- package/cjs/types/schema-types.d.ts.map +0 -1
- package/cjs/validators/any-validator.d.ts +0 -7
- package/cjs/validators/any-validator.d.ts.map +0 -1
- package/cjs/validators/any-validator.js +0 -5
- package/cjs/validators/any-validator.js.map +0 -1
- package/cjs/validators/array-validator.d.ts +0 -59
- package/cjs/validators/array-validator.d.ts.map +0 -1
- package/cjs/validators/array-validator.js +0 -134
- package/cjs/validators/array-validator.js.map +0 -1
- package/cjs/validators/base-validator.d.ts +0 -609
- package/cjs/validators/base-validator.d.ts.map +0 -1
- package/cjs/validators/base-validator.js +0 -1154
- package/cjs/validators/base-validator.js.map +0 -1
- package/cjs/validators/boolean-validator.d.ts +0 -47
- package/cjs/validators/boolean-validator.d.ts.map +0 -1
- package/cjs/validators/boolean-validator.js +0 -54
- package/cjs/validators/boolean-validator.js.map +0 -1
- package/cjs/validators/date-validator.d.ts +0 -307
- package/cjs/validators/date-validator.d.ts.map +0 -1
- package/cjs/validators/date-validator.js +0 -645
- package/cjs/validators/date-validator.js.map +0 -1
- package/cjs/validators/float-validator.d.ts +0 -8
- package/cjs/validators/float-validator.d.ts.map +0 -1
- package/cjs/validators/float-validator.js +0 -9
- package/cjs/validators/float-validator.js.map +0 -1
- package/cjs/validators/index.d.ts +0 -24
- package/cjs/validators/index.d.ts.map +0 -1
- package/cjs/validators/int-validator.d.ts +0 -8
- package/cjs/validators/int-validator.d.ts.map +0 -1
- package/cjs/validators/int-validator.js +0 -9
- package/cjs/validators/int-validator.js.map +0 -1
- package/cjs/validators/number-validator.d.ts +0 -113
- package/cjs/validators/number-validator.d.ts.map +0 -1
- package/cjs/validators/number-validator.js +0 -192
- package/cjs/validators/number-validator.js.map +0 -1
- package/cjs/validators/numeric-validator.d.ts +0 -15
- package/cjs/validators/numeric-validator.d.ts.map +0 -1
- package/cjs/validators/numeric-validator.js +0 -18
- package/cjs/validators/numeric-validator.js.map +0 -1
- package/cjs/validators/object-validator.d.ts +0 -178
- package/cjs/validators/object-validator.d.ts.map +0 -1
- package/cjs/validators/object-validator.js +0 -356
- package/cjs/validators/object-validator.js.map +0 -1
- package/cjs/validators/record-validator.d.ts +0 -33
- package/cjs/validators/record-validator.d.ts.map +0 -1
- package/cjs/validators/record-validator.js +0 -70
- package/cjs/validators/record-validator.js.map +0 -1
- package/cjs/validators/scalar-validator.d.ts +0 -82
- package/cjs/validators/scalar-validator.d.ts.map +0 -1
- package/cjs/validators/scalar-validator.js +0 -160
- package/cjs/validators/scalar-validator.js.map +0 -1
- package/cjs/validators/string-validator.d.ts +0 -191
- package/cjs/validators/string-validator.d.ts.map +0 -1
- package/cjs/validators/string-validator.js +0 -410
- package/cjs/validators/string-validator.js.map +0 -1
- package/cjs/validators/tuple-validator.d.ts +0 -34
- package/cjs/validators/tuple-validator.d.ts.map +0 -1
- package/cjs/validators/tuple-validator.js +0 -79
- package/cjs/validators/tuple-validator.js.map +0 -1
- package/cjs/validators/union-validator.d.ts +0 -42
- package/cjs/validators/union-validator.d.ts.map +0 -1
- package/cjs/validators/union-validator.js +0 -44
- package/cjs/validators/union-validator.js.map +0 -1
- package/esm/config.d.ts +0 -48
- package/esm/config.d.ts.map +0 -1
- package/esm/config.js +0 -42
- package/esm/config.js.map +0 -1
- package/esm/factory/index.d.ts +0 -3
- package/esm/factory/index.d.ts.map +0 -1
- package/esm/factory/validate.d.ts +0 -8
- package/esm/factory/validate.d.ts.map +0 -1
- package/esm/factory/validate.js +0 -21
- package/esm/factory/validate.js.map +0 -1
- package/esm/factory/validators.d.ts +0 -36
- package/esm/factory/validators.d.ts.map +0 -1
- package/esm/factory/validators.js +0 -39
- package/esm/factory/validators.js.map +0 -1
- package/esm/helpers/date-helpers.d.ts +0 -16
- package/esm/helpers/date-helpers.d.ts.map +0 -1
- package/esm/helpers/date-helpers.js +0 -20
- package/esm/helpers/date-helpers.js.map +0 -1
- package/esm/helpers/get-field-value.d.ts +0 -37
- package/esm/helpers/get-field-value.d.ts.map +0 -1
- package/esm/helpers/get-field-value.js +0 -40
- package/esm/helpers/get-field-value.js.map +0 -1
- package/esm/helpers/index.d.ts +0 -5
- package/esm/helpers/index.d.ts.map +0 -1
- package/esm/helpers/path-helpers.d.ts +0 -5
- package/esm/helpers/path-helpers.d.ts.map +0 -1
- package/esm/helpers/path-helpers.js +0 -8
- package/esm/helpers/path-helpers.js.map +0 -1
- package/esm/helpers/validation-helpers.d.ts +0 -4
- package/esm/helpers/validation-helpers.d.ts.map +0 -1
- package/esm/helpers/validation-helpers.js +0 -48
- package/esm/helpers/validation-helpers.js.map +0 -1
- package/esm/index.d.ts +0 -29
- package/esm/index.d.ts.map +0 -1
- package/esm/mutators/array-mutators.d.ts +0 -12
- package/esm/mutators/array-mutators.d.ts.map +0 -1
- package/esm/mutators/array-mutators.js +0 -37
- package/esm/mutators/array-mutators.js.map +0 -1
- package/esm/mutators/date-mutators.d.ts +0 -39
- package/esm/mutators/date-mutators.d.ts.map +0 -1
- package/esm/mutators/date-mutators.js +0 -120
- package/esm/mutators/date-mutators.js.map +0 -1
- package/esm/mutators/index.d.ts +0 -7
- package/esm/mutators/index.d.ts.map +0 -1
- package/esm/mutators/number-mutators.d.ts +0 -9
- package/esm/mutators/number-mutators.d.ts.map +0 -1
- package/esm/mutators/number-mutators.js +0 -23
- package/esm/mutators/number-mutators.js.map +0 -1
- package/esm/mutators/object-mutators.d.ts +0 -8
- package/esm/mutators/object-mutators.d.ts.map +0 -1
- package/esm/mutators/object-mutators.js +0 -50
- package/esm/mutators/object-mutators.js.map +0 -1
- package/esm/mutators/scalar-mutators.d.ts +0 -3
- package/esm/mutators/scalar-mutators.d.ts.map +0 -1
- package/esm/mutators/scalar-mutators.js +0 -6
- package/esm/mutators/scalar-mutators.js.map +0 -1
- package/esm/mutators/string-mutators.d.ts +0 -72
- package/esm/mutators/string-mutators.d.ts.map +0 -1
- package/esm/mutators/string-mutators.js +0 -193
- package/esm/mutators/string-mutators.js.map +0 -1
- package/esm/plugins/index.d.ts +0 -7
- package/esm/plugins/index.d.ts.map +0 -1
- package/esm/plugins/plugin-system.d.ts +0 -71
- package/esm/plugins/plugin-system.d.ts.map +0 -1
- package/esm/plugins/plugin-system.js +0 -68
- package/esm/plugins/plugin-system.js.map +0 -1
- package/esm/rules/array/array-rules.d.ts +0 -12
- package/esm/rules/array/array-rules.d.ts.map +0 -1
- package/esm/rules/array/array-rules.js +0 -44
- package/esm/rules/array/array-rules.js.map +0 -1
- package/esm/rules/array/index.d.ts +0 -2
- package/esm/rules/array/index.d.ts.map +0 -1
- package/esm/rules/color/color-rules.d.ts +0 -30
- package/esm/rules/color/color-rules.d.ts.map +0 -1
- package/esm/rules/color/color-rules.js +0 -120
- package/esm/rules/color/color-rules.js.map +0 -1
- package/esm/rules/color/index.d.ts +0 -2
- package/esm/rules/color/index.d.ts.map +0 -1
- package/esm/rules/common/enum.d.ts +0 -26
- package/esm/rules/common/enum.d.ts.map +0 -1
- package/esm/rules/common/enum.js +0 -55
- package/esm/rules/common/enum.js.map +0 -1
- package/esm/rules/common/equals-field-rules.d.ts +0 -18
- package/esm/rules/common/equals-field-rules.d.ts.map +0 -1
- package/esm/rules/common/equals-field-rules.js +0 -38
- package/esm/rules/common/equals-field-rules.js.map +0 -1
- package/esm/rules/common/index.d.ts +0 -5
- package/esm/rules/common/index.d.ts.map +0 -1
- package/esm/rules/common/type-rules.d.ts +0 -34
- package/esm/rules/common/type-rules.d.ts.map +0 -1
- package/esm/rules/common/type-rules.js +0 -104
- package/esm/rules/common/type-rules.js.map +0 -1
- package/esm/rules/common/unknown-key.d.ts +0 -9
- package/esm/rules/common/unknown-key.d.ts.map +0 -1
- package/esm/rules/common/unknown-key.js +0 -20
- package/esm/rules/common/unknown-key.js.map +0 -1
- package/esm/rules/conditional/forbidden-if-rules.d.ts +0 -54
- package/esm/rules/conditional/forbidden-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/forbidden-if-rules.js +0 -112
- package/esm/rules/conditional/forbidden-if-rules.js.map +0 -1
- package/esm/rules/conditional/index.d.ts +0 -10
- package/esm/rules/conditional/index.d.ts.map +0 -1
- package/esm/rules/conditional/present-if-rules.d.ts +0 -45
- package/esm/rules/conditional/present-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-if-rules.js +0 -98
- package/esm/rules/conditional/present-if-rules.js.map +0 -1
- package/esm/rules/conditional/present-unless-rules.d.ts +0 -11
- package/esm/rules/conditional/present-unless-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-unless-rules.js +0 -20
- package/esm/rules/conditional/present-unless-rules.js.map +0 -1
- package/esm/rules/conditional/present-with-rules.d.ts +0 -26
- package/esm/rules/conditional/present-with-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-with-rules.js +0 -63
- package/esm/rules/conditional/present-with-rules.js.map +0 -1
- package/esm/rules/conditional/present-without-rules.d.ts +0 -26
- package/esm/rules/conditional/present-without-rules.d.ts.map +0 -1
- package/esm/rules/conditional/present-without-rules.js +0 -63
- package/esm/rules/conditional/present-without-rules.js.map +0 -1
- package/esm/rules/conditional/required-if-rules.d.ts +0 -45
- package/esm/rules/conditional/required-if-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-if-rules.js +0 -98
- package/esm/rules/conditional/required-if-rules.js.map +0 -1
- package/esm/rules/conditional/required-unless-rules.d.ts +0 -11
- package/esm/rules/conditional/required-unless-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-unless-rules.js +0 -20
- package/esm/rules/conditional/required-unless-rules.js.map +0 -1
- package/esm/rules/conditional/required-with-rules.d.ts +0 -26
- package/esm/rules/conditional/required-with-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-with-rules.js +0 -63
- package/esm/rules/conditional/required-with-rules.js.map +0 -1
- package/esm/rules/conditional/required-without-rules.d.ts +0 -26
- package/esm/rules/conditional/required-without-rules.d.ts.map +0 -1
- package/esm/rules/conditional/required-without-rules.js +0 -63
- package/esm/rules/conditional/required-without-rules.js.map +0 -1
- package/esm/rules/core/equal.d.ts +0 -8
- package/esm/rules/core/equal.d.ts.map +0 -1
- package/esm/rules/core/equal.js +0 -13
- package/esm/rules/core/equal.js.map +0 -1
- package/esm/rules/core/forbidden.d.ts +0 -6
- package/esm/rules/core/forbidden.d.ts.map +0 -1
- package/esm/rules/core/forbidden.js +0 -13
- package/esm/rules/core/forbidden.js.map +0 -1
- package/esm/rules/core/index.d.ts +0 -6
- package/esm/rules/core/index.d.ts.map +0 -1
- package/esm/rules/core/required.d.ts +0 -11
- package/esm/rules/core/required.d.ts.map +0 -1
- package/esm/rules/core/required.js +0 -31
- package/esm/rules/core/required.js.map +0 -1
- package/esm/rules/core/union.d.ts +0 -9
- package/esm/rules/core/union.d.ts.map +0 -1
- package/esm/rules/core/union.js +0 -40
- package/esm/rules/core/union.js.map +0 -1
- package/esm/rules/core/when.d.ts +0 -6
- package/esm/rules/core/when.d.ts.map +0 -1
- package/esm/rules/core/when.js +0 -40
- package/esm/rules/core/when.js.map +0 -1
- package/esm/rules/date/date-comparison-rules.d.ts +0 -25
- package/esm/rules/date/date-comparison-rules.d.ts.map +0 -1
- package/esm/rules/date/date-comparison-rules.js +0 -78
- package/esm/rules/date/date-comparison-rules.js.map +0 -1
- package/esm/rules/date/date-day-rules.d.ts +0 -21
- package/esm/rules/date/date-day-rules.d.ts.map +0 -1
- package/esm/rules/date/date-day-rules.js +0 -65
- package/esm/rules/date/date-day-rules.js.map +0 -1
- package/esm/rules/date/date-field-comparison-rules.d.ts +0 -28
- package/esm/rules/date/date-field-comparison-rules.d.ts.map +0 -1
- package/esm/rules/date/date-field-comparison-rules.js +0 -90
- package/esm/rules/date/date-field-comparison-rules.js.map +0 -1
- package/esm/rules/date/date-period-rules.d.ts +0 -108
- package/esm/rules/date/date-period-rules.d.ts.map +0 -1
- package/esm/rules/date/date-period-rules.js +0 -566
- package/esm/rules/date/date-period-rules.js.map +0 -1
- package/esm/rules/date/date-relative-rules.d.ts +0 -20
- package/esm/rules/date/date-relative-rules.d.ts.map +0 -1
- package/esm/rules/date/date-relative-rules.js +0 -57
- package/esm/rules/date/date-relative-rules.js.map +0 -1
- package/esm/rules/date/date-special-rules.d.ts +0 -20
- package/esm/rules/date/date-special-rules.d.ts.map +0 -1
- package/esm/rules/date/date-special-rules.js +0 -72
- package/esm/rules/date/date-special-rules.js.map +0 -1
- package/esm/rules/date/date.d.ts +0 -93
- package/esm/rules/date/date.d.ts.map +0 -1
- package/esm/rules/date/date.js +0 -279
- package/esm/rules/date/date.js.map +0 -1
- package/esm/rules/date/index.d.ts +0 -8
- package/esm/rules/date/index.d.ts.map +0 -1
- package/esm/rules/file/dimensions.d.ts +0 -26
- package/esm/rules/file/dimensions.d.ts.map +0 -1
- package/esm/rules/file/dimensions.js +0 -56
- package/esm/rules/file/dimensions.js.map +0 -1
- package/esm/rules/file/file-size.d.ts +0 -14
- package/esm/rules/file/file-size.d.ts.map +0 -1
- package/esm/rules/file/file-size.js +0 -26
- package/esm/rules/file/file-size.js.map +0 -1
- package/esm/rules/file/index.d.ts +0 -11
- package/esm/rules/file/index.d.ts.map +0 -1
- package/esm/rules/index.d.ts +0 -19
- package/esm/rules/index.d.ts.map +0 -1
- package/esm/rules/length/index.d.ts +0 -2
- package/esm/rules/length/index.d.ts.map +0 -1
- package/esm/rules/length/length-rules.d.ts +0 -49
- package/esm/rules/length/length-rules.d.ts.map +0 -1
- package/esm/rules/length/length-rules.js +0 -116
- package/esm/rules/length/length-rules.js.map +0 -1
- package/esm/rules/number/index.d.ts +0 -2
- package/esm/rules/number/index.d.ts.map +0 -1
- package/esm/rules/number/number-rules.d.ts +0 -65
- package/esm/rules/number/number-rules.d.ts.map +0 -1
- package/esm/rules/number/number-rules.js +0 -234
- package/esm/rules/number/number-rules.js.map +0 -1
- package/esm/rules/scalar/accepted-rule.d.ts +0 -39
- package/esm/rules/scalar/accepted-rule.d.ts.map +0 -1
- package/esm/rules/scalar/accepted-rule.js +0 -110
- package/esm/rules/scalar/accepted-rule.js.map +0 -1
- package/esm/rules/scalar/declined-rule.d.ts +0 -39
- package/esm/rules/scalar/declined-rule.d.ts.map +0 -1
- package/esm/rules/scalar/declined-rule.js +0 -110
- package/esm/rules/scalar/declined-rule.js.map +0 -1
- package/esm/rules/scalar/index.d.ts +0 -3
- package/esm/rules/scalar/index.d.ts.map +0 -1
- package/esm/rules/string/alpha.d.ts +0 -14
- package/esm/rules/string/alpha.d.ts.map +0 -1
- package/esm/rules/string/alpha.js +0 -39
- package/esm/rules/string/alpha.js.map +0 -1
- package/esm/rules/string/credit-card.d.ts +0 -6
- package/esm/rules/string/credit-card.d.ts.map +0 -1
- package/esm/rules/string/credit-card.js +0 -31
- package/esm/rules/string/credit-card.js.map +0 -1
- package/esm/rules/string/email.d.ts +0 -6
- package/esm/rules/string/email.d.ts.map +0 -1
- package/esm/rules/string/email.js +0 -13
- package/esm/rules/string/email.js.map +0 -1
- package/esm/rules/string/index.d.ts +0 -17
- package/esm/rules/string/index.d.ts.map +0 -1
- package/esm/rules/string/ip.d.ts +0 -14
- package/esm/rules/string/ip.d.ts.map +0 -1
- package/esm/rules/string/ip.js +0 -39
- package/esm/rules/string/ip.js.map +0 -1
- package/esm/rules/string/matches.d.ts +0 -8
- package/esm/rules/string/matches.d.ts.map +0 -1
- package/esm/rules/string/matches.js +0 -14
- package/esm/rules/string/matches.js.map +0 -1
- package/esm/rules/string/pattern.d.ts +0 -8
- package/esm/rules/string/pattern.d.ts.map +0 -1
- package/esm/rules/string/pattern.js +0 -13
- package/esm/rules/string/pattern.js.map +0 -1
- package/esm/rules/string/string-comparison.d.ts +0 -26
- package/esm/rules/string/string-comparison.d.ts.map +0 -1
- package/esm/rules/string/string-comparison.js +0 -52
- package/esm/rules/string/string-comparison.js.map +0 -1
- package/esm/rules/string/strong-password-rule.d.ts +0 -14
- package/esm/rules/string/strong-password-rule.d.ts.map +0 -1
- package/esm/rules/string/strong-password-rule.js +0 -38
- package/esm/rules/string/strong-password-rule.js.map +0 -1
- package/esm/rules/string/url.d.ts +0 -6
- package/esm/rules/string/url.d.ts.map +0 -1
- package/esm/rules/string/url.js +0 -16
- package/esm/rules/string/url.js.map +0 -1
- package/esm/rules/string/without-whitespace.d.ts +0 -6
- package/esm/rules/string/without-whitespace.d.ts.map +0 -1
- package/esm/rules/string/without-whitespace.js +0 -13
- package/esm/rules/string/without-whitespace.js.map +0 -1
- package/esm/types/conditional-types.d.ts +0 -15
- package/esm/types/conditional-types.d.ts.map +0 -1
- package/esm/types/context-types.d.ts +0 -44
- package/esm/types/context-types.d.ts.map +0 -1
- package/esm/types/data-transformer-types.d.ts +0 -25
- package/esm/types/data-transformer-types.d.ts.map +0 -1
- package/esm/types/date-types.d.ts +0 -9
- package/esm/types/date-types.d.ts.map +0 -1
- package/esm/types/date-types.js +0 -12
- package/esm/types/date-types.js.map +0 -1
- package/esm/types/index.d.ts +0 -10
- package/esm/types/index.d.ts.map +0 -1
- package/esm/types/inference-types.d.ts +0 -29
- package/esm/types/inference-types.d.ts.map +0 -1
- package/esm/types/mutator-types.d.ts +0 -27
- package/esm/types/mutator-types.d.ts.map +0 -1
- package/esm/types/result-types.d.ts +0 -19
- package/esm/types/result-types.d.ts.map +0 -1
- package/esm/types/rule-types.d.ts +0 -54
- package/esm/types/rule-types.d.ts.map +0 -1
- package/esm/types/schema-types.d.ts +0 -6
- package/esm/types/schema-types.d.ts.map +0 -1
- package/esm/validators/any-validator.d.ts +0 -7
- package/esm/validators/any-validator.d.ts.map +0 -1
- package/esm/validators/any-validator.js +0 -5
- package/esm/validators/any-validator.js.map +0 -1
- package/esm/validators/array-validator.d.ts +0 -59
- package/esm/validators/array-validator.d.ts.map +0 -1
- package/esm/validators/array-validator.js +0 -134
- package/esm/validators/array-validator.js.map +0 -1
- package/esm/validators/base-validator.d.ts +0 -609
- package/esm/validators/base-validator.d.ts.map +0 -1
- package/esm/validators/base-validator.js +0 -1154
- package/esm/validators/base-validator.js.map +0 -1
- package/esm/validators/boolean-validator.d.ts +0 -47
- package/esm/validators/boolean-validator.d.ts.map +0 -1
- package/esm/validators/boolean-validator.js +0 -54
- package/esm/validators/boolean-validator.js.map +0 -1
- package/esm/validators/date-validator.d.ts +0 -307
- package/esm/validators/date-validator.d.ts.map +0 -1
- package/esm/validators/date-validator.js +0 -645
- package/esm/validators/date-validator.js.map +0 -1
- package/esm/validators/float-validator.d.ts +0 -8
- package/esm/validators/float-validator.d.ts.map +0 -1
- package/esm/validators/float-validator.js +0 -9
- package/esm/validators/float-validator.js.map +0 -1
- package/esm/validators/index.d.ts +0 -24
- package/esm/validators/index.d.ts.map +0 -1
- package/esm/validators/int-validator.d.ts +0 -8
- package/esm/validators/int-validator.d.ts.map +0 -1
- package/esm/validators/int-validator.js +0 -9
- package/esm/validators/int-validator.js.map +0 -1
- package/esm/validators/number-validator.d.ts +0 -113
- package/esm/validators/number-validator.d.ts.map +0 -1
- package/esm/validators/number-validator.js +0 -192
- package/esm/validators/number-validator.js.map +0 -1
- package/esm/validators/numeric-validator.d.ts +0 -15
- package/esm/validators/numeric-validator.d.ts.map +0 -1
- package/esm/validators/numeric-validator.js +0 -18
- package/esm/validators/numeric-validator.js.map +0 -1
- package/esm/validators/object-validator.d.ts +0 -178
- package/esm/validators/object-validator.d.ts.map +0 -1
- package/esm/validators/object-validator.js +0 -356
- package/esm/validators/object-validator.js.map +0 -1
- package/esm/validators/record-validator.d.ts +0 -33
- package/esm/validators/record-validator.d.ts.map +0 -1
- package/esm/validators/record-validator.js +0 -70
- package/esm/validators/record-validator.js.map +0 -1
- package/esm/validators/scalar-validator.d.ts +0 -82
- package/esm/validators/scalar-validator.d.ts.map +0 -1
- package/esm/validators/scalar-validator.js +0 -160
- package/esm/validators/scalar-validator.js.map +0 -1
- package/esm/validators/string-validator.d.ts +0 -191
- package/esm/validators/string-validator.d.ts.map +0 -1
- package/esm/validators/string-validator.js +0 -410
- package/esm/validators/string-validator.js.map +0 -1
- package/esm/validators/tuple-validator.d.ts +0 -34
- package/esm/validators/tuple-validator.d.ts.map +0 -1
- package/esm/validators/tuple-validator.js +0 -79
- package/esm/validators/tuple-validator.js.map +0 -1
- package/esm/validators/union-validator.d.ts +0 -42
- package/esm/validators/union-validator.d.ts.map +0 -1
- package/esm/validators/union-validator.js +0 -44
- package/esm/validators/union-validator.js.map +0 -1
package/esm/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export{AnyValidator}from'./validators/any-validator.js';export{ArrayValidator}from'./validators/array-validator.js';export{BaseValidator}from'./validators/base-validator.js';export{BooleanValidator}from'./validators/boolean-validator.js';export{DateValidator}from'./validators/date-validator.js';export{FloatValidator}from'./validators/float-validator.js';export{IntValidator}from'./validators/int-validator.js';export{NumberValidator}from'./validators/number-validator.js';export{NumericValidator}from'./validators/numeric-validator.js';export{ObjectValidator}from'./validators/object-validator.js';export{RecordValidator}from'./validators/record-validator.js';export{ScalarValidator}from'./validators/scalar-validator.js';export{StringValidator}from'./validators/string-validator.js';export{TupleValidator}from'./validators/tuple-validator.js';export{UnionValidator}from'./validators/union-validator.js';export{WEEK_DAYS}from'./types/date-types.js';export{isDateValue}from'./helpers/date-helpers.js';export{getFieldValue}from'./helpers/get-field-value.js';export{setKeyPath}from'./helpers/path-helpers.js';export{VALID_RULE,invalidRule}from'./helpers/validation-helpers.js';export{flipArrayMutator,removeEmptyArrayElementsMutator,reverseArrayMutator,sortArrayMutator,uniqueArrayMutator}from'./mutators/array-mutators.js';export{addDaysMutator,addHoursMutator,addMonthsMutator,addYearsMutator,dateMutator,toDateOnlyMutator,toEndOfDayMutator,toEndOfMonthMutator,toEndOfYearMutator,toFormatMutator,toISOStringMutator,toStartOfDayMutator,toStartOfMonthMutator,toStartOfYearMutator,toTimeOnlyMutator,toTimestampMutator,toUTCMutator}from'./mutators/date-mutators.js';export{booleanMutator,numberMutator,numericMutator,roundNumberMutator}from'./mutators/number-mutators.js';export{jsonMutator,objectTrimMutator,stripUnknownMutator}from'./mutators/object-mutators.js';export{stringMutator}from'./mutators/scalar-mutators.js';export{alphaOnlyMutator,alphanumericOnlyMutator,appendMutator,base64DecodeMutator,base64EncodeMutator,camelCaseMutator,capitalizeMutator,htmlEscapeMutator,kebabCaseMutator,lowercaseMutator,ltrimMutator,maskMutator,padEndMutator,padStartMutator,pascalCaseMutator,prependMutator,removeNumbersMutator,removeSpecialCharactersMutator,repeatMutator,replaceAllMutator,replaceMutator,reverseMutator,rtrimMutator,safeHtmlMutator,slugMutator,snakeCaseMutator,stringifyMutator,titleCaseMutator,trimMultipleWhitespaceMutator,trimMutator,truncateMutator,unescapeHtmlMutator,uppercaseMutator,urlDecodeMutator,urlEncodeMutator}from'./mutators/string-mutators.js';export{equalRule}from'./rules/core/equal.js';export{forbiddenRule}from'./rules/core/forbidden.js';export{presentRule,requiredRule}from'./rules/core/required.js';export{unionRule}from'./rules/core/union.js';export{whenRule}from'./rules/core/when.js';export{alphaNumericRule,alphaRule,isNumericRule}from'./rules/string/alpha.js';export{isCreditCardRule}from'./rules/string/credit-card.js';export{emailRule}from'./rules/string/email.js';export{ip4Rule,ip6Rule,ipRule}from'./rules/string/ip.js';export{matchesRule}from'./rules/string/matches.js';export{patternRule}from'./rules/string/pattern.js';export{containsRule,endsWithRule,notContainsRule,startsWithRule}from'./rules/string/string-comparison.js';export{strongPasswordRule}from'./rules/string/strong-password-rule.js';export{urlRule}from'./rules/string/url.js';export{withoutWhitespaceRule}from'./rules/string/without-whitespace.js';export{betweenNumbersRule,evenRule,greaterThanRule,lessThanRule,maxRule,minRule,moduloRule,negativeRule,oddRule,positiveRule}from'./rules/number/number-rules.js';export{betweenLengthRule,lengthRule,maxLengthRule,maxWordsRule,minLengthRule,minWordsRule,wordsRule}from'./rules/length/length-rules.js';export{sortedArrayRule,uniqueArrayRule}from'./rules/array/array-rules.js';export{ageRule,beforeHourRule,beforeMinuteRule,beforeTodayRule,betweenHoursRule,betweenMinutesRule,dateRule,fromHourRule,fromMinuteRule,fromTodayRule,maxAgeRule,maxDateRule,minAgeRule,minDateRule,weekDayRule}from'./rules/date/date.js';export{afterTodayRule,betweenDatesRule,futureRule,pastRule,todayRule}from'./rules/date/date-comparison-rules.js';export{businessDayRule,weekdayRule,weekdaysRule,weekendRule}from'./rules/date/date-day-rules.js';export{afterFieldRule,beforeFieldRule,sameAsFieldDateRule}from'./rules/date/date-field-comparison-rules.js';export{betweenDaysRule,betweenMonthsRule,betweenTimesRule,betweenYearsRule,maxDayRule,maxMonthRule,maxYearRule,minDayRule,minMonthRule,minYearRule,monthRule,quarterRule,yearRule}from'./rules/date/date-period-rules.js';export{withinDaysRule,withinFutureDaysRule,withinPastDaysRule}from'./rules/date/date-relative-rules.js';export{betweenAgeRule,birthdayRule,leapYearRule}from'./rules/date/date-special-rules.js';export{maxHeightRule,maxWidthRule,minHeightRule,minWidthRule}from'./rules/file/dimensions.js';export{maxFileSizeRule,minFileSizeRule}from'./rules/file/file-size.js';export{colorRule,darkColorRule,hexColorRule,hslColorRule,lightColorRule,rgbColorRule,rgbaColorRule}from'./rules/color/color-rules.js';export{requiredIfEmptyRule,requiredIfInRule,requiredIfNotEmptyRule,requiredIfNotInRule,requiredIfRule}from'./rules/conditional/required-if-rules.js';export{requiredUnlessRule}from'./rules/conditional/required-unless-rules.js';export{requiredWithAllRule,requiredWithAnyRule,requiredWithRule}from'./rules/conditional/required-with-rules.js';export{requiredWithoutAllRule,requiredWithoutAnyRule,requiredWithoutRule}from'./rules/conditional/required-without-rules.js';export{presentIfEmptyRule,presentIfInRule,presentIfNotEmptyRule,presentIfNotInRule,presentIfRule}from'./rules/conditional/present-if-rules.js';export{presentUnlessRule}from'./rules/conditional/present-unless-rules.js';export{presentWithAllRule,presentWithAnyRule,presentWithRule}from'./rules/conditional/present-with-rules.js';export{presentWithoutAllRule,presentWithoutAnyRule,presentWithoutRule}from'./rules/conditional/present-without-rules.js';export{forbiddenIfEmptyRule,forbiddenIfInRule,forbiddenIfNotEmptyRule,forbiddenIfNotInRule,forbiddenIfNotRule,forbiddenIfRule}from'./rules/conditional/forbidden-if-rules.js';export{allowedValuesRule,enumRule,inRule,notAllowedValuesRule}from'./rules/common/enum.js';export{equalsFieldRule,notEqualsFieldRule}from'./rules/common/equals-field-rules.js';export{arrayRule,booleanRule,floatRule,intRule,numberRule,objectRule,scalarRule,stringRule}from'./rules/common/type-rules.js';export{unknownKeyRule}from'./rules/common/unknown-key.js';export{validate}from'./factory/validate.js';export{v}from'./factory/validators.js';export{getInstalledPlugins,hasPlugin,registerPlugin,unregisterPlugin}from'./plugins/plugin-system.js';export{configureSeal,getSealConfig,resetSealConfig}from'./config.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
import {isEmail,isPlainObject,isNumeric,isEmpty,isObject}from'@mongez/supportive-is';import {isIP}from'net';import Rt from'dayjs';function li(n,e,t){return e.split(".").reduce((r,i)=>r===void 0||typeof r!="object"?t:r===null?r:r.hasOwnProperty&&r.hasOwnProperty(i)?r[i]:t,n)}function p(n,e,t){return n?n[e]?n[e]:li(n,e,t):t}function E(n){if(!n)return n;if(typeof n=="object"&&n!==null){if(Array.isArray(n))return n.map(e=>E(e));if(n instanceof Date)return new Date(n.getTime());if(n instanceof Set)return new Set(Array.from(n,E));if(n instanceof Map)return new Map(Array.from(n,([e,t])=>[e,E(t)]));if(typeof n=="object"){let e=Object.getPrototypeOf(n);if(!(e===Object.prototype||e===null))return n;let r=Object.create(e);for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=E(n[i]));return r}}else return n;return n}function le(n,e=2){let t=Math.pow(10,e||0);return Math.floor(n*t)/t}function ce(n,e){if(!n||typeof n!="object"||Array.isArray(n))return n;for(let t of e){let r=t.split(".");if(r.length===1)delete n[t];else {let i=r.pop(),a=p(n,r.join("."));a&&delete a[i];}}return n}function pe(n,e){if(!n||typeof n!="object"||Array.isArray(n))return n;let t={...n};return ce(t,e)}function de(n){return n?n.charAt(0).toUpperCase()+n.slice(1):""}function A(n){return n?n.split(" ").map(e=>de(e)).join(" "):""}function S(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(n,e=" "){if(!n)return "";let t="^"+S(e)+"+",r=new RegExp(t,"g");return n.replace(r,"")}function me(n,e,t="..."){return n?n.length<=e?n:n.substring(0,e)+t:""}function U(n,e=" "){if(!n)return "";let t=S(e)+"+$",r=new RegExp(t,"g");return n.replace(r,"")}function w(n,e=" "){if(!n)return "";if(e===" ")return n.replace(/^\s+|\s+$/g,"");e=S(e);let t="^"+e+"+|"+e+"+$",r=new RegExp(t,"g");return n.replace(r,"")}function he(n,e="\\s+|-|/|_|\\."){if(!n)return "";let t=new RegExp(e+"|(?=[A-Z])","g");return n.split(t).map((r,i)=>i>0?A(r):r.toLowerCase()).join("")}function N(n,e="_",t=true){return n?n.replace(/(-|\/|\s|([A-Z]))+/g,function(r,i,a){return a?e+(t?a.toLowerCase():a):e}).replace(new RegExp(`^${e}`),""):""}function ge(n,e=true){return n?N(n,"-",e):""}function be(n,e="-|\\.|_|/|\\s"){if(!n)return "";let t=new RegExp(e,"g");return n.split(t).map(r=>A(r)).join("")}function v(n){if(n instanceof Date)return true;let e=new Date(n);return !isNaN(e.getTime())}function ka(n){if(typeof n=="number")return n;switch(n.unit){case "B":return n.size;case "KB":return n.size*1024;case "MB":return n.size*1024*1024;case "GB":return n.size*1024*1024*1024}}function ye(n){let e=["B","KB","MB","GB"],t=n,r=0;for(;t>=1024&&r<e.length-1;)t/=1024,r++;return `${Number.isInteger(t)?t:t.toFixed(2)}${e[r]}`}function m(n,e,t="field"){let r=n.context.options[t],a=(n.context.options.scope||"global")==="sibling"?e.parent:e.allValues;return p(a,r)}var V=(n,e)=>n?`${n}.${e}`:e;var W={firstErrorOnly:true};function Ba(n){Object.assign(W,n);}function Y(){return W}function _a(){delete W.translateRule,delete W.translateAttribute,W.firstErrorOnly=true;}var s={isValid:true},o=(n,e)=>{let t={...n.context.options,...e.allValues};t.input=e.path||e.key||"data",t.path=e.path,t.key=e.key,t.value=e.value;let r=Y().translateAttribute;if(r)for(let a in t){if(a==="input"){let c=n.context.attributesList?.input||r({attribute:n.context.translatedAttributes?.input||e.key,context:e,rule:n});if(c!=="input"){t.input=c;continue}}let u=t[a];t[a]=n.context.attributesList?.[u]||n.context.attributesList?.[a]||r?.({attribute:n.context.translatedAttributes?.[a]||u,context:e,rule:n})||u;}return {isValid:false,error:n.context.errorMessage||n.errorMessage||e.translateRule?.({rule:n,context:e,attributes:t})||n.defaultErrorMessage,input:e.key,path:e.path}};function h(n){return isEmpty(n)&&!isObject(n)}var Tt={name:"equal",defaultErrorMessage:"The :input must be equal to :value",async validate(n,e){return n!==this.context.options.value?o(this,e):s}};var wt={name:"forbidden",defaultErrorMessage:"The :input is forbidden",async validate(n,e){return h(n)?s:o(this,e)}};var vt={name:"required",defaultErrorMessage:"The :input is required",requiresValue:false,sortOrder:-2,async validate(n,e){return h(n)?o(this,e):s}},Vt={name:"present",defaultErrorMessage:"The :input field is required",requiresValue:false,sortOrder:-2,async validate(n,e){return n===void 0?o(this,e):s}};var Et={name:"union",defaultErrorMessage:"Value must match one of the allowed types",async validate(n,e){let t=this.context.options.validators,r=e.configurations?.firstErrorOnly??true,i=[];for(let a of t){if(!a.matchesType(n))continue;let u=await a.validate(n,e);if(u.isValid)return s;let c=u.errors?.[0]?.error||"Validation failed";if(i.push(c),r)break}return i.length>0&&(this.context.errorMessage=r?i[0]:i.join("; ")),o(this,e)}};var xe={name:"when",description:"Apply conditional validation based on another field value",async validate(n,e){let t=this.context.options.field,r=this.context.options.is,i=this.context.options.otherwise,u=(this.context.options.scope||"global")==="global"?p(e.allValues,t):p(e.parent,t),c=String(u);if(r[c]){let l=await r[c].validate(n,e);return l.isValid?s:(this.context.errorMessage=l.errors?.[0]?.error||"Validation failed",o(this,e))}if(i){let l=await i.validate(n,e);return l.isValid?s:(this.context.errorMessage=l.errors?.[0]?.error||"Validation failed",o(this,e))}return s}};var At={name:"alpha",defaultErrorMessage:"The :input must contain only alphabetic characters",async validate(n,e){return /^[a-zA-Z]+$/.test(n)?s:o(this,e)}},It={name:"alphaNumeric",defaultErrorMessage:"The :input must contain only alphanumeric characters",async validate(n,e){return /^[a-zA-Z0-9]+$/.test(n)?s:o(this,e)}},Ot={name:"numeric",defaultErrorMessage:"The :input must contain only numeric characters",async validate(n,e){return /^[0-9]+$/.test(String(n))?s:o(this,e)}};var qt={name:"creditCard",defaultErrorMessage:"The :input must be a valid credit card number",async validate(n,e){let t=String(n).replace(/\s/g,"");if(!/^\d+$/.test(t))return o(this,e);let r=0,i=false;for(let a=t.length-1;a>=0;a--){let u=parseInt(t[a],10);i&&(u*=2,u>9&&(u-=9)),r+=u,i=!i;}return r%10===0?s:o(this,e)}};var Ct={name:"email",defaultErrorMessage:"The :input must be a valid email address",async validate(n,e){return isEmail(n)?s:o(this,e)}};var Lt={name:"ip",defaultErrorMessage:"The :input must be a valid IP address",async validate(n,e){return isIP(n)?s:o(this,e)}},Nt={name:"ip4",defaultErrorMessage:"The :input must be a valid IPv4 address",async validate(n,e){return isIP(n)===4?s:o(this,e)}},Wt={name:"ip6",defaultErrorMessage:"The :input must be a valid IPv6 address",async validate(n,e){return isIP(n)===6?s:o(this,e)}};var Cu={name:"matches",defaultErrorMessage:"The :input must match :field",async validate(n,e){let t=p(e.allValues,this.context.options.field);return n===t?s:o(this,e)}};var Ft={name:"pattern",defaultErrorMessage:"The :input does not match the required pattern",async validate(n,e){return this.context.options.pattern.test(n)?s:o(this,e)}};var kt={name:"startsWith",defaultErrorMessage:"The :input must start with :value",async validate(n,e){return String(n).startsWith(this.context.options.value)?s:o(this,e)}},Pt={name:"endsWith",defaultErrorMessage:"The :input must end with :value",async validate(n,e){return String(n).endsWith(this.context.options.value)?s:o(this,e)}},Ut={name:"contains",defaultErrorMessage:"The :input must contain :value",async validate(n,e){return String(n).includes(this.context.options.value)?s:o(this,e)}},Yt={name:"notContains",defaultErrorMessage:"The :input must not contain :value",async validate(n,e){return String(n).includes(this.context.options.value)?o(this,e):s}};var Ht={name:"strongPassword",defaultErrorMessage:"The :input must be at least 8 characters and contain at least one uppercase letter, one lowercase letter, one number, and one special character",async validate(n,e){let t=String(n),r=this.context.options.minLength??8;return t.length<r?o(this,e):/[A-Z]/.test(t)?/[a-z]/.test(t)?/[0-9]/.test(t)?/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(t)?s:o(this,e):o(this,e):o(this,e):o(this,e)}};var Bt={name:"url",defaultErrorMessage:"The :input must be a valid URL",async validate(n,e){try{return new URL(n),s}catch{return o(this,e)}}};var _t={name:"withoutWhitespace",defaultErrorMessage:"The :input must not contain whitespace",async validate(n,e){return /\s/.test(n)?o(this,e):s}};var Me={name:"min",defaultErrorMessage:"The :input must be at least :min",async validate(n,e){let{min:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let a=r==="sibling"?e.parent:e.allValues,u=p(a,t);if(u===void 0)return s;if(i=Number(u),isNaN(i))return s}return n>=i?s:o(this,e)}},Se={name:"max",defaultErrorMessage:"The :input must equal to or less than :max",async validate(n,e){let{max:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let a=r==="sibling"?e.parent:e.allValues,u=p(a,t);if(u===void 0)return s;if(i=Number(u),isNaN(i))return s}return n<=i?s:o(this,e)}},De={name:"greaterThan",defaultErrorMessage:"The :input must be greater than :value",async validate(n,e){let{value:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let a=r==="sibling"?e.parent:e.allValues,u=p(a,t);if(u===void 0)return s;if(i=Number(u),isNaN(i))return s}return n>i?s:o(this,e)}},Te={name:"lessThan",defaultErrorMessage:"The :input must be less than :value",async validate(n,e){let{value:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let a=r==="sibling"?e.parent:e.allValues,u=p(a,t);if(u===void 0)return s;if(i=Number(u),isNaN(i))return s}return n<i?s:o(this,e)}},Kt={name:"positive",defaultErrorMessage:"The :input must be a positive number",async validate(n,e){return n>0?s:o(this,e)}},zt={name:"negative",defaultErrorMessage:"The :input must be a negative number",async validate(n,e){return n<0?s:o(this,e)}},$t={name:"odd",defaultErrorMessage:"The :input must be an odd number",async validate(n,e){return n%2!==0?s:o(this,e)}},jt={name:"even",defaultErrorMessage:"The :input must be an even number",async validate(n,e){return n%2===0?s:o(this,e)}},Zt={name:"modulo",defaultErrorMessage:"The :input must be divisible by :value",async validate(n,e){return n%this.context.options.value===0?s:o(this,e)}},we={name:"betweenNumbers",defaultErrorMessage:"The :input must be between :min and :max",async validate(n,e){let{min:t,max:r,scope:i="global"}=this.context.options,a;if(typeof t=="number")a=t;else {let c=i==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(a=Number(l),isNaN(a))return s}let u;if(typeof r=="number")u=r;else {let c=i==="sibling"?e.parent:e.allValues,l=p(c,r);if(l===void 0)return s;if(u=Number(l),isNaN(u))return s}return n>=a&&n<=u?(this.context.options.betweenNumbers=`${a} and ${u}`,s):o(this,e)}};var H={name:"minLength",defaultErrorMessage:"The :input must be at least :minLength characters long",async validate(n,e){return (typeof n?.length=="number"?n.length:String(n||"").length)>=this.context.options.minLength?s:(this.context.attributesList.minLength=this.context.options.minLength,o(this,e))}},B={name:"maxLength",defaultErrorMessage:"The :input must not exceed :maxLength characters",async validate(n,e){return (typeof n?.length=="number"?n.length:String(n||"").length)<=this.context.options.maxLength?s:(this.context.attributesList.maxLength=this.context.options.maxLength,o(this,e))}},_={name:"betweenLength",defaultErrorMessage:"The :input must be between :minLength and :maxLength characters long",async validate(n,e){let t=typeof n?.length=="number"?n.length:String(n||"").length;return t>=this.context.options.minLength&&t<=this.context.options.maxLength?s:(this.context.attributesList.minLength=this.context.options.minLength,this.context.attributesList.maxLength=this.context.options.maxLength,o(this,e))}},K={name:"length",defaultErrorMessage:"The :input must be exactly :length characters long",async validate(n,e){return (typeof n?.length=="number"?n.length:String(n||"").length)===this.context.options.length?s:(this.context.attributesList.length=this.context.options.length,o(this,e))}},Jt={name:"minWords",defaultErrorMessage:"The :input must be at least :minWords words",async validate(n,e){return String(n||"").split(" ").length>=this.context.options.minWords?s:(this.context.attributesList.minWords=this.context.options.minWords,o(this,e))}},Gt={name:"maxWords",defaultErrorMessage:"The :input must be at most :maxWords words",async validate(n,e){return String(n||"").split(" ").length<=this.context.options.maxWords?s:(this.context.attributesList.maxWords=this.context.options.maxWords,o(this,e))}},Qt={name:"words",defaultErrorMessage:"The :input must be exactly :words words",async validate(n,e){return String(n||"").split(" ").length===this.context.options.words?s:(this.context.attributesList.words=this.context.options.words,o(this,e))}};var Xt={name:"uniqueArray",description:"The array must contain unique values",defaultErrorMessage:"The :input must contain unique values",async validate(n,e){return new Set(n).size===n.length?s:o(this,e)}},er={name:"sortedArray",description:"The array must be sorted",defaultErrorMessage:"The :input must be sorted",async validate(n,e){if(!Array.isArray(n)||n.length<=1)return s;let t=this.context.options.direction??"asc";for(let r=0;r<n.length-1;r++){let i=n[r],a=n[r+1];if(t==="asc"){if(i>a)return o(this,e)}else if(i<a)return o(this,e)}return s}};var z={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};var ve={name:"date",defaultErrorMessage:"The :input must be a valid date",async validate(n,e){return n instanceof Date&&!isNaN(n.getTime())?s:o(this,e)}},Ve={name:"minDate",description:"The field must be at least the given date or field",defaultErrorMessage:"The :input must be at least :dateOrField",async validate(n,e){let{dateOrField:t,scope:r="global"}=this.context.options,i;if(v(t))i=new Date(t);else {let u=r==="sibling"?e.parent:e.allValues,c=p(u,t);if(c===void 0)return s;i=new Date(c);}return new Date(n)>=i?s:o(this,e)}},Ee={name:"maxDate",defaultErrorMessage:"The :input must be at most :dateOrField",async validate(n,e){let{dateOrField:t,scope:r="global"}=this.context.options,i;if(v(t))i=new Date(t);else {let u=r==="sibling"?e.parent:e.allValues,c=p(u,t);if(c===void 0)return s;i=new Date(c);}return new Date(n)<=i?s:o(this,e)}},tr={name:"fromToday",defaultErrorMessage:"The :input must be today or in the future",async validate(n,e){let t=new Date;t.setHours(0,0,0,0);let r=new Date(n);return r.setHours(0,0,0,0),r>=t?s:o(this,e)}},rr={name:"beforeToday",defaultErrorMessage:"The :input must be before today",async validate(n,e){let t=new Date;t.setHours(0,0,0,0);let r=new Date(n);return r.setHours(0,0,0,0),r<t?s:o(this,e)}},nr={name:"fromHour",defaultErrorMessage:"The :input must be from :hour:00 onwards",async validate(n,e){return new Date(n).getHours()>=this.context.options.hour?s:o(this,e)}},ir={name:"beforeHour",defaultErrorMessage:"The :input must be before :hour:00",async validate(n,e){return new Date(n).getHours()<this.context.options.hour?s:o(this,e)}},sr={name:"betweenHours",defaultErrorMessage:"The :input must be between :startHour:00 and :endHour:00",async validate(n,e){let r=new Date(n).getHours(),{startHour:i,endHour:a}=this.context.options;return r>=i&&r<=a?s:o(this,e)}},or={name:"fromMinute",defaultErrorMessage:"The :input must be from minute :minute onwards",async validate(n,e){return new Date(n).getMinutes()>=this.context.options.minute?s:o(this,e)}},ar={name:"beforeMinute",defaultErrorMessage:"The :input must be before minute :minute",async validate(n,e){return new Date(n).getMinutes()<this.context.options.minute?s:o(this,e)}},ur={name:"betweenMinutes",defaultErrorMessage:"The :input must be between minute :startMinute and :endMinute",async validate(n,e){let r=new Date(n).getMinutes(),{startMinute:i,endMinute:a}=this.context.options;return r>=i&&r<=a?s:o(this,e)}},lr={name:"age",defaultErrorMessage:"The :input must be exactly :years years old",async validate(n,e){let t=new Date(n),r=new Date,i=r.getFullYear()-t.getFullYear(),a=r.getMonth()-t.getMonth();return (a<0||a===0&&r.getDate()<t.getDate())&&i--,i===this.context.options.years?s:o(this,e)}},cr={name:"minAge",defaultErrorMessage:"The :input must be at least :years years old",async validate(n,e){let t=new Date(n),r=new Date,i=r.getFullYear()-t.getFullYear(),a=r.getMonth()-t.getMonth();return (a<0||a===0&&r.getDate()<t.getDate())&&i--,i>=this.context.options.years?s:o(this,e)}},pr={name:"maxAge",defaultErrorMessage:"The :input must be at most :years years old",async validate(n,e){let t=new Date(n),r=new Date,i=r.getFullYear()-t.getFullYear(),a=r.getMonth()-t.getMonth();return (a<0||a===0&&r.getDate()<t.getDate())&&i--,i<=this.context.options.years?s:o(this,e)}},dr={name:"weekDay",defaultErrorMessage:"The :input must be a :day",async validate(n,e){let r=new Date(n).getDay(),i=z[this.context.options.day];return r===i?s:o(this,e)}};var fr={name:"betweenDates",defaultErrorMessage:"The :input must be between :startDate and :endDate",async validate(n,e){let{startDate:t,endDate:r}=this.context.options,i=new Date(n);return i>=t&&i<=r?s:o(this,e)}},mr={name:"today",defaultErrorMessage:"The :input must be today",async validate(n,e){let t=new Date;t.setHours(0,0,0,0);let r=new Date(n);return r.setHours(0,0,0,0),r.getTime()===t.getTime()?s:o(this,e)}},hr={name:"past",defaultErrorMessage:"The :input must be in the past",async validate(n,e){let t=new Date;return new Date(n)<t?s:o(this,e)}},gr={name:"future",defaultErrorMessage:"The :input must be in the future",async validate(n,e){return n>new Date?s:o(this,e)}},br={name:"afterToday",defaultErrorMessage:"The :input must be after today",async validate(n,e){let t=new Date;t.setHours(0,0,0,0);let r=new Date(n);return r.setHours(0,0,0,0),r>t?s:o(this,e)}};var yr={name:"weekend",defaultErrorMessage:"The :input must be a weekend (Saturday or Sunday)",async validate(n,e){let r=new Date(n).getDay();return r===0||r===6?s:o(this,e)}},wl={name:"weekday",defaultErrorMessage:"The :input must be a weekday (Monday-Friday)",async validate(n,e){let r=new Date(n).getDay();return r>=1&&r<=5?s:o(this,e)}},xr={name:"weekdays",defaultErrorMessage:"The :input must be one of: :days",async validate(n,e){let r=new Date(n).getDay(),{days:i}=this.context.options;return i.map(u=>z[u]).includes(r)?s:o(this,e)}},Rr={name:"businessDay",defaultErrorMessage:"The :input must be a business day",async validate(n,e){let r=new Date(n).getDay();return r>=1&&r<=5?s:o(this,e)}};var Ae={name:"beforeField",description:"The date must be before the given date or field",defaultErrorMessage:"The :input must be before :dateOrField",async validate(n,e){let{dateOrField:t,scope:r="global"}=this.context.options,i;if(v(t))i=new Date(t);else {let u=r==="sibling"?e.parent:e.allValues,c=p(u,t);if(c===void 0)return s;i=new Date(c);}return new Date(n)<i?s:o(this,e)}},Ie={name:"afterField",description:"The date must be after the given date or field",defaultErrorMessage:"The :input must be after :dateOrField",async validate(n,e){let{dateOrField:t,scope:r="global"}=this.context.options,i;if(v(t))i=new Date(t);else {let u=r==="sibling"?e.parent:e.allValues,c=p(u,t);if(c===void 0)return s;i=new Date(c);}return new Date(n)>i?s:o(this,e)}},Oe={name:"sameAsFieldDate",description:"The date must be the same as another field's date",defaultErrorMessage:"The :input must be the same as :field",async validate(n,e){let{field:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=p(i,t);if(a===void 0||n===void 0)return o(this,e);let u=new Date(n);u.setHours(0,0,0,0);let c=new Date(a);return c.setHours(0,0,0,0),u.getTime()===c.getTime()?s:o(this,e)}};var Mr={name:"month",defaultErrorMessage:"The :input must be in month :month",async validate(n,e){return new Date(n).getMonth()+1===this.context.options.month?s:o(this,e)}},Sr={name:"year",defaultErrorMessage:"The :input must be in year :year",async validate(n,e){return new Date(n).getFullYear()===this.context.options.year?s:o(this,e)}},qe={name:"betweenYears",defaultErrorMessage:"The :input must be between :startYear and :endYear",async validate(n,e){let{startYear:t,endYear:r,scope:i="global"}=this.context.options,u=new Date(n).getFullYear(),c;if(typeof t=="number")c=t;else {let f=i==="sibling"?e.parent:e.allValues,d=p(f,t);if(d===void 0)return s;if(d instanceof Date)c=d.getFullYear();else if(typeof d=="number")c=d;else {let g=new Date(d);if(!isNaN(g.getTime()))c=g.getFullYear();else return s}}let l;if(typeof r=="number")l=r;else {let f=i==="sibling"?e.parent:e.allValues,d=p(f,r);if(d===void 0)return s;if(d instanceof Date)l=d.getFullYear();else if(typeof d=="number")l=d;else {let g=new Date(d);if(!isNaN(g.getTime()))l=g.getFullYear();else return s}}return u>=c&&u<=l?s:o(this,e)}},Ce={name:"betweenMonths",defaultErrorMessage:"The :input must be between month :startMonth and :endMonth",async validate(n,e){let{startMonth:t,endMonth:r,scope:i="global"}=this.context.options,u=new Date(n).getMonth()+1,c;if(typeof t=="number")c=t;else {let f=i==="sibling"?e.parent:e.allValues,d=p(f,t);if(d===void 0)return s;if(d instanceof Date)c=d.getMonth()+1;else if(typeof d=="number")c=d;else {let g=new Date(d);if(!isNaN(g.getTime()))c=g.getMonth()+1;else return s}}let l;if(typeof r=="number")l=r;else {let f=i==="sibling"?e.parent:e.allValues,d=p(f,r);if(d===void 0)return s;if(d instanceof Date)l=d.getMonth()+1;else if(typeof d=="number")l=d;else {let g=new Date(d);if(!isNaN(g.getTime()))l=g.getMonth()+1;else return s}}return u>=c&&u<=l?s:o(this,e)}},Le={name:"betweenDays",defaultErrorMessage:"The :input must be between day :startDay and :endDay",async validate(n,e){let{startDay:t,endDay:r,scope:i="global"}=this.context.options,u=new Date(n).getDate(),c;if(typeof t=="number")c=t;else {let f=i==="sibling"?e.parent:e.allValues,d=p(f,t);if(d===void 0)return s;if(d instanceof Date)c=d.getDate();else if(typeof d=="number")c=d;else {let g=new Date(d);if(!isNaN(g.getTime()))c=g.getDate();else return s}}let l;if(typeof r=="number")l=r;else {let f=i==="sibling"?e.parent:e.allValues,d=p(f,r);if(d===void 0)return s;if(d instanceof Date)l=d.getDate();else if(typeof d=="number")l=d;else {let g=new Date(d);if(!isNaN(g.getTime()))l=g.getDate();else return s}}return u>=c&&u<=l?s:o(this,e)}},Dr={name:"quarter",defaultErrorMessage:"The :input must be in quarter :quarter",async validate(n,e){let r=new Date(n).getMonth()+1;return Math.ceil(r/3)===this.context.options.quarter?s:o(this,e)}},Tr={name:"betweenTimes",defaultErrorMessage:"The :input must be between :startTime and :endTime",async validate(n,e){let t=new Date(n),r=t.getHours(),i=t.getMinutes(),a=r*60+i,{startTime:u,endTime:c}=this.context.options,[l,f]=u.split(":").map(Number),d=l*60+f,[g,ue]=c.split(":").map(Number),F=g*60+ue;return a>=d&&a<=F?s:o(this,e)}},Ne={name:"minYear",description:"The date year must be at least the given year or field",defaultErrorMessage:"The :input year must be at least :yearOrField",async validate(n,e){let{yearOrField:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let c=r==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(l instanceof Date)i=l.getFullYear();else if(typeof l=="number")i=l;else {let f=new Date(l);if(!isNaN(f.getTime()))i=f.getFullYear();else return s}}return new Date(n).getFullYear()>=i?s:o(this,e)}},We={name:"maxYear",description:"The date year must be at most the given year or field",defaultErrorMessage:"The :input year must be at most :yearOrField",async validate(n,e){let{yearOrField:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let c=r==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(l instanceof Date)i=l.getFullYear();else if(typeof l=="number")i=l;else {let f=new Date(l);if(!isNaN(f.getTime()))i=f.getFullYear();else return s}}return new Date(n).getFullYear()<=i?s:o(this,e)}},Fe={name:"minMonth",description:"The date month must be at least the given month or field",defaultErrorMessage:"The :input month must be at least :monthOrField",async validate(n,e){let{monthOrField:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let c=r==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(l instanceof Date)i=l.getMonth()+1;else if(typeof l=="number")i=l;else {let f=new Date(l);if(!isNaN(f.getTime()))i=f.getMonth()+1;else return s}}return new Date(n).getMonth()+1>=i?s:o(this,e)}},ke={name:"maxMonth",description:"The date month must be at most the given month or field",defaultErrorMessage:"The :input month must be at most :monthOrField",async validate(n,e){let{monthOrField:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let c=r==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(l instanceof Date)i=l.getMonth()+1;else if(typeof l=="number")i=l;else {let f=new Date(l);if(!isNaN(f.getTime()))i=f.getMonth()+1;else return s}}return new Date(n).getMonth()+1<=i?s:o(this,e)}},Pe={name:"minDay",description:"The date day must be at least the given day or field",defaultErrorMessage:"The :input day must be at least :dayOrField",async validate(n,e){let{dayOrField:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let c=r==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(l instanceof Date)i=l.getDate();else if(typeof l=="number")i=l;else {let f=new Date(l);if(!isNaN(f.getTime()))i=f.getDate();else return s}}return new Date(n).getDate()>=i?s:o(this,e)}},Ue={name:"maxDay",description:"The date day must be at most the given day or field",defaultErrorMessage:"The :input day must be at most :dayOrField",async validate(n,e){let{dayOrField:t,scope:r="global"}=this.context.options,i;if(typeof t=="number")i=t;else {let c=r==="sibling"?e.parent:e.allValues,l=p(c,t);if(l===void 0)return s;if(l instanceof Date)i=l.getDate();else if(typeof l=="number")i=l;else {let f=new Date(l);if(!isNaN(f.getTime()))i=f.getDate();else return s}}return new Date(n).getDate()<=i?s:o(this,e)}};var wr={name:"withinDays",defaultErrorMessage:"The :input must be within :days days from now",async validate(n,e){let t=new Date,r=new Date(n),i=Math.abs(r.getTime()-t.getTime());return Math.ceil(i/(1e3*60*60*24))<=this.context.options.days?s:o(this,e)}},vr={name:"withinPastDays",defaultErrorMessage:"The :input must be within the past :days days",async validate(n,e){let t=new Date,r=new Date(n);if(r>t)return o(this,e);let i=t.getTime()-r.getTime();return Math.ceil(i/(1e3*60*60*24))<=this.context.options.days?s:o(this,e)}},Vr={name:"withinFutureDays",defaultErrorMessage:"The :input must be within the next :days days",async validate(n,e){let t=new Date,r=new Date(n);if(r<t)return o(this,e);let i=r.getTime()-t.getTime();return Math.ceil(i/(1e3*60*60*24))<=this.context.options.days?s:o(this,e)}};var Er={name:"birthday",defaultErrorMessage:"The :input must be a valid birthday",async validate(n,e){let t=new Date(n),r=new Date;if(t>r)return o(this,e);let i=r.getFullYear()-t.getFullYear(),a=r.getMonth()-t.getMonth();(a<0||a===0&&r.getDate()<t.getDate())&&i--;let u=this.context.options.minAge??0;if(i<u)return o(this,e);let c=this.context.options.maxAge??150;return i>c?o(this,e):s}},Ar={name:"betweenAge",defaultErrorMessage:"Age must be between :minAge and :maxAge years",async validate(n,e){let t=new Date(n),r=new Date,i=r.getFullYear()-t.getFullYear(),a=r.getMonth()-t.getMonth();(a<0||a===0&&r.getDate()<t.getDate())&&i--;let{minAge:u,maxAge:c}=this.context.options;return i>=u&&i<=c?s:o(this,e)}},Ir={name:"leapYear",defaultErrorMessage:"The :input must be in a leap year",async validate(n,e){let r=new Date(n).getFullYear();return r%4===0&&r%100!==0||r%400===0?s:o(this,e)}};var $l={name:"minWidth",defaultErrorMessage:"The :input must be at least :minWidth pixels wide",async validate(n,e){return (await n.dimensions()).width>=this.context.options.minWidth?s:o(this,e)}},jl={name:"maxWidth",defaultErrorMessage:"The :input must be at most :maxWidth pixels wide",async validate(n,e){return (await n.dimensions()).width<=this.context.options.maxWidth?s:o(this,e)}},Zl={name:"minHeight",defaultErrorMessage:"The :input must be at least :minHeight pixels tall",async validate(n,e){return (await n.dimensions()).height>=this.context.options.minHeight?s:o(this,e)}},Jl={name:"maxHeight",defaultErrorMessage:"The :input must be at most :maxHeight pixels tall",async validate(n,e){return (await n.dimensions()).height<=this.context.options.maxHeight?s:o(this,e)}};var Xl={name:"maxFileSize",defaultErrorMessage:"The :input must not exceed :maxSize",async validate(n,e){if((typeof n.size=="function"?await n.size():n.size)<=this.context.options.maxSize)return s;let r={...this.context,options:{...this.context.options,maxSize:ye(this.context.options.maxSize)}};return o({...this,context:r},e)}},ec={name:"minFileSize",defaultErrorMessage:"The :input must be at least :minSize",async validate(n,e){if((typeof n.size=="function"?await n.size():n.size)>=this.context.options.minSize)return s;let r={...this.context,options:{...this.context.options,minSize:ye(this.context.options.minSize)}};return o({...this,context:r},e)}};var R={hex:/^#([0-9a-f]{3}){1,2}$/i,rgb:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,rgba:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(0?\.\d+|1)\)$/,hsl:/^hsl\((\d{1,3}),\s*(\d{1,3})%?,\s*(\d{1,3})%?\)$/},Or={name:"color",defaultErrorMessage:"The :input must be a valid color",async validate(n,e){return R.hex.test(n)||R.rgb.test(n)||R.rgba.test(n)||R.hsl.test(n)?s:o(this,e)}},qr={name:"hexColor",defaultErrorMessage:"The :input must be a valid hex color",async validate(n,e){return R.hex.test(n)?s:o(this,e)}},Cr={name:"rgbColor",defaultErrorMessage:"The :input must be a valid RGB color",async validate(n,e){return R.rgb.test(n)?s:o(this,e)}},Lr={name:"rgbaColor",defaultErrorMessage:"The :input must be a valid RGBA color",async validate(n,e){return R.rgba.test(n)?s:o(this,e)}},Nr={name:"hslColor",defaultErrorMessage:"The :input must be a valid HSL color",async validate(n,e){return R.hsl.test(n)?s:o(this,e)}},Wr={name:"lightColor",defaultErrorMessage:"The :input must be a light color",async validate(n,e){if(!R.hex.test(n))return o(this,e);let t=n.replace("#",""),r=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return (r*299+i*587+a*114)/1e3>155?s:o(this,e)}},Fr={name:"darkColor",defaultErrorMessage:"The :input must be a dark color",async validate(n,e){if(!R.hex.test(n))return o(this,e);let t=n.replace("#",""),r=parseInt(t.substring(0,2),16),i=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return (r*299+i*587+a*114)/1e3<=155?s:o(this,e)}};var Ye={name:"requiredIf",description:"The field is required if another field equals a specific value",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{value:t}=this.context.options,r=m(this,e);return h(n)&&r===t?o(this,e):s}},He={name:"requiredIfEmpty",description:"The field is required if another field is empty",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let t=m(this,e);return h(n)&&h(t)?o(this,e):s}},Be={name:"requiredIfNotEmpty",description:"The field is required if another field is not empty",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let t=m(this,e);return h(n)&&!h(t)?o(this,e):s}},_e={name:"requiredIfIn",description:"The field is required if another field's value is in the given array",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{values:t}=this.context.options,r=m(this,e);return h(n)&&t.includes(r)?o(this,e):s}},Ke={name:"requiredIfNotIn",description:"The field is required if another field's value is NOT in the given array",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{values:t}=this.context.options,r=m(this,e);return h(n)&&!t.includes(r)?o(this,e):s}};var ze={name:"requiredUnless",description:"The field is required unless another field equals a specific value",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{value:t}=this.context.options,r=m(this,e);return h(n)&&r!==t?o(this,e):s}};var $e={name:"requiredWith",description:"The field is required if another field is present",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let t=m(this,e);return h(n)&&t!==void 0?o(this,e):s}},je={name:"requiredWithAll",description:"The field is required if all specified fields are present",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.every(u=>p(i,u)!==void 0);return h(n)&&a?o(this,e):s}},Ze={name:"requiredWithAny",description:"The field is required if any of the specified fields is present",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.some(u=>p(i,u)!==void 0);return h(n)&&a?o(this,e):s}};var Je={name:"requiredWithout",description:"The field is required if another field is missing",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let t=m(this,e);return h(n)&&t===void 0?o(this,e):s}},Ge={name:"requiredWithoutAll",description:"The field is required if all specified fields are missing",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.every(u=>p(i,u)===void 0);return h(n)&&a?o(this,e):s}},Qe={name:"requiredWithoutAny",description:"The field is required if any of the specified fields is missing",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input is required",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.some(u=>p(i,u)===void 0);return h(n)&&a?o(this,e):s}};var Xe={name:"presentIf",description:"The field must be present if another field equals a specific value",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{value:t}=this.context.options,r=m(this,e);return n===void 0&&r===t?o(this,e):s}},et={name:"presentIfEmpty",description:"The field must be present if another field is empty",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let t=m(this,e);return n===void 0&&h(t)?o(this,e):s}},tt={name:"presentIfNotEmpty",description:"The field must be present if another field is not empty",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let t=m(this,e);return n===void 0&&!h(t)?o(this,e):s}},rt={name:"presentIfIn",description:"The field must be present if another field's value is in the given array",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{values:t}=this.context.options,r=m(this,e);return n===void 0&&t.includes(r)?o(this,e):s}},nt={name:"presentIfNotIn",description:"The field must be present if another field's value is NOT in the given array",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{values:t}=this.context.options,r=m(this,e);return n===void 0&&!t.includes(r)?o(this,e):s}};var it={name:"presentUnless",description:"The field must be present unless another field equals a specific value",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{value:t}=this.context.options,r=m(this,e);return n===void 0&&r!==t?o(this,e):s}};var st={name:"presentWith",description:"The field must be present if another field is present",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let t=m(this,e);return n===void 0&&t!==void 0?o(this,e):s}},ot={name:"presentWithAll",description:"The field must be present if all specified fields are present",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.every(u=>p(i,u)!==void 0);return n===void 0&&a?o(this,e):s}},at={name:"presentWithAny",description:"The field must be present if any of the specified fields is present",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.some(u=>p(i,u)!==void 0);return n===void 0&&a?o(this,e):s}};var ut={name:"presentWithout",description:"The field must be present if another field is missing",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let t=m(this,e);return n===void 0&&t===void 0?o(this,e):s}},lt={name:"presentWithoutAll",description:"The field must be present if all specified fields are missing",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.every(u=>p(i,u)===void 0);return n===void 0&&a?o(this,e):s}},ct={name:"presentWithoutAny",description:"The field must be present if any of the specified fields is missing",sortOrder:-2,requiresValue:false,defaultErrorMessage:"The :input field must be present",async validate(n,e){let{fields:t,scope:r="global"}=this.context.options,i=r==="sibling"?e.parent:e.allValues,a=t.some(u=>p(i,u)===void 0);return n===void 0&&a?o(this,e):s}};var pt={name:"forbiddenIf",description:"The field is forbidden if another field equals a specific value",sortOrder:-2,defaultErrorMessage:"The :input is forbidden",async validate(n,e){let{value:t}=this.context.options,r=m(this,e);return !h(n)&&r===t?o(this,e):s}},dt={name:"forbiddenIfNot",description:"The field is forbidden if another field does NOT equal a specific value",sortOrder:-2,defaultErrorMessage:"The :input is forbidden",async validate(n,e){let{value:t}=this.context.options,r=m(this,e);return !h(n)&&r!==t?o(this,e):s}},ft={name:"forbiddenIfEmpty",description:"The field is forbidden if another field is empty",sortOrder:-2,defaultErrorMessage:"The :input is forbidden",async validate(n,e){let t=m(this,e);return !h(n)&&h(t)?o(this,e):s}},mt={name:"forbiddenIfNotEmpty",description:"The field is forbidden if another field is not empty",sortOrder:-2,defaultErrorMessage:"The :input is forbidden",async validate(n,e){let t=m(this,e);return !h(n)&&!h(t)?o(this,e):s}},ht={name:"forbiddenIfIn",description:"The field is forbidden if another field's value is in the given array",sortOrder:-2,defaultErrorMessage:"The :input is forbidden",async validate(n,e){let{values:t}=this.context.options,r=m(this,e);return !h(n)&&t.includes(r)?o(this,e):s}},gt={name:"forbiddenIfNotIn",description:"The field is forbidden if another field's value is NOT in the given array",sortOrder:-2,defaultErrorMessage:"The :input is forbidden",async validate(n,e){let{values:t}=this.context.options,r=m(this,e);return !h(n)&&!t.includes(r)?o(this,e):s}};var kr={name:"enum",defaultErrorMessage:"The :input must be one of the following values: :enum",async validate(n,e){let t=this.context.options.enum,r=Object.values(t);return r.includes(n)?s:(this.context.options.enum=r.join(", "),o(this,e))}},Pr={name:"in",defaultErrorMessage:"The :input must be one of the following values: :values",async validate(n,e){return this.context.options.values.includes(n)?s:o(this,e)}},Ur={name:"allowedValues",defaultErrorMessage:"The :input must be one of the allowed values",async validate(n,e){return this.context.options.allowedValues.includes(n)?s:o(this,e)}},Yr={name:"notAllowedValues",defaultErrorMessage:"The :input contains a forbidden value",async validate(n,e){return this.context.options.notAllowedValues.includes(n)?o(this,e):s}};var bt={name:"equalsField",description:"The value must equal another field's value",sortOrder:-1,requiresValue:true,defaultErrorMessage:"The :input must match the :field field",async validate(n,e){let t=m(this,e);return n!==t?o(this,e):s}},yt={name:"notEqualsField",description:"The value must NOT equal another field's value",sortOrder:-1,requiresValue:true,defaultErrorMessage:"The :input must not match the :field field",async validate(n,e){let t=m(this,e);return n===t?o(this,e):s}};var Hr={name:"string",defaultErrorMessage:"The :input must be a string",async validate(n,e){return typeof n=="string"?s:o(this,e)}},Br={name:"number",defaultErrorMessage:"The :input must be a number",async validate(n,e){return typeof n=="number"?s:o(this,e)}},_r={name:"boolean",defaultErrorMessage:"The :input must be a boolean",async validate(n,e){return typeof n=="boolean"?s:o(this,e)}},Kr={name:"int",defaultErrorMessage:"The :input must be an integer",async validate(n,e){return Number.isInteger(n)?s:o(this,e)}},zr={name:"float",defaultErrorMessage:"The :input must be a float",async validate(n,e){return Number.isFinite(n)&&!Number.isInteger(n)?s:o(this,e)}},$r={name:"scalar",defaultErrorMessage:"The :input must be a scalar value",async validate(n,e){return ["string","number","boolean"].includes(typeof n)?s:o(this,e)}},$={name:"object",defaultErrorMessage:"The :input must be an object",async validate(n,e){return isPlainObject(n)?s:o(this,e)}},j={name:"array",defaultErrorMessage:"The :input must be an array",async validate(n,e){return Array.isArray(n)?s:o(this,e)}};var jr={name:"unknownKeys",defaultErrorMessage:"The :input contains unknown keys: :unknownKeys",async validate(n,e){let t=this.context.options.schema,r=[...Object.keys(t),...this.context.options.allowedKeys||[]],i=Object.keys(n).filter(a=>!r.includes(a));return i.length>0?(this.context.options.unknownKeys=i.join(", "),console.log("Options",this.context.options),o(this,e)):s}};var y=class{constructor(){this.rules=[];this.mutators=[];this.shouldOmit=false;this.isNullable=false;this.dataTransformers=[];this.attributesText={};this.translatedAttributes={};}getDefaultValue(){return typeof this.defaultValue=="function"?this.defaultValue():this.defaultValue}nullable(){return this.isNullable=true,this}notNullable(){return this.isNullable=false,this}addTransformer(e,t={}){return this.dataTransformers.push({transform:e,options:t}),this}outputAs(e){return this.addTransformer((t,{context:r})=>e(t,r)),this}toJSON(e){return this.addTransformer((t,{options:r})=>JSON.stringify(t,null,r.indent),{indent:e??0}),this}async startTransformationPipeline(e,t){for(let r of this.dataTransformers)e=await r.transform(e,{options:r.options,context:t});return e}attributes(e){for(let t in e)this.attributesText[t]=e[t];return this}transAttributes(e){for(let t in e)this.translatedAttributes[t]=e[t];return this}describe(e){return this.description=e,this}matchesType(e){return true}clone(){let e=this.constructor,t=Object.create(e.prototype);return t.rules=[...this.rules],t.mutators=[...this.mutators],t.dataTransformers=[...this.dataTransformers],t.defaultValue=this.defaultValue,t.shouldOmit=this.shouldOmit,t.description=this.description,t.attributesText={...this.attributesText},t.isNullable=this.isNullable,t}ignoreEmptyValue(e=true){return this}omit(){return this.shouldOmit=true,this}exclude(){return this.omit()}isOmitted(){return this.shouldOmit}equal(e,t){let r=this.addRule(Tt,t);return r.context.options.value=e,this}sameAs(e,t){let r=this.addRule(bt,t);return r.context.options.field=e,r.context.options.scope="global",this}sameAsSibling(e,t){let r=this.addRule(bt,t);return r.context.options.field=e,r.context.options.scope="sibling",this}differentFrom(e,t){let r=this.addRule(yt,t);return r.context.options.field=e,r.context.options.scope="global",this}differentFromSibling(e,t){let r=this.addRule(yt,t);return r.context.options.field=e,r.context.options.scope="sibling",this}addRule(e,t){let r={...E(e),context:{errorMessage:t,options:{},attributesList:this.attributesText,translatedAttributes:this.translatedAttributes}};return t&&(r.errorMessage=t),e.sortOrder===void 0&&(r.sortOrder=this.rules.length+1),this.rules.push(r),r}useRule(e,t){let{errorMessage:r,...i}=t||{},a=this.addRule(e,r);return Object.keys(i).length>0&&Object.assign(a.context.options,i),this}refine(e){return this.addRule({name:"custom",async validate(t,r){let i=await e(t,r);return i?(this.context.errorMessage=i,o(this,r)):s}}),this}addMutator(e,t={}){return this.mutators.push({mutate:e,context:{options:t,ctx:{}}}),this}default(e){return this.defaultValue=e,this}required(e){return this.addRule(vt,e),this}present(e){return this.addRule(Vt,e),this}optional(){return this}requiredWith(e,t){let r=this.addRule($e,t);return r.context.options.field=e,r.context.options.scope="global",this}requiredWithSibling(e,t){let r=this.addRule($e,t);return r.context.options.field=e,r.context.options.scope="sibling",this}requiredWithout(e,t){let r=this.addRule(Je,t);return r.context.options.field=e,r.context.options.scope="global",this}requiredWithoutSibling(e,t){let r=this.addRule(Je,t);return r.context.options.field=e,r.context.options.scope="sibling",this}requiredIf(e,t,r){let i=this.addRule(Ye,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="global",this}requiredIfSibling(e,t,r){let i=this.addRule(Ye,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="sibling",this}requiredUnless(e,t,r){let i=this.addRule(ze,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="global",this}requiredUnlessSibling(e,t,r){let i=this.addRule(ze,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="sibling",this}requiredIfEmpty(e,t){let r=this.addRule(He,t);return r.context.options.field=e,r.context.options.scope="global",this}requiredIfEmptySibling(e,t){let r=this.addRule(He,t);return r.context.options.field=e,r.context.options.scope="sibling",this}requiredIfNotEmpty(e,t){let r=this.addRule(Be,t);return r.context.options.field=e,r.context.options.scope="global",this}requiredIfNotEmptySibling(e,t){let r=this.addRule(Be,t);return r.context.options.field=e,r.context.options.scope="sibling",this}requiredIfIn(e,t,r){let i=this.addRule(_e,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="global",this}requiredIfInSibling(e,t,r){let i=this.addRule(_e,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="sibling",this}requiredIfNotIn(e,t,r){let i=this.addRule(Ke,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="global",this}requiredIfNotInSibling(e,t,r){let i=this.addRule(Ke,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="sibling",this}requiredWithAll(e,t){let r=this.addRule(je,t);return r.context.options.fields=e,r.context.options.scope="global",this}requiredWithAllSiblings(e,t){let r=this.addRule(je,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}requiredWithoutAll(e,t){let r=this.addRule(Ge,t);return r.context.options.fields=e,r.context.options.scope="global",this}requiredWithoutAllSiblings(e,t){let r=this.addRule(Ge,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}requiredWithAny(e,t){let r=this.addRule(Ze,t);return r.context.options.fields=e,r.context.options.scope="global",this}requiredWithAnySiblings(e,t){let r=this.addRule(Ze,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}requiredWithoutAny(e,t){let r=this.addRule(Qe,t);return r.context.options.fields=e,r.context.options.scope="global",this}requiredWithoutAnySiblings(e,t){let r=this.addRule(Qe,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}presentWith(e,t){let r=this.addRule(st,t);return r.context.options.field=e,r.context.options.scope="global",this}presentWithSibling(e,t){let r=this.addRule(st,t);return r.context.options.field=e,r.context.options.scope="sibling",this}presentWithout(e,t){let r=this.addRule(ut,t);return r.context.options.field=e,r.context.options.scope="global",this}presentWithoutSibling(e,t){let r=this.addRule(ut,t);return r.context.options.field=e,r.context.options.scope="sibling",this}presentIf(e,t,r){let i=this.addRule(Xe,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="global",this}presentIfSibling(e,t,r){let i=this.addRule(Xe,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="sibling",this}presentUnless(e,t,r){let i=this.addRule(it,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="global",this}presentUnlessSibling(e,t,r){let i=this.addRule(it,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="sibling",this}presentIfEmpty(e,t){let r=this.addRule(et,t);return r.context.options.field=e,r.context.options.scope="global",this}presentIfEmptySibling(e,t){let r=this.addRule(et,t);return r.context.options.field=e,r.context.options.scope="sibling",this}presentIfNotEmpty(e,t){let r=this.addRule(tt,t);return r.context.options.field=e,r.context.options.scope="global",this}presentIfNotEmptySibling(e,t){let r=this.addRule(tt,t);return r.context.options.field=e,r.context.options.scope="sibling",this}presentIfIn(e,t,r){let i=this.addRule(rt,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="global",this}presentIfInSibling(e,t,r){let i=this.addRule(rt,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="sibling",this}presentIfNotIn(e,t,r){let i=this.addRule(nt,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="global",this}presentIfNotInSibling(e,t,r){let i=this.addRule(nt,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="sibling",this}presentWithAll(e,t){let r=this.addRule(ot,t);return r.context.options.fields=e,r.context.options.scope="global",this}presentWithAllSiblings(e,t){let r=this.addRule(ot,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}presentWithoutAll(e,t){let r=this.addRule(lt,t);return r.context.options.fields=e,r.context.options.scope="global",this}presentWithoutAllSiblings(e,t){let r=this.addRule(lt,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}presentWithAny(e,t){let r=this.addRule(at,t);return r.context.options.fields=e,r.context.options.scope="global",this}presentWithAnySiblings(e,t){let r=this.addRule(at,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}presentWithoutAny(e,t){let r=this.addRule(ct,t);return r.context.options.fields=e,r.context.options.scope="global",this}presentWithoutAnySiblings(e,t){let r=this.addRule(ct,t);return r.context.options.fields=e,r.context.options.scope="sibling",this}async mutate(e,t){let r=e;for(let i of this.mutators)i.context.ctx=t,r=await i.mutate(r,i.context);return r}forbidden(e){return this.addRule(wt,e),this}forbiddenIf(e,t,r){let i=this.addRule(pt,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="global",this}forbiddenIfSibling(e,t,r){let i=this.addRule(pt,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="sibling",this}forbiddenIfNot(e,t,r){let i=this.addRule(dt,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="global",this}forbiddenIfNotSibling(e,t,r){let i=this.addRule(dt,r);return i.context.options.field=e,i.context.options.value=t,i.context.options.scope="sibling",this}forbiddenIfEmpty(e,t){let r=this.addRule(ft,t);return r.context.options.field=e,r.context.options.scope="global",this}forbiddenIfEmptySibling(e,t){let r=this.addRule(ft,t);return r.context.options.field=e,r.context.options.scope="sibling",this}forbiddenIfNotEmpty(e,t){let r=this.addRule(mt,t);return r.context.options.field=e,r.context.options.scope="global",this}forbiddenIfNotEmptySibling(e,t){let r=this.addRule(mt,t);return r.context.options.field=e,r.context.options.scope="sibling",this}forbiddenIfIn(e,t,r){let i=this.addRule(ht,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="global",this}forbiddenIfInSibling(e,t,r){let i=this.addRule(ht,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="sibling",this}forbiddenIfNotIn(e,t,r){let i=this.addRule(gt,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="global",this}forbiddenIfNotInSibling(e,t,r){let i=this.addRule(gt,r);return i.context.options.field=e,i.context.options.values=t,i.context.options.scope="sibling",this}when(e,t){let r=this.addRule(xe);return r.context.options.field=e,r.context.options.is=t.is,r.context.options.otherwise=t.otherwise,r.context.options.scope="global",this}whenSibling(e,t){let r=this.addRule(xe);return r.context.options.field=e,r.context.options.is=t.is,r.context.options.otherwise=t.otherwise,r.context.options.scope="sibling",this}label(e){return this.attributesText.input=e,this}async validate(e,t){if(e===null&&this.isNullable)return {isValid:true,errors:[],data:null};let r=e??this.defaultValue,i=await this.mutate(r,t),a=r,u=[],c=true,l=t.configurations?.firstErrorOnly??true,f=h(a);for(let d of this.rules){if((d.requiresValue??true)&&f)continue;this.setRuleAttributesList(d);let g=await d.validate(i,t);if(g.isValid===false&&(c=false,u.push({type:d.name,error:g.error,input:g.path??t.path}),l))break}return {isValid:c,errors:u,data:i!==void 0?await this.startTransformationPipeline(i,t):void 0}}setRuleAttributesList(e){e.context.attributesList=typeof this.attributesText[e.name]=="object"?this.attributesText[e.name]:this.attributesText;}};var Z=class extends y{};var xt=async n=>n.reverse(),Vp=async n=>n.reverse(),Zr=async(n,e)=>{if(!Array.isArray(n))return n;let t=e.options.direction??"asc",r=e.options.key??null;return n.sort((i,a)=>{if(r){let u=p(i,r),c=p(a,r);return t==="asc"?u-c:c-u}return t==="asc"?i-a:a-i})},Jr=async n=>[...new Set(n)],Ep=async n=>n.filter(e=>!h(e));var Gr=async n=>n?n instanceof Date?n:new Date(n):new Date("Invalid Date"),Op=async n=>new Date(n).toISOString(),qp=async n=>new Date(n).getTime(),Qr=async n=>{let e=new Date(n);return e.setHours(0,0,0,0),e},Xr=async n=>{let e=new Date(n);return e.setHours(23,59,59,999),e},en=async(n,e)=>{let t=new Date(n),r=e.options.days??0;return t.setDate(t.getDate()+r),t},tn=async(n,e)=>{let t=new Date(n),r=e.options.months??0;return t.setMonth(t.getMonth()+r),t},rn=async(n,e)=>{let t=new Date(n),r=e.options.years??0;return t.setFullYear(t.getFullYear()+r),t},nn=async(n,e)=>{let t=new Date(n),r=e.options.hours??0;return t.setHours(t.getHours()+r),t},sn=async n=>{let e=new Date(n);return new Date(e.toUTCString())},Cp=async(n,e)=>{let t=e.options.format??"YYYY-MM-DD";return Rt(n).format(t)},Lp=async n=>new Date(n).toISOString().split("T")[0],Np=async n=>new Date(n).toTimeString().split(" ")[0],on=async n=>{let e=new Date(n);return e.setDate(1),e.setHours(0,0,0,0),e},an=async n=>{let e=new Date(n);return e.setMonth(e.getMonth()+1),e.setDate(0),e.setHours(23,59,59,999),e},un=async n=>{let e=new Date(n);return e.setMonth(0),e.setDate(1),e.setHours(0,0,0,0),e},ln=async n=>{let e=new Date(n);return e.setMonth(11),e.setDate(31),e.setHours(23,59,59,999),e};var cn=async n=>n&&Number(n),Pp=async(n,e)=>le(n,e.options.decimals??2),Up=async n=>n==="true"?true:n==="false"?false:!!n,pn=async n=>isNumeric(n)?Number(n):n;var fn=async(n,e)=>{let t=[...e.ctx.schema?Object.keys(e.ctx.schema):[],...e.options.allowedKeys??[]],r={};for(let i in n)t.includes(i)&&(r[i]=n[i]);return r},J=async(n,e)=>{if(!isPlainObject(n))return n;let t={},r=e.options.recursive??false;for(let i in n){let a=n[i];r?Array.isArray(a)?t[i]=await Promise.all(a.map(async u=>typeof u=="string"?w(u):await J(u,e))):isPlainObject(a)?t[i]=await J(a,e):t[i]=typeof a=="string"?w(a):a:t[i]=typeof a=="string"?w(a):a;}return t},_p=async n=>{try{return JSON.parse(n)}catch{return n}};var zp=async n=>n&&String(n);var mn=async n=>n?.toString().toLowerCase(),hn=async n=>n?.toString().toUpperCase(),gn=async n=>{let e=n?.toString();return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},bn=async n=>A(n?.toString()),yn=async n=>{if(!n&&n!==0)return "";if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n)},xn=async(n,e)=>w(n?.toString(),e.options.needle??" "),Rn=async n=>n?.toString().replace(/<[^>]*>?/gm,""),Mn=async n=>n?.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Sn=async n=>n?.toString().replace(/[^a-zA-Z0-9]/g,""),Dn=async n=>decodeURIComponent(n),Tn=async n=>encodeURIComponent(n),wn=async n=>he(n?.toString()),vn=async n=>be(n?.toString()),Vn=async n=>N(n?.toString()),En=async n=>ge(n?.toString()),An=async n=>n?.toString().toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/--+/g,"-").replace(/^-+|-+$/g,""),In=async(n,e)=>fe(n?.toString(),e.options.needle??" "),On=async(n,e)=>U(n?.toString(),e.options.needle??" "),qn=async n=>Buffer.from(n?.toString()).toString("base64"),Cn=async n=>Buffer.from(n?.toString(),"base64").toString("utf-8"),Ln=async(n,e)=>{let{search:t,replace:r}=e.options;return t?n?.toString().replace(t,r??""):n?.toString()},Nn=async(n,e)=>{let{search:t,replace:r}=e.options;if(!t)return n?.toString();let i=typeof t=="string"?new RegExp(t,"g"):t;return n?.toString().replace(i,r??"")},Wn=async(n,e)=>{let t=e?.options?.suffix??"";return n?.toString()+t},Fn=async(n,e)=>(e?.options?.prefix??"")+n?.toString(),kn=async n=>n?.toString().split("").reverse().join(""),Pn=async(n,e)=>{let t=n?.toString(),r=e?.options?.maxLength??100,i=e?.options?.suffix??"...";return me(t,r,i)},Un=async n=>n?.toString().replace(/\s+/g," "),Yn=async(n,e)=>{let t=e?.options?.length??0,r=e?.options?.char??" ";return n?.toString().padStart(t,r)},Hn=async(n,e)=>{let t=e?.options?.length??0,r=e?.options?.char??" ";return n?.toString().padEnd(t,r)},Bn=async(n,e)=>{let t=e?.options?.count??1;return n?.toString()?.repeat(t)},_n=async(n,e)=>{let t=n?.toString(),r=e?.options?.char??"*",i=e?.options?.start??0,a=e?.options?.end??t?.length,u=t?.substring(0,i),c=t?.substring(a),l=a-i;return u+r.repeat(l)+c},Kn=async n=>n?.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"),zn=async n=>n.toString().replace(/[^a-zA-Z]/g,""),$n=async n=>n.toString().replace(/[^a-zA-Z0-9]/g,""),jn=async n=>n.toString().replace(/[0-9]/g,"");var G=class extends y{constructor(t,r){super();this.validator=t;this.addRule(j,r);}matchesType(t){return Array.isArray(t)}clone(){let t=super.clone();return t.validator=this.validator.clone(),t}flip(){return this.addMutator(xt)}reverse(){return this.addMutator(xt)}onlyUnique(){return this.addMutator(Jr)}sort(t="asc",r){return this.addMutator(Zr,{direction:t,key:r}),this}minLength(t,r){let i=this.addRule(H,r);return i.context.options.minLength=t,this}maxLength(t,r){let i=this.addRule(B,r);return i.context.options.maxLength=t,this}length(t,r){let i=this.addRule(K,r);return i.context.options.length=t,this}between(t,r,i){let a=this.addRule(_,i);return a.context.options.minLength=t,a.context.options.maxLength=r,this}lengthBetween(t,r,i){return this.between(t,r,i)}unique(){return this.addRule(Xt),this}sorted(t="asc"){let r=this.addRule(er);return r.context.options.direction=t,this}mutate(t,r){return Array.isArray(t)?super.mutate([...t],r):t}async validate(t,r){let i=await this.mutate(t,r)||[],a=await super.validate(t,r);if(a.isValid===false)return a;let u=[],c=i.map(async(l,f)=>{let d={...r,parent:i,value:l,key:f.toString(),path:V(r.path,f.toString())},g=await this.validator.validate(l,d);i[f]=g.data,g.isValid===false&&u.push(...g.errors);});return await Promise.all(c),{isValid:u.length===0,errors:u,data:await this.startTransformationPipeline(i,r)}}};var q=n=>["1","true","yes","y","on",1,true,"Yes","Y","On"].includes(n),Zn={name:"accepted",defaultErrorMessage:"The :input must be accepted",description:"The value must be accepted if it equals: 1 | '1' | true | 'true' | 'yes' | 'y' | 'on' | 1 | true | 'Yes' | 'Y' | 'On'",async validate(n,e){return q(n)?s:o(this,e)}},Jn={name:"acceptedIf",description:"The field must be accepted if another field's value equals to a specific value",defaultErrorMessage:"The :input must be accepted",async validate(n,e){let t=m(this,e),{value:r}=this.context.options;return t!==r?o(this,e):q(n)?s:o(this,e)}},Gn={name:"acceptedUnless",description:"The field must be accepted if another field's value is not equal to a specific value",defaultErrorMessage:"The :input must be accepted",async validate(n,e){let t=m(this,e),{value:r}=this.context.options;return t===r?o(this,e):q(n)?s:o(this,e)}},Qn={name:"acceptedIfRequired",description:"The field must be accepted if another field is required",defaultErrorMessage:"The :input must be accepted",async validate(n,e){let t=m(this,e);return h(t)?o(this,e):q(n)?s:o(this,e)}},Xn={name:"acceptedIfPresent",description:"The field must be accepted if another field is present",defaultErrorMessage:"The :input must be accepted",async validate(n,e){return m(this,e)===void 0?o(this,e):q(n)?s:o(this,e)}},ei={name:"acceptedWithout",description:"The field must be accepted if another field is missing",defaultErrorMessage:"The :input must be accepted",async validate(n,e){return m(this,e)!==void 0?o(this,e):q(n)?s:o(this,e)}};var C=n=>["0","false","no","n","off",0,false,"No","N","Off"].includes(n),ti={name:"declined",defaultErrorMessage:"The :input must be declined",description:"The value must be declined if it equals: 0 | '0' | false | 'false' | 'no' | 'n' | 'off' | 0 | false | 'No' | 'N' | 'Off'",async validate(n,e){return C(n)?s:o(this,e)}},ri={name:"declinedIf",description:"The field must be declined if another field's value equals to a specific value",defaultErrorMessage:"The :input must be declined",async validate(n,e){let t=m(this,e),{value:r}=this.context.options;return t!==r?o(this,e):C(n)?s:o(this,e)}},ni={name:"declinedUnless",description:"The field must be declined if another field's value is not equal to a specific value",defaultErrorMessage:"The :input must be declined",async validate(n,e){let t=m(this,e),{value:r}=this.context.options;return t===r?o(this,e):C(n)?s:o(this,e)}},ii={name:"declinedIfRequired",description:"The field must be declined if another field is required",defaultErrorMessage:"The :input must be declined",async validate(n,e){let t=m(this,e);return h(t)?o(this,e):C(n)?s:o(this,e)}},si={name:"declinedIfPresent",description:"The field must be declined if another field is present",defaultErrorMessage:"The :input must be declined",async validate(n,e){return m(this,e)===void 0?o(this,e):C(n)?s:o(this,e)}},oi={name:"declinedWithout",description:"The field must be declined if another field is missing",defaultErrorMessage:"The :input must be declined",async validate(n,e){return m(this,e)!==void 0?o(this,e):C(n)?s:o(this,e)}};var b=class extends y{constructor(e){super(),this.addRule($r,e);}matchesType(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}asNumber(){return this.addMutator(cn),this}accepted(e){return this.addRule(Zn,e),this}acceptedIf(e,t,r){let i=this.addRule(Jn,r);return i.context.options.field=e,i.context.options.value=t,this}acceptedUnless(e,t,r){let i=this.addRule(Gn,r);return i.context.options.field=e,i.context.options.value=t,this}acceptedIfRequired(e,t){let r=this.addRule(Qn,t);return r.context.options.field=e,this}acceptedIfPresent(e,t){let r=this.addRule(Xn,t);return r.context.options.field=e,this}acceptedWithout(e,t){let r=this.addRule(ei,t);return r.context.options.field=e,this}declined(e){return this.addRule(ti,e),this}declinedIf(e,t,r){let i=this.addRule(ri,r);return i.context.options.field=e,i.context.options.value=t,this}declinedUnless(e,t,r){let i=this.addRule(ni,r);return i.context.options.field=e,i.context.options.value=t,this}declinedIfRequired(e,t){let r=this.addRule(ii,t);return r.context.options.field=e,this}declinedIfPresent(e,t){let r=this.addRule(si,t);return r.context.options.field=e,this}declinedWithout(e,t){let r=this.addRule(oi,t);return r.context.options.field=e,this}enum(e,t){let r=this.addRule(kr,t);return r.context.options.enum=Object.values(e),this}in(e,t){let r=this.addRule(Pr,t);return r.context.options.values=e,this}oneOf(e,t){return this.in(e,t)}allowsOnly(e,t){let r=this.addRule(Ur,t);return r.context.options.allowedValues=e,this}forbids(e,t){let r=this.addRule(Yr,t);return r.context.options.notAllowedValues=e,this}notIn(e,t){return this.forbids(e,t)}};var Q=class extends y{constructor(t){super();this.accepted=b.prototype.accepted;this.acceptedIf=b.prototype.acceptedIf;this.acceptedUnless=b.prototype.acceptedUnless;this.acceptedIfRequired=b.prototype.acceptedIfRequired;this.acceptedIfPresent=b.prototype.acceptedIfPresent;this.acceptedWithout=b.prototype.acceptedWithout;this.declined=b.prototype.declined;this.declinedIf=b.prototype.declinedIf;this.declinedUnless=b.prototype.declinedUnless;this.declinedIfRequired=b.prototype.declinedIfRequired;this.declinedIfPresent=b.prototype.declinedIfPresent;this.declinedWithout=b.prototype.declinedWithout;this.addRule(_r,t);}matchesType(t){return typeof t=="boolean"}mustBeTrue(t){return this.equal(true,t)}mustBeFalse(t){return this.equal(false,t)}};var D=class extends y{constructor(t,r){super();this.callback=t;this.resultValidator=r;}async validate(t,r){try{let i=await this.callback(t,r);if(this.resultValidator){let a=await this.resultValidator.validate(i,r);return a.isValid?{isValid:!0,errors:[],data:a.data}:{isValid:!1,errors:a.errors,data:void 0}}return {isValid:!0,errors:[],data:i}}catch(i){return {isValid:false,errors:[{type:"computed",error:i instanceof Error?i.message:"Computed field callback failed",input:r.path}],data:void 0}}}clone(){let t=super.clone();return t.callback=this.callback,t.resultValidator=this.resultValidator?.clone(),t}matchesType(t){return true}};var X=class extends y{constructor(e){super(),this.addMutator(Gr),this.addRule(ve,e);}matchesType(e){return v(e)}toISOString(){return this.addTransformer(e=>e instanceof Date?e.toISOString():e),this}toTimestamp(){return this.addTransformer(e=>e instanceof Date?e.getTime():e),this}toFormat(e){return this.addTransformer((t,{options:r})=>t instanceof Date?Rt(t).format(r.format):t,{format:e}),this}toDateOnly(){return this.addTransformer(e=>e instanceof Date?Rt(e).format("YYYY-MM-DD"):e),this}toTimeOnly(){return this.addTransformer(e=>e instanceof Date?Rt(e).format("HH:mm:ss"):e),this}toStartOfDay(){return this.addMutator(Qr),this}toEndOfDay(){return this.addMutator(Xr),this}addDays(e){return this.addMutator(en,{days:e}),this}addMonths(e){return this.addMutator(tn,{months:e}),this}addYears(e){return this.addMutator(rn,{years:e}),this}addHours(e){return this.addMutator(nn,{hours:e}),this}toUTC(){return this.addMutator(sn),this}toStartOfMonth(){return this.addMutator(on),this}toEndOfMonth(){return this.addMutator(an),this}toStartOfYear(){return this.addMutator(un),this}toEndOfYear(){return this.addMutator(ln),this}min(e,t){let r=this.addRule(Ve,t);return r.context.options.dateOrField=e,r.context.options.scope="global",this}max(e,t){let r=this.addRule(Ee,t);return r.context.options.dateOrField=e,r.context.options.scope="global",this}before(e,t){let r=this.addRule(Ae,t);return r.context.options.dateOrField=e,r.context.options.scope="global",this}after(e,t){let r=this.addRule(Ie,t);return r.context.options.dateOrField=e,r.context.options.scope="global",this}between(e,t,r){let i=this.addRule(fr,r);return i.context.options.startDate=e,i.context.options.endDate=t,this}today(e){return this.addRule(mr,e),this}fromToday(e){return this.addRule(tr,e),this}beforeToday(e){return this.addRule(rr,e),this}afterToday(e){return this.addRule(br,e),this}past(e){return this.addRule(hr,e),this}future(e){return this.addRule(gr,e),this}minSibling(e,t){let r=this.addRule(Ve,t);return r.context.options.dateOrField=e,r.context.options.scope="sibling",this}maxSibling(e,t){let r=this.addRule(Ee,t);return r.context.options.dateOrField=e,r.context.options.scope="sibling",this}beforeSibling(e,t){let r=this.addRule(Ae,t);return r.context.options.dateOrField=e,r.context.options.scope="sibling",this}afterSibling(e,t){let r=this.addRule(Ie,t);return r.context.options.dateOrField=e,r.context.options.scope="sibling",this}sameAsField(e,t){let r=this.addRule(Oe,t);return r.context.options.field=e,r.context.options.scope="global",this}sameAsFieldSibling(e,t){let r=this.addRule(Oe,t);return r.context.options.field=e,r.context.options.scope="sibling",this}fromHour(e,t){let r=this.addRule(nr,t);return r.context.options.hour=e,this}beforeHour(e,t){let r=this.addRule(ir,t);return r.context.options.hour=e,this}betweenHours(e,t,r){let i=this.addRule(sr,r);return i.context.options.startHour=e,i.context.options.endHour=t,this}fromMinute(e,t){let r=this.addRule(or,t);return r.context.options.minute=e,this}beforeMinute(e,t){let r=this.addRule(ar,t);return r.context.options.minute=e,this}betweenMinutes(e,t,r){let i=this.addRule(ur,r);return i.context.options.startMinute=e,i.context.options.endMinute=t,this}betweenTimes(e,t,r){let i=this.addRule(Tr,r);return i.context.options.startTime=e,i.context.options.endTime=t,this}age(e,t){let r=this.addRule(lr,t);return r.context.options.years=e,this}minAge(e,t){let r=this.addRule(cr,t);return r.context.options.years=e,this}maxAge(e,t){let r=this.addRule(pr,t);return r.context.options.years=e,this}betweenAge(e,t,r){let i=this.addRule(Ar,r);return i.context.options.minAge=e,i.context.options.maxAge=t,this}weekDay(e,t){let r=this.addRule(dr,t);return r.context.options.day=e,this}weekdays(e,t){let r=this.addRule(xr,t);return r.context.options.days=e,this}weekend(e){return this.addRule(yr,e),this}businessDay(e){return this.addRule(Rr,e),this}format(e,t){let r=this.addRule(ve,t);return r.context.options.format=e,this}withinDays(e,t){let r=this.addRule(wr,t);return r.context.options.days=e,this}withinPastDays(e,t){let r=this.addRule(vr,t);return r.context.options.days=e,this}withinFutureDays(e,t){let r=this.addRule(Vr,t);return r.context.options.days=e,this}month(e,t){let r=this.addRule(Mr,t);return r.context.options.month=e,this}year(e,t){let r=this.addRule(Sr,t);return r.context.options.year=e,this}betweenYears(e,t,r){let i=this.addRule(qe,r);return i.context.options.startYear=e,i.context.options.endYear=t,i.context.options.scope="global",this}betweenMonths(e,t,r){let i=this.addRule(Ce,r);return i.context.options.startMonth=e,i.context.options.endMonth=t,i.context.options.scope="global",this}betweenDays(e,t,r){let i=this.addRule(Le,r);return i.context.options.startDay=e,i.context.options.endDay=t,i.context.options.scope="global",this}betweenYearsSibling(e,t,r){let i=this.addRule(qe,r);return i.context.options.startYear=e,i.context.options.endYear=t,i.context.options.scope="sibling",this}betweenMonthsSibling(e,t,r){let i=this.addRule(Ce,r);return i.context.options.startMonth=e,i.context.options.endMonth=t,i.context.options.scope="sibling",this}betweenDaysSibling(e,t,r){let i=this.addRule(Le,r);return i.context.options.startDay=e,i.context.options.endDay=t,i.context.options.scope="sibling",this}minYear(e,t){let r=this.addRule(Ne,t);return r.context.options.yearOrField=e,r.context.options.scope="global",this}maxYear(e,t){let r=this.addRule(We,t);return r.context.options.yearOrField=e,r.context.options.scope="global",this}minMonth(e,t){let r=this.addRule(Fe,t);return r.context.options.monthOrField=e,r.context.options.scope="global",this}maxMonth(e,t){let r=this.addRule(ke,t);return r.context.options.monthOrField=e,r.context.options.scope="global",this}minDay(e,t){let r=this.addRule(Pe,t);return r.context.options.dayOrField=e,r.context.options.scope="global",this}maxDay(e,t){let r=this.addRule(Ue,t);return r.context.options.dayOrField=e,r.context.options.scope="global",this}minYearSibling(e,t){let r=this.addRule(Ne,t);return r.context.options.yearOrField=e,r.context.options.scope="sibling",this}maxYearSibling(e,t){let r=this.addRule(We,t);return r.context.options.yearOrField=e,r.context.options.scope="sibling",this}minMonthSibling(e,t){let r=this.addRule(Fe,t);return r.context.options.monthOrField=e,r.context.options.scope="sibling",this}maxMonthSibling(e,t){let r=this.addRule(ke,t);return r.context.options.monthOrField=e,r.context.options.scope="sibling",this}minDaySibling(e,t){let r=this.addRule(Pe,t);return r.context.options.dayOrField=e,r.context.options.scope="sibling",this}maxDaySibling(e,t){let r=this.addRule(Ue,t);return r.context.options.dayOrField=e,r.context.options.scope="sibling",this}quarter(e,t){let r=this.addRule(Dr,t);return r.context.options.quarter=e,this}birthday(e,t,r){let i=this.addRule(Er,r);return e!==void 0&&(i.context.options.minAge=e),t!==void 0&&(i.context.options.maxAge=t),this}leapYear(e){return this.addRule(Ir,e),this}};var T=class extends y{constructor(t){super();this.enum=b.prototype.enum;this.in=b.prototype.in;this.oneOf=b.prototype.in;this.allowsOnly=b.prototype.allowsOnly;this.forbids=b.prototype.forbids;this.notIn=b.prototype.forbids;this.addRule(Hr,t);}matchesType(t){return typeof t=="string"}toString(){return this.addMutator(yn),this}uppercase(){return this.addMutator(hn),this}lowercase(){return this.addMutator(mn),this}capitalize(){return this.addMutator(gn),this}titleCase(){return this.addMutator(bn),this}camelCase(){return this.addMutator(wn),this}pascalCase(){return this.addMutator(vn),this}snakeCase(){return this.addMutator(Vn),this}kebabCase(){return this.addMutator(En),this}trim(t){return this.addMutator(xn,{needle:t}),this}ltrim(t){return this.addMutator(In,{needle:t}),this}rtrim(t){return this.addMutator(On,{needle:t}),this}trimMultipleWhitespace(){return this.addMutator(Un),this}padStart(t,r=" "){return this.addMutator(Yn,{length:t,char:r}),this}padEnd(t,r=" "){return this.addMutator(Hn,{length:t,char:r}),this}safeHtml(){return this.addMutator(Rn),this}htmlEscape(){return this.addMutator(Mn)}unescapeHtml(){return this.addMutator(Kn),this}removeSpecialCharacters(){return this.addMutator(Sn),this}toAlpha(){return this.addMutator(zn),this}toAlphanumeric(){return this.addMutator($n),this}removeNumbers(){return this.addMutator(jn),this}urlDecode(){return this.addMutator(Dn),this}urlEncode(){return this.addMutator(Tn),this}slug(){return this.addMutator(An),this}base64Encode(){return this.addMutator(qn),this}base64Decode(){return this.addMutator(Cn),this}replace(t,r){return this.addMutator(Ln,{search:t,replace:r}),this}replaceAll(t,r){return this.addMutator(Nn,{search:t,replace:r}),this}append(t){return this.addMutator(Wn,{suffix:t}),this}prepend(t){return this.addMutator(Fn,{prefix:t}),this}reverse(){return this.addMutator(kn),this}truncate(t,r="..."){return this.addMutator(Pn,{maxLength:t,suffix:r}),this}repeat(t){return this.addMutator(Bn,{count:t}),this}mask(t,r,i="*"){return this.addMutator(_n,{start:t,end:r,char:i}),this}email(t){return this.addRule(Ct,t),this}url(t){return this.addRule(Bt,t),this}withoutWhitespace(t){return this.addRule(_t,t),this}pattern(t,r){let i=this.addRule(Ft,r);return i.context.options.pattern=t,this}strongPassword(t,r){let i=this.addRule(Ht,r);return i.context.options.minLength=t,this}words(t,r){let i=this.addRule(Qt,r);return i.context.options.words=t,this}minWords(t,r){let i=this.addRule(Jt,r);return i.context.options.minWords=t,this}maxWords(t,r){let i=this.addRule(Gt,r);return i.context.options.maxWords=t,this}minLength(t,r){let i=this.addRule(H,r);return i.context.options.minLength=t,this}min(t,r){return this.minLength(t,r)}maxLength(t,r){let i=this.addRule(B,r);return i.context.options.maxLength=t,this}max(t,r){return this.maxLength(t,r)}length(t,r){let i=this.addRule(K,r);return i.context.options.length=t,this}between(t,r,i){let a=this.addRule(_,i);return a.context.options.minLength=t,a.context.options.maxLength=r,this}lengthBetween(t,r,i){return this.between(t,r,i)}alpha(t){return this.addRule(At,t),this}alphanumeric(t){return this.addRule(It,t),this}numeric(t){return this.addRule(Ot,t),this}startsWith(t,r){let i=this.addRule(kt,r);return i.context.options.value=t,this}endsWith(t,r){let i=this.addRule(Pt,r);return i.context.options.value=t,this}contains(t,r){let i=this.addRule(Ut,r);return i.context.options.value=t,this}notContains(t,r){let i=this.addRule(Yt,r);return i.context.options.value=t,this}ip(t){return this.addRule(Lt,t),this}ip4(t){return this.addRule(Nt,t),this}ip6(t){return this.addRule(Wt,t),this}creditCard(t){return this.addRule(qt,t),this}color(t){return this.addRule(Or,t),this}hexColor(t){return this.addRule(qr,t),this}hslColor(t){return this.addRule(Nr,t),this}rgbColor(t){return this.addRule(Cr,t),this}rgbaColor(t){return this.addRule(Lr,t),this}lightColor(t){return this.addRule(Wr,t),this}darkColor(t){return this.addRule(Fr,t),this}};var M=class extends y{constructor(t){super();this.enum=b.prototype.enum;this.in=b.prototype.in;this.oneOf=b.prototype.in;this.allowsOnly=b.prototype.allowsOnly;this.forbids=b.prototype.forbids;this.notIn=b.prototype.forbids;this.length=T.prototype.length;this.minLength=T.prototype.minLength;this.maxLength=T.prototype.maxLength;this.addRule(Br,t);}matchesType(t){return typeof t=="number"&&!isNaN(t)}min(t,r){let i=this.addRule(Me,r);return i.context.options.min=t,i.context.options.scope="global",this}max(t,r){let i=this.addRule(Se,r);return i.context.options.max=t,i.context.options.scope="global",this}minSibling(t,r){let i=this.addRule(Me,r);return i.context.options.min=t,i.context.options.scope="sibling",this}maxSibling(t,r){let i=this.addRule(Se,r);return i.context.options.max=t,i.context.options.scope="sibling",this}greaterThan(t,r){let i=this.addRule(De,r);return i.context.options.value=t,i.context.options.scope="global",this}lessThan(t,r){let i=this.addRule(Te,r);return i.context.options.value=t,i.context.options.scope="global",this}gt(t,r){return this.greaterThan(t,r)}lt(t,r){return this.lessThan(t,r)}greaterThanSibling(t,r){let i=this.addRule(De,r);return i.context.options.value=t,i.context.options.scope="sibling",this}gtSibling(t,r){return this.greaterThanSibling(t,r)}lessThanSibling(t,r){let i=this.addRule(Te,r);return i.context.options.value=t,i.context.options.scope="sibling",this}ltSibling(t,r){return this.lessThanSibling(t,r)}modulo(t,r){let i=this.addRule(Zt,r);return i.context.options.value=t,this}positive(t){return this.addRule(Kt,t),this}negative(t){return this.addRule(zt,t),this}odd(t){return this.addRule($t,t),this}even(t){return this.addRule(jt,t),this}between(t,r,i){let a=this.addRule(we,i);return a.context.options.min=t,a.context.options.max=r,a.context.options.scope="global",this}betweenSibling(t,r,i){let a=this.addRule(we,i);return a.context.options.min=t,a.context.options.max=r,a.context.options.scope="sibling",this}};var ee=class extends M{constructor(e){super(),this.addRule(zr,e);}};var te=class extends M{constructor(e){super(),this.addRule(Kr,e);}};var re=class extends D{constructor(e,t){let r=(i,a)=>e(a);super(r,t);}};var ne=class extends M{constructor(e){super(e),this.addMutator(pn);}matchesType(e){return isNumeric(e)}};var ie=class n extends y{constructor(t,r){super();this.schema=t;this.shouldAllowUnknown=false;this.allowedKeys=[];this.addRule($,r);}matchesType(t){return isPlainObject(t)}stripUnknown(){let t=this;return this.addMutator(fn,{get allowedKeys(){return t.allowedKeys}}),this}allow(...t){return this.allowedKeys.push(...t),this}trim(t=true){return this.addMutator(J,{recursive:t}),this}allowUnknown(t=true){return this.shouldAllowUnknown=t,this}clone(t){let r=super.clone(),i={};for(let a in this.schema)t&&!t.includes(a)||(i[a]=this.schema[a].clone());return r.schema=i,r.shouldAllowUnknown=this.shouldAllowUnknown,r.allowedKeys=[...this.allowedKeys],r}extend(t){let r=this.clone(),i=t instanceof n?t.schema:t;for(let a in i)r.schema[a]=i[a].clone();return r}merge(t){let r=this.clone();for(let i in t.schema)r.schema[i]=t.schema[i].clone();return r.shouldAllowUnknown=t.shouldAllowUnknown,r.allowedKeys=[...r.allowedKeys,...t.allowedKeys],r.rules.push(...t.rules),r.mutators.push(...t.mutators),r.dataTransformers.push(...t.dataTransformers),r.attributesText={...r.attributesText,...t.attributesText},r.translatedAttributes={...r.translatedAttributes,...t.translatedAttributes},r}pick(...t){let r=this.clone(),i={};for(let a of t)a in r.schema&&(i[a]=r.schema[a]);return r.schema=i,r}without(...t){let r=this.clone(),i={};for(let a in r.schema)t.includes(a)||(i[a]=r.schema[a]);return r.schema=i,r}mutate(t,r){return isPlainObject(t)?super.mutate({...t},r):t}async validate(t,r){r.schema=this.schema;let i=await this.mutate(t,r);if(this.shouldAllowUnknown===false){let x=this.addRule(jr);x.context.options.allowedKeys=this.allowedKeys,x.context.options.schema=this.schema,this.setRuleAttributesList(x);}let a=await super.validate(i,r);if(a.isValid===false||t===void 0)return a;let u=[],c={},f=Object.keys(this.schema).filter(x=>!this.isComputedValidator(this.schema[x])).map(async x=>{let I=this.schema[x],k=i?.[x]!==void 0?i[x]:I.getDefaultValue(),O={...r,parent:i,value:k,key:x,path:V(r.path,x)},P=await I.validate(k,O);P.data!==void 0&&!I.isOmitted()&&(c[x]=P.data),P.isValid===false&&u.push(...P.errors);});if(await Promise.all(f),u.length>0)return {isValid:false,errors:u,data:void 0};let d=this.getComputedFields(),g=Object.keys(d).map(async x=>{let I=d[x],k={...r,parent:c,value:void 0},O=await I.validate(c,k);O.data!==void 0&&!I.isOmitted()&&(c[x]=O.data),O.isValid===false&&u.push(...O.errors);});if(await Promise.all(g),u.length>0)return {isValid:false,errors:u,data:void 0};let ue=St(c),F=await this.startTransformationPipeline(ue,r),ui=this.shouldAllowUnknown===false?F:{...F,...pe(i,Object.keys(this.schema))};return {isValid:true,errors:[],data:ui}}isComputedValidator(t){return t instanceof D}getComputedFields(){let t={};for(let[r,i]of Object.entries(this.schema))i instanceof D&&(t[r]=i);return t}};function St(n,e=new WeakMap){if(n===null)return n;if(Array.isArray(n))return n.map(r=>St(r,e));if(!isPlainObject(n))return n;if(e.has(n))return e.get(n);let t={};e.set(n,t);for(let[r,i]of Object.entries(n))i!==void 0&&(t[r]=St(i,e));return t}var se=class extends y{constructor(t,r){super();this.valueValidator=t;this.addRule($,r);}matchesType(t){return isPlainObject(t)}clone(){let t=super.clone();return t.valueValidator=this.valueValidator.clone(),t}async validate(t,r){let i=await this.mutate(t,r)||{},a=await super.validate(t,r);if(a.isValid===false)return a;let u=[],l=Object.keys(i).map(async f=>{let d={...r,parent:i,value:i[f],key:f,path:V(r.path,f)},g=await this.valueValidator.validate(i[f],d);i[f]=g.data,g.isValid===false&&u.push(...g.errors);});return await Promise.all(l),{isValid:u.length===0,errors:u,data:await this.startTransformationPipeline(i,r)}}};var oe=class extends y{constructor(t,r){super();this.validators=t;this.addRule(j,r);}matchesType(t){return Array.isArray(t)}clone(){let t=super.clone();return t.validators=this.validators.map(r=>r.clone()),t}async validate(t,r){let i=await this.mutate(t,r)||[],a=await super.validate(t,r);if(a.isValid===false)return a;let u=[];if(i.length!==this.validators.length)return u.push({type:"tuple",input:r.key||"value",error:`Expected exactly ${this.validators.length} items, but got ${i.length}`}),{isValid:false,errors:u,data:i};let c=this.validators.map(async(l,f)=>{let d={...r,parent:i,value:i[f],key:f.toString(),path:V(r.path,f.toString())},g=await l.validate(i[f],d);i[f]=g.data,g.isValid===false&&u.push(...g.errors);});return await Promise.all(c),{isValid:u.length===0,errors:u,data:await this.startTransformationPipeline(i,r)}}};var ae=class extends y{union(e,t){let r=this.addRule(Et,t);return r.context.options.validators=e,this}};var ai=async(n,e,{context:t,...r}=Y()||{})=>{let i={allValues:e,parent:null,value:e,key:"",path:"",context:t,rootContext:t,translateRule(a){return r.translateRule?.(a)??""},translateAttribute(a){return r.translateAttribute?.(a)??""},configurations:r};return await n.validate(e,i)};var rm={object:(n,e)=>new ie(n,e),any:()=>new Z,array:(n,e)=>new G(n,e),record:(n,e)=>new se(n,e),tuple:(n,e)=>new oe(n,e),date:n=>new X(n),string:n=>new T(n),email:(n,e)=>new T(e).email(n),enum:(n,e)=>new b().enum(n,e),number:n=>new M(n),numeric:n=>new ne(n),int:n=>new te(n),float:n=>new ee(n),boolean:n=>new Q(n),scalar:n=>new b(n),union:(n,e)=>new ae().union(n,e),computed:(n,e)=>new D(n,e),managed:(n,e)=>new re(n,e),validate:ai};var L=new Map;async function am(n){if(L.has(n.name)){console.warn(`[Seal] Plugin "${n.name}" is already installed`);return}let e={name:n.name,version:n.version};await n.install(e),L.set(n.name,n);}async function um(n){let e=L.get(n);if(!e){console.warn(`[Seal] Plugin "${n}" is not installed`);return}e.uninstall&&await e.uninstall(),L.delete(n),console.log(`[Seal] \u274C Plugin "${n}" uninstalled`);}function lm(n){return L.has(n)}function cm(){return Array.from(L.values())}export{Z as AnyValidator,G as ArrayValidator,y as BaseValidator,Q as BooleanValidator,D as ComputedValidator,X as DateValidator,ee as FloatValidator,te as IntValidator,re as ManagedValidator,M as NumberValidator,ne as NumericValidator,ie as ObjectValidator,se as RecordValidator,b as ScalarValidator,T as StringValidator,oe as TupleValidator,ae as UnionValidator,s as VALID_RULE,z as WEEK_DAYS,en as addDaysMutator,nn as addHoursMutator,tn as addMonthsMutator,rn as addYearsMutator,Ie as afterFieldRule,br as afterTodayRule,lr as ageRule,Ur as allowedValuesRule,It as alphaNumericRule,zn as alphaOnlyMutator,At as alphaRule,$n as alphanumericOnlyMutator,Wn as appendMutator,j as arrayRule,Cn as base64DecodeMutator,qn as base64EncodeMutator,Ae as beforeFieldRule,ir as beforeHourRule,ar as beforeMinuteRule,rr as beforeTodayRule,Ar as betweenAgeRule,fr as betweenDatesRule,Le as betweenDaysRule,sr as betweenHoursRule,_ as betweenLengthRule,ur as betweenMinutesRule,Ce as betweenMonthsRule,we as betweenNumbersRule,Tr as betweenTimesRule,qe as betweenYearsRule,Er as birthdayRule,Up as booleanMutator,_r as booleanRule,Rr as businessDayRule,wn as camelCaseMutator,gn as capitalizeMutator,Or as colorRule,Ba as configureSeal,Ut as containsRule,Fr as darkColorRule,Gr as dateMutator,ve as dateRule,Ct as emailRule,Pt as endsWithRule,kr as enumRule,Tt as equalRule,bt as equalsFieldRule,jt as evenRule,xt as flipArrayMutator,zr as floatRule,ft as forbiddenIfEmptyRule,ht as forbiddenIfInRule,mt as forbiddenIfNotEmptyRule,gt as forbiddenIfNotInRule,dt as forbiddenIfNotRule,pt as forbiddenIfRule,wt as forbiddenRule,nr as fromHourRule,or as fromMinuteRule,tr as fromTodayRule,gr as futureRule,m as getFieldValue,cm as getInstalledPlugins,Y as getSealConfig,De as greaterThanRule,lm as hasPlugin,qr as hexColorRule,Nr as hslColorRule,Mn as htmlEscapeMutator,ye as humanizeSize,Pr as inRule,Kr as intRule,o as invalidRule,Nt as ip4Rule,Wt as ip6Rule,Lt as ipRule,qt as isCreditCardRule,v as isDateValue,Ot as isNumericRule,_p as jsonMutator,En as kebabCaseMutator,Ir as leapYearRule,K as lengthRule,Te as lessThanRule,Wr as lightColorRule,mn as lowercaseMutator,In as ltrimMutator,_n as maskMutator,Cu as matchesRule,pr as maxAgeRule,Ee as maxDateRule,Ue as maxDayRule,Xl as maxFileSizeRule,Jl as maxHeightRule,B as maxLengthRule,ke as maxMonthRule,Se as maxRule,jl as maxWidthRule,Gt as maxWordsRule,We as maxYearRule,cr as minAgeRule,Ve as minDateRule,Pe as minDayRule,ec as minFileSizeRule,Zl as minHeightRule,H as minLengthRule,Fe as minMonthRule,Me as minRule,$l as minWidthRule,Jt as minWordsRule,Ne as minYearRule,Zt as moduloRule,Mr as monthRule,zt as negativeRule,Yr as notAllowedValuesRule,Yt as notContainsRule,yt as notEqualsFieldRule,cn as numberMutator,Br as numberRule,pn as numericMutator,$ as objectRule,J as objectTrimMutator,$t as oddRule,Hn as padEndMutator,Yn as padStartMutator,vn as pascalCaseMutator,hr as pastRule,Ft as patternRule,Kt as positiveRule,Fn as prependMutator,et as presentIfEmptyRule,rt as presentIfInRule,tt as presentIfNotEmptyRule,nt as presentIfNotInRule,Xe as presentIfRule,Vt as presentRule,it as presentUnlessRule,ot as presentWithAllRule,at as presentWithAnyRule,st as presentWithRule,lt as presentWithoutAllRule,ct as presentWithoutAnyRule,ut as presentWithoutRule,Dr as quarterRule,am as registerPlugin,Ep as removeEmptyArrayElementsMutator,jn as removeNumbersMutator,Sn as removeSpecialCharactersMutator,Bn as repeatMutator,Nn as replaceAllMutator,Ln as replaceMutator,He as requiredIfEmptyRule,_e as requiredIfInRule,Be as requiredIfNotEmptyRule,Ke as requiredIfNotInRule,Ye as requiredIfRule,vt as requiredRule,ze as requiredUnlessRule,je as requiredWithAllRule,Ze as requiredWithAnyRule,$e as requiredWithRule,Ge as requiredWithoutAllRule,Qe as requiredWithoutAnyRule,Je as requiredWithoutRule,_a as resetSealConfig,ka as resolveFileSize,Vp as reverseArrayMutator,kn as reverseMutator,Cr as rgbColorRule,Lr as rgbaColorRule,Pp as roundNumberMutator,On as rtrimMutator,Rn as safeHtmlMutator,Oe as sameAsFieldDateRule,$r as scalarRule,V as setKeyPath,An as slugMutator,Vn as snakeCaseMutator,Zr as sortArrayMutator,er as sortedArrayRule,kt as startsWithRule,zp as stringMutator,Hr as stringRule,yn as stringifyMutator,fn as stripUnknownMutator,Ht as strongPasswordRule,bn as titleCaseMutator,Lp as toDateOnlyMutator,Xr as toEndOfDayMutator,an as toEndOfMonthMutator,ln as toEndOfYearMutator,Cp as toFormatMutator,Op as toISOStringMutator,Qr as toStartOfDayMutator,on as toStartOfMonthMutator,un as toStartOfYearMutator,Np as toTimeOnlyMutator,qp as toTimestampMutator,sn as toUTCMutator,mr as todayRule,Un as trimMultipleWhitespaceMutator,xn as trimMutator,Pn as truncateMutator,Kn as unescapeHtmlMutator,Et as unionRule,Jr as uniqueArrayMutator,Xt as uniqueArrayRule,jr as unknownKeyRule,um as unregisterPlugin,hn as uppercaseMutator,Dn as urlDecodeMutator,Tn as urlEncodeMutator,Bt as urlRule,rm as v,ai as validate,dr as weekDayRule,wl as weekdayRule,xr as weekdaysRule,yr as weekendRule,xe as whenRule,wr as withinDaysRule,Vr as withinFutureDaysRule,vr as withinPastDaysRule,_t as withoutWhitespaceRule,Qt as wordsRule,Sr as yearRule};//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|