diff --git a/.gitattributes b/.gitattributes index 948d659bba87db54e8b1deb7aee4e290c45a4e68..401f693dc497ddd18b34cadb6af0954a1df18df5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -27,3 +27,6 @@ *.zip binary node_modules/@jimp/js-bmp/src/images/windows95.bmp filter=lfs diff=lfs merge=lfs -text node_modules/@jimp/js-bmp/src/images/windows95.png filter=lfs diff=lfs merge=lfs -text +node_modules/@jimp/plugin-blit/src/__image_snapshots__/index-node-test-ts-blit-over-image-blit-alpha-1-snap.png filter=lfs diff=lfs merge=lfs -text +node_modules/@jimp/plugin-blit/src/images/blit-alpha.png filter=lfs diff=lfs merge=lfs -text +node_modules/@jimp/plugin-blur/src/__image_snapshots__/index-node-test-ts-has-alpha-image-with-alpha-1-snap.png filter=lfs diff=lfs merge=lfs -text diff --git a/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4-mini/index.ts b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4-mini/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..87b293a4f15e3f68f506e98c2abdde6f7b0e2dc9 --- /dev/null +++ b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4-mini/index.ts @@ -0,0 +1 @@ +export * from "../v4/mini/index.js"; diff --git a/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/iso.ts b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/iso.ts new file mode 100644 index 0000000000000000000000000000000000000000..948e9f31e66f0f3e116d488499fa1784e776518d --- /dev/null +++ b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/iso.ts @@ -0,0 +1,62 @@ +import * as core from "../core/index.js"; +import * as schemas from "./schemas.js"; + +// iso time +export interface ZodMiniISODateTime extends schemas.ZodMiniStringFormat<"datetime"> { + _zod: core.$ZodISODateTimeInternals; +} +export const ZodMiniISODateTime: core.$constructor = /*@__PURE__*/ core.$constructor( + "$ZodISODateTime", + (inst, def) => { + core.$ZodISODateTime.init(inst, def); + schemas.ZodMiniStringFormat.init(inst, def); + } +); +export function datetime(params?: string | core.$ZodISODateTimeParams): ZodMiniISODateTime { + return core._isoDateTime(ZodMiniISODateTime, params); +} + +// iso date +export interface ZodMiniISODate extends schemas.ZodMiniStringFormat<"date"> { + _zod: core.$ZodISODateInternals; +} +export const ZodMiniISODate: core.$constructor = /*@__PURE__*/ core.$constructor( + "$ZodISODate", + (inst, def) => { + core.$ZodISODate.init(inst, def); + schemas.ZodMiniStringFormat.init(inst, def); + } +); +export function date(params?: string | core.$ZodISODateParams): ZodMiniISODate { + return core._isoDate(ZodMiniISODate, params); +} + +// iso time +export interface ZodMiniISOTime extends schemas.ZodMiniStringFormat<"time"> { + _zod: core.$ZodISOTimeInternals; +} +export const ZodMiniISOTime: core.$constructor = /*@__PURE__*/ core.$constructor( + "$ZodISOTime", + (inst, def) => { + core.$ZodISOTime.init(inst, def); + schemas.ZodMiniStringFormat.init(inst, def); + } +); +export function time(params?: string | core.$ZodISOTimeParams): ZodMiniISOTime { + return core._isoTime(ZodMiniISOTime, params); +} + +// iso duration +export interface ZodMiniISODuration extends schemas.ZodMiniStringFormat<"duration"> { + _zod: core.$ZodISODurationInternals; +} +export const ZodMiniISODuration: core.$constructor = /*@__PURE__*/ core.$constructor( + "$ZodISODuration", + (inst, def) => { + core.$ZodISODuration.init(inst, def); + schemas.ZodMiniStringFormat.init(inst, def); + } +); +export function duration(params?: string | core.$ZodISODurationParams): ZodMiniISODuration { + return core._isoDuration(ZodMiniISODuration, params); +} diff --git a/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/parse.ts b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/parse.ts new file mode 100644 index 0000000000000000000000000000000000000000..badb57e33a5d26e5d339a129fb55b94e94fde09c --- /dev/null +++ b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/parse.ts @@ -0,0 +1 @@ +export { parse, safeParse, parseAsync, safeParseAsync } from "../core/index.js"; diff --git a/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/schemas.ts b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/schemas.ts new file mode 100644 index 0000000000000000000000000000000000000000..a984e9bcd7a151b632830aebe1e41acd027699a6 --- /dev/null +++ b/node_modules/@jimp/plugin-blit/node_modules/zod/src/v4/mini/schemas.ts @@ -0,0 +1,1579 @@ +import * as core from "../core/index.js"; +import { util } from "../core/index.js"; +import * as parse from "./parse.js"; + +type SomeType = core.SomeType; + +export interface ZodMiniType< + out Output = unknown, + out Input = unknown, + out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals, +> extends core.$ZodType { + check(...checks: (core.CheckFn> | core.$ZodCheck>)[]): this; + clone(def?: Internals["def"], params?: { parent: boolean }): this; + register( + registry: R, + ...meta: this extends R["_schema"] + ? undefined extends R["_meta"] + ? [core.$replace?] + : [core.$replace] + : ["Incompatible schema"] + ): this; + brand( + value?: T + ): PropertyKey extends T ? this : this & Record<"_zod", Record<"output", core.output & core.$brand>>; + + def: Internals["def"]; + + parse(data: unknown, params?: core.ParseContext): core.output; + safeParse(data: unknown, params?: core.ParseContext): util.SafeParseResult>; + parseAsync(data: unknown, params?: core.ParseContext): Promise>; + safeParseAsync( + data: unknown, + params?: core.ParseContext + ): Promise>>; +} + +interface _ZodMiniType + extends ZodMiniType {} + +export const ZodMiniType: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniType", + (inst, def) => { + if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType."); + + core.$ZodType.init(inst, def); + inst.def = def; + inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => parse.safeParse(inst, data, params); + inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params); + inst.check = (...checks) => { + return inst.clone( + { + ...def, + checks: [ + ...(def.checks ?? []), + ...checks.map((ch) => + typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch + ), + ], + } + // { parent: true } + ); + }; + inst.clone = (_def, params) => core.clone(inst, _def, params); + inst.brand = () => inst as any; + inst.register = ((reg: any, meta: any) => { + reg.add(inst, meta); + return inst; + }) as any; + } +); + +export interface _ZodMiniString = core.$ZodStringInternals> + extends _ZodMiniType, + core.$ZodString { + _zod: T; +} + +// ZodMiniString +export interface ZodMiniString + extends _ZodMiniString>, + core.$ZodString {} +export const ZodMiniString: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniString", + (inst, def) => { + core.$ZodString.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function string(params?: string | core.$ZodStringParams): ZodMiniString { + return core._string(ZodMiniString, params) as any; +} + +// ZodMiniStringFormat +export interface ZodMiniStringFormat + extends _ZodMiniString>, + core.$ZodStringFormat { + // _zod: core.$ZodStringFormatInternals; +} +export const ZodMiniStringFormat: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniStringFormat", + (inst, def) => { + core.$ZodStringFormat.init(inst, def); + ZodMiniString.init(inst, def); + } +); + +// ZodMiniEmail +export interface ZodMiniEmail extends _ZodMiniString {} +export const ZodMiniEmail: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniEmail", + (inst, def) => { + core.$ZodEmail.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function email(params?: string | core.$ZodEmailParams): ZodMiniEmail { + return core._email(ZodMiniEmail, params); +} + +// ZodMiniGUID +export interface ZodMiniGUID extends _ZodMiniString { + // _zod: core.$ZodGUIDInternals; +} +export const ZodMiniGUID: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniGUID", + (inst, def) => { + core.$ZodGUID.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function guid(params?: string | core.$ZodGUIDParams): ZodMiniGUID { + return core._guid(ZodMiniGUID, params); +} + +// ZodMiniUUID +export interface ZodMiniUUID extends _ZodMiniString { + // _zod: core.$ZodUUIDInternals; +} +export const ZodMiniUUID: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniUUID", + (inst, def) => { + core.$ZodUUID.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function uuid(params?: string | core.$ZodUUIDParams): ZodMiniUUID { + return core._uuid(ZodMiniUUID, params); +} + +export function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodMiniUUID { + return core._uuidv4(ZodMiniUUID, params); +} + +// ZodMiniUUIDv6 + +export function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodMiniUUID { + return core._uuidv6(ZodMiniUUID, params); +} + +// ZodMiniUUIDv7 + +export function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodMiniUUID { + return core._uuidv7(ZodMiniUUID, params); +} + +// ZodMiniURL +export interface ZodMiniURL extends _ZodMiniString { + // _zod: core.$ZodURLInternals; +} +export const ZodMiniURL: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniURL", (inst, def) => { + core.$ZodURL.init(inst, def); + ZodMiniStringFormat.init(inst, def); +}); + +export function url(params?: string | core.$ZodURLParams): ZodMiniURL { + return core._url(ZodMiniURL, params); +} + +// ZodMiniEmoji +export interface ZodMiniEmoji extends _ZodMiniString { + // _zod: core.$ZodEmojiInternals; +} +export const ZodMiniEmoji: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniEmoji", + (inst, def) => { + core.$ZodEmoji.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function emoji(params?: string | core.$ZodEmojiParams): ZodMiniEmoji { + return core._emoji(ZodMiniEmoji, params); +} + +// ZodMiniNanoID +export interface ZodMiniNanoID extends _ZodMiniString { + // _zod: core.$ZodNanoIDInternals; +} +export const ZodMiniNanoID: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNanoID", + (inst, def) => { + core.$ZodNanoID.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function nanoid(params?: string | core.$ZodNanoIDParams): ZodMiniNanoID { + return core._nanoid(ZodMiniNanoID, params); +} + +// ZodMiniCUID +export interface ZodMiniCUID extends _ZodMiniString { + // _zod: core.$ZodCUIDInternals; +} +export const ZodMiniCUID: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniCUID", + (inst, def) => { + core.$ZodCUID.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function cuid(params?: string | core.$ZodCUIDParams): ZodMiniCUID { + return core._cuid(ZodMiniCUID, params); +} + +// ZodMiniCUID2 +export interface ZodMiniCUID2 extends _ZodMiniString { + // _zod: core.$ZodCUID2Internals; +} +export const ZodMiniCUID2: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniCUID2", + (inst, def) => { + core.$ZodCUID2.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function cuid2(params?: string | core.$ZodCUID2Params): ZodMiniCUID2 { + return core._cuid2(ZodMiniCUID2, params); +} + +// ZodMiniULID +export interface ZodMiniULID extends _ZodMiniString { + // _zod: core.$ZodULIDInternals; +} +export const ZodMiniULID: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniULID", + (inst, def) => { + core.$ZodULID.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function ulid(params?: string | core.$ZodULIDParams): ZodMiniULID { + return core._ulid(ZodMiniULID, params); +} + +// ZodMiniXID +export interface ZodMiniXID extends _ZodMiniString { + // _zod: core.$ZodXIDInternals; +} +export const ZodMiniXID: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniXID", (inst, def) => { + core.$ZodXID.init(inst, def); + ZodMiniStringFormat.init(inst, def); +}); + +export function xid(params?: string | core.$ZodXIDParams): ZodMiniXID { + return core._xid(ZodMiniXID, params); +} + +// ZodMiniKSUID +export interface ZodMiniKSUID extends _ZodMiniString { + // _zod: core.$ZodKSUIDInternals; +} +export const ZodMiniKSUID: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniKSUID", + (inst, def) => { + core.$ZodKSUID.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function ksuid(params?: string | core.$ZodKSUIDParams): ZodMiniKSUID { + return core._ksuid(ZodMiniKSUID, params); +} + +// ZodMiniIPv4 +export interface ZodMiniIPv4 extends _ZodMiniString { + // _zod: core.$ZodIPv4Internals; +} +export const ZodMiniIPv4: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniIPv4", + (inst, def) => { + core.$ZodIPv4.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function ipv4(params?: string | core.$ZodIPv4Params): ZodMiniIPv4 { + return core._ipv4(ZodMiniIPv4, params); +} + +// ZodMiniIPv6 +export interface ZodMiniIPv6 extends _ZodMiniString { + // _zod: core.$ZodIPv6Internals; +} +export const ZodMiniIPv6: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniIPv6", + (inst, def) => { + core.$ZodIPv6.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function ipv6(params?: string | core.$ZodIPv6Params): ZodMiniIPv6 { + return core._ipv6(ZodMiniIPv6, params); +} + +// ZodMiniCIDRv4 +export interface ZodMiniCIDRv4 extends _ZodMiniString { + // _zod: core.$ZodCIDRv4Internals; +} +export const ZodMiniCIDRv4: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniCIDRv4", + (inst, def) => { + core.$ZodCIDRv4.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodMiniCIDRv4 { + return core._cidrv4(ZodMiniCIDRv4, params); +} + +// ZodMiniCIDRv6 +export interface ZodMiniCIDRv6 extends _ZodMiniString { + // _zod: core.$ZodCIDRv6Internals; +} +export const ZodMiniCIDRv6: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniCIDRv6", + (inst, def) => { + core.$ZodCIDRv6.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodMiniCIDRv6 { + return core._cidrv6(ZodMiniCIDRv6, params); +} + +// ZodMiniBase64 +export interface ZodMiniBase64 extends _ZodMiniString { + // _zod: core.$ZodBase64Internals; +} +export const ZodMiniBase64: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniBase64", + (inst, def) => { + core.$ZodBase64.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); +export function base64(params?: string | core.$ZodBase64Params): ZodMiniBase64 { + return core._base64(ZodMiniBase64, params); +} + +// ZodMiniBase64URL +export interface ZodMiniBase64URL extends _ZodMiniString { + // _zod: core.$ZodBase64URLInternals; +} +export const ZodMiniBase64URL: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniBase64URL", + (inst, def) => { + core.$ZodBase64URL.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); +export function base64url(params?: string | core.$ZodBase64URLParams): ZodMiniBase64URL { + return core._base64url(ZodMiniBase64URL, params); +} + +// ZodMiniE164 +export interface ZodMiniE164 extends _ZodMiniString { + // _zod: core.$ZodE164Internals; +} +export const ZodMiniE164: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniE164", + (inst, def) => { + core.$ZodE164.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function e164(params?: string | core.$ZodE164Params): ZodMiniE164 { + return core._e164(ZodMiniE164, params); +} + +// ZodMiniJWT +export interface ZodMiniJWT extends _ZodMiniString { + // _zod: core.$ZodJWTInternals; +} +export const ZodMiniJWT: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniJWT", (inst, def) => { + core.$ZodJWT.init(inst, def); + ZodMiniStringFormat.init(inst, def); +}); + +export function jwt(params?: string | core.$ZodJWTParams): ZodMiniJWT { + return core._jwt(ZodMiniJWT, params); +} + +// ZodMiniCustomStringFormat +export interface ZodMiniCustomStringFormat + extends ZodMiniStringFormat, + core.$ZodCustomStringFormat { + _zod: core.$ZodCustomStringFormatInternals; +} +export const ZodMiniCustomStringFormat: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniCustomStringFormat", + (inst, def) => { + core.$ZodCustomStringFormat.init(inst, def); + ZodMiniStringFormat.init(inst, def); + } +); + +export function stringFormat( + format: Format, + fnOrRegex: ((arg: string) => util.MaybeAsync) | RegExp, + _params: string | core.$ZodStringFormatParams = {} +): ZodMiniCustomStringFormat { + return core._stringFormat(ZodMiniCustomStringFormat, format, fnOrRegex, _params) as any; +} + +// ZodMiniNumber +interface _ZodMiniNumber = core.$ZodNumberInternals> + extends _ZodMiniType, + core.$ZodNumber { + _zod: T; +} +export interface ZodMiniNumber + extends _ZodMiniNumber>, + core.$ZodNumber {} +export const ZodMiniNumber: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNumber", + (inst, def) => { + core.$ZodNumber.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function number(params?: string | core.$ZodNumberParams): ZodMiniNumber { + return core._number(ZodMiniNumber, params) as any; +} + +// ZodMiniNumberFormat +export interface ZodMiniNumberFormat extends _ZodMiniNumber, core.$ZodNumberFormat {} +export const ZodMiniNumberFormat: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNumberFormat", + (inst, def) => { + core.$ZodNumberFormat.init(inst, def); + ZodMiniNumber.init(inst, def); + } +); + +// int + +export function int(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat { + return core._int(ZodMiniNumberFormat, params); +} + +// float32 + +export function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat { + return core._float32(ZodMiniNumberFormat, params); +} + +// float64 + +export function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat { + return core._float64(ZodMiniNumberFormat, params); +} + +// int32 + +export function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat { + return core._int32(ZodMiniNumberFormat, params); +} + +// uint32 + +export function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat { + return core._uint32(ZodMiniNumberFormat, params); +} + +// ZodMiniBoolean +export interface ZodMiniBoolean extends _ZodMiniType> { + // _zod: core.$ZodBooleanInternals; +} +export const ZodMiniBoolean: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniBoolean", + (inst, def) => { + core.$ZodBoolean.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function boolean(params?: string | core.$ZodBooleanParams): ZodMiniBoolean { + return core._boolean(ZodMiniBoolean, params) as any; +} + +// ZodMiniBigInt +export interface ZodMiniBigInt extends _ZodMiniType>, core.$ZodBigInt { + // _zod: core.$ZodBigIntInternals; +} +export const ZodMiniBigInt: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniBigInt", + (inst, def) => { + core.$ZodBigInt.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function bigint(params?: string | core.$ZodBigIntParams): ZodMiniBigInt { + return core._bigint(ZodMiniBigInt, params) as any; +} + +// bigint formats + +// ZodMiniBigIntFormat +export interface ZodMiniBigIntFormat extends _ZodMiniType { + // _zod: core.$ZodBigIntFormatInternals; +} +export const ZodMiniBigIntFormat: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniBigIntFormat", + (inst, def) => { + core.$ZodBigIntFormat.init(inst, def); + ZodMiniBigInt.init(inst, def); + } +); + +// int64 + +export function int64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat { + return core._int64(ZodMiniBigIntFormat, params); +} + +// uint64 + +export function uint64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat { + return core._uint64(ZodMiniBigIntFormat, params); +} + +// ZodMiniSymbol +export interface ZodMiniSymbol extends _ZodMiniType { + // _zod: core.$ZodSymbolInternals; +} +export const ZodMiniSymbol: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniSymbol", + (inst, def) => { + core.$ZodSymbol.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function symbol(params?: string | core.$ZodSymbolParams): ZodMiniSymbol { + return core._symbol(ZodMiniSymbol, params) as any; +} + +// ZodMiniUndefined +export interface ZodMiniUndefined extends _ZodMiniType { + // _zod: core.$ZodUndefinedInternals; +} +export const ZodMiniUndefined: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniUndefined", + (inst, def) => { + core.$ZodUndefined.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +function _undefined(params?: string | core.$ZodUndefinedParams): ZodMiniUndefined { + return core._undefined(ZodMiniUndefined, params) as any; +} +export { _undefined as undefined }; + +// ZodMiniNull +export interface ZodMiniNull extends _ZodMiniType { + // _zod: core.$ZodNullInternals; +} +export const ZodMiniNull: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNull", + (inst, def) => { + core.$ZodNull.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +function _null(params?: string | core.$ZodNullParams): ZodMiniNull { + return core._null(ZodMiniNull, params) as any; +} +export { _null as null }; + +// ZodMiniAny +export interface ZodMiniAny extends _ZodMiniType { + // _zod: core.$ZodAnyInternals; +} +export const ZodMiniAny: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniAny", (inst, def) => { + core.$ZodAny.init(inst, def); + ZodMiniType.init(inst, def); +}); + +export function any(): ZodMiniAny { + return core._any(ZodMiniAny) as any; +} + +// ZodMiniUnknown +export interface ZodMiniUnknown extends _ZodMiniType { + // _zod: core.$ZodUnknownInternals; +} +export const ZodMiniUnknown: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniUnknown", + (inst, def) => { + core.$ZodUnknown.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function unknown(): ZodMiniUnknown { + return core._unknown(ZodMiniUnknown) as any; +} + +// ZodMiniNever +export interface ZodMiniNever extends _ZodMiniType { + // _zod: core.$ZodNeverInternals; +} +export const ZodMiniNever: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNever", + (inst, def) => { + core.$ZodNever.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function never(params?: string | core.$ZodNeverParams): ZodMiniNever { + return core._never(ZodMiniNever, params) as any; +} + +// ZodMiniVoid +export interface ZodMiniVoid extends _ZodMiniType { + // _zod: core.$ZodVoidInternals; +} +export const ZodMiniVoid: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniVoid", + (inst, def) => { + core.$ZodVoid.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +function _void(params?: string | core.$ZodVoidParams): ZodMiniVoid { + return core._void(ZodMiniVoid, params) as any; +} +export { _void as void }; + +// ZodMiniDate +export interface ZodMiniDate extends _ZodMiniType> { + // _zod: core.$ZodDateInternals; +} + +export const ZodMiniDate: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniDate", + (inst, def) => { + core.$ZodDate.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function date(params?: string | core.$ZodDateParams): ZodMiniDate { + return core._date(ZodMiniDate, params) as any; +} + +// ZodMiniArray +export interface ZodMiniArray + extends _ZodMiniType>, + core.$ZodArray { + // _zod: core.$ZodArrayInternals; +} +export const ZodMiniArray: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniArray", + (inst, def) => { + core.$ZodArray.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function array(element: T, params?: string | core.$ZodArrayParams): ZodMiniArray; +export function array(element: SomeType, params?: any): ZodMiniArray { + return new ZodMiniArray({ + type: "array", + element: element as core.$ZodType, + ...util.normalizeParams(params), + }) as any; +} + +// .keyof +export function keyof(schema: T): ZodMiniLiteral> { + const shape = schema._zod.def.shape; + return literal(Object.keys(shape)) as any; +} + +// ZodMiniObject +export interface ZodMiniObject< + /** @ts-ignore Cast variance */ + out Shape extends core.$ZodShape = core.$ZodShape, + out Config extends core.$ZodObjectConfig = core.$strip, +> extends ZodMiniType>, + core.$ZodObject { + shape: Shape; +} +export const ZodMiniObject: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniObject", + (inst, def) => { + core.$ZodObject.init(inst, def); + ZodMiniType.init(inst, def); + util.defineLazy(inst, "shape", () => def.shape); + } +); +export function object>( + shape?: T, + params?: string | core.$ZodObjectParams +): ZodMiniObject { + const def: core.$ZodObjectDef = { + type: "object", + get shape() { + util.assignProp(this, "shape", { ...shape }); + return this.shape; + }, + ...util.normalizeParams(params), + }; + return new ZodMiniObject(def) as any; +} + +// strictObject +export function strictObject( + shape: T, + params?: string | core.$ZodObjectParams +): ZodMiniObject { + return new ZodMiniObject({ + type: "object", + // shape: shape as core.$ZodLooseShape, + get shape() { + util.assignProp(this, "shape", { ...shape }); + return this.shape; + }, + catchall: never(), + ...util.normalizeParams(params), + }) as any; +} + +// looseObject +export function looseObject( + shape: T, + params?: string | core.$ZodObjectParams +): ZodMiniObject { + return new ZodMiniObject({ + type: "object", + // shape: shape as core.$ZodLooseShape, + get shape() { + util.assignProp(this, "shape", { ...shape }); + return this.shape; + }, + // get optional() { + // return util.optionalKeys(shape); + // }, + catchall: unknown(), + ...util.normalizeParams(params), + }) as any; +} + +// object methods +export function extend( + schema: T, + shape: U +): ZodMiniObject, T["_zod"]["config"]> { + return util.extend(schema, shape); +} + +/** @deprecated Identical to `z.extend(A, B)` */ +export function merge( + a: T, + b: U +): ZodMiniObject, T["_zod"]["config"]>; +export function merge(schema: ZodMiniObject, shape: any): ZodMiniObject { + return util.extend(schema, shape); +} + +export function pick>( + schema: T, + mask: M +): ZodMiniObject>, T["_zod"]["config"]> { + return util.pick(schema, mask as any); +} + +// .omit + +export function omit>( + schema: T, + mask: M +): ZodMiniObject>, T["_zod"]["config"]> { + return util.omit(schema, mask); +} + +export function partial( + schema: T +): ZodMiniObject< + { + [k in keyof T["shape"]]: ZodMiniOptional; + }, + T["_zod"]["config"] +>; +export function partial>( + schema: T, + mask: M +): ZodMiniObject< + { + [k in keyof T["shape"]]: k extends keyof M ? ZodMiniOptional : T["shape"][k]; + }, + T["_zod"]["config"] +>; +export function partial(schema: ZodMiniObject, mask?: object) { + return util.partial(ZodMiniOptional, schema, mask); +} + +export type RequiredInterfaceShape< + Shape extends core.$ZodLooseShape, + Keys extends PropertyKey = keyof Shape, +> = util.Identity< + { + [k in keyof Shape as k extends Keys ? k : never]: ZodMiniNonOptional; + } & { + [k in keyof Shape as k extends Keys ? never : k]: Shape[k]; + } +>; + +export function required( + schema: T +): ZodMiniObject< + { + [k in keyof T["shape"]]: ZodMiniNonOptional; + }, + T["_zod"]["config"] +>; +export function required>( + schema: T, + mask: M +): ZodMiniObject< + util.Extend< + T["shape"], + { + [k in keyof M & keyof T["shape"]]: ZodMiniNonOptional; + } + >, + T["_zod"]["config"] +>; +export function required(schema: ZodMiniObject, mask?: object) { + return util.required(ZodMiniNonOptional, schema, mask); +} + +export function catchall( + inst: T, + catchall: U +): ZodMiniObject> { + return inst.clone({ ...inst._zod.def, catchall: catchall as any }) as any; +} + +// ZodMiniUnion +export interface ZodMiniUnion + extends _ZodMiniType> { + // _zod: core.$ZodUnionInternals; +} +export const ZodMiniUnion: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniUnion", + (inst, def) => { + core.$ZodUnion.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function union( + options: T, + params?: string | core.$ZodUnionParams +): ZodMiniUnion { + return new ZodMiniUnion({ + type: "union", + options: options as any as core.$ZodType[], + ...util.normalizeParams(params), + }) as any; +} + +// ZodMiniDiscriminatedUnion +export interface ZodMiniDiscriminatedUnion + extends ZodMiniUnion { + _zod: core.$ZodDiscriminatedUnionInternals; +} +export const ZodMiniDiscriminatedUnion: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniDiscriminatedUnion", + (inst, def) => { + core.$ZodDiscriminatedUnion.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function discriminatedUnion< + Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]], +>( + discriminator: string, + options: Types, + params?: string | core.$ZodDiscriminatedUnionParams +): ZodMiniDiscriminatedUnion { + return new ZodMiniDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util.normalizeParams(params), + }) as ZodMiniDiscriminatedUnion; +} + +// ZodMiniIntersection +export interface ZodMiniIntersection + extends _ZodMiniType> { + // _zod: core.$ZodIntersectionInternals; +} +export const ZodMiniIntersection: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniIntersection", + (inst, def) => { + core.$ZodIntersection.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function intersection(left: T, right: U): ZodMiniIntersection { + return new ZodMiniIntersection({ + type: "intersection", + left: left as any as core.$ZodType, + right: right as any as core.$ZodType, + }) as any; +} + +// ZodMiniTuple +export interface ZodMiniTuple< + T extends util.TupleItems = readonly core.$ZodType[], + Rest extends SomeType | null = core.$ZodType | null, +> extends _ZodMiniType> { + // _zod: core.$ZodTupleInternals; +} +export const ZodMiniTuple: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniTuple", + (inst, def) => { + core.$ZodTuple.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function tuple( + items: T, + params?: string | core.$ZodTupleParams +): ZodMiniTuple; +export function tuple( + items: T, + rest: Rest, + params?: string | core.$ZodTupleParams +): ZodMiniTuple; +export function tuple(items: [], params?: string | core.$ZodTupleParams): ZodMiniTuple<[], null>; +export function tuple( + items: SomeType[], + _paramsOrRest?: string | core.$ZodTupleParams | SomeType, + _params?: string | core.$ZodTupleParams +) { + const hasRest = _paramsOrRest instanceof core.$ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodMiniTuple({ + type: "tuple", + items: items as any as core.$ZodType[], + rest, + ...util.normalizeParams(params), + }); +} + +// ZodMiniRecord +export interface ZodMiniRecord< + Key extends core.$ZodRecordKey = core.$ZodRecordKey, + Value extends SomeType = core.$ZodType, +> extends _ZodMiniType> { + // _zod: core.$ZodRecordInternals; +} +export const ZodMiniRecord: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniRecord", + (inst, def) => { + core.$ZodRecord.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function record( + keyType: Key, + valueType: Value, + params?: string | core.$ZodRecordParams +): ZodMiniRecord { + return new ZodMiniRecord({ + type: "record", + keyType, + valueType: valueType as any as core.$ZodType, + ...util.normalizeParams(params), + }) as any; +} +export function partialRecord( + keyType: Key, + valueType: Value, + params?: string | core.$ZodRecordParams +): ZodMiniRecord { + return new ZodMiniRecord({ + type: "record", + keyType: union([keyType, never()]), + valueType: valueType as any, + ...util.normalizeParams(params), + }) as any; +} + +// ZodMiniMap +export interface ZodMiniMap + extends _ZodMiniType> { + // _zod: core.$ZodMapInternals; +} +export const ZodMiniMap: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniMap", (inst, def) => { + core.$ZodMap.init(inst, def); + ZodMiniType.init(inst, def); +}); + +export function map( + keyType: Key, + valueType: Value, + params?: string | core.$ZodMapParams +): ZodMiniMap { + return new ZodMiniMap({ + type: "map", + keyType: keyType as any as core.$ZodType, + valueType: valueType as any as core.$ZodType, + ...util.normalizeParams(params), + }) as any; +} + +// ZodMiniSet +export interface ZodMiniSet extends _ZodMiniType> { + // _zod: core.$ZodSetInternals; +} +export const ZodMiniSet: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniSet", (inst, def) => { + core.$ZodSet.init(inst, def); + ZodMiniType.init(inst, def); +}); + +export function set(valueType: Value, params?: string | core.$ZodSetParams): ZodMiniSet { + return new ZodMiniSet({ + type: "set", + valueType: valueType as any as core.$ZodType, + ...util.normalizeParams(params), + }) as any; +} + +// ZodMiniEnum +export interface ZodMiniEnum extends _ZodMiniType> { + // _zod: core.$ZodEnumInternals; +} +export const ZodMiniEnum: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniEnum", + (inst, def) => { + core.$ZodEnum.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +function _enum( + values: T, + params?: string | core.$ZodEnumParams +): ZodMiniEnum>; +function _enum(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum; +function _enum(values: any, params?: string | core.$ZodEnumParams) { + const entries: any = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + + return new ZodMiniEnum({ + type: "enum", + entries, + ...util.normalizeParams(params), + }) as any; +} +export { _enum as enum }; + +/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead. + * + * ```ts + * enum Colors { red, green, blue } + * z.enum(Colors); + * ``` + */ +export function nativeEnum(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum { + return new ZodMiniEnum({ + type: "enum", + entries, + ...util.normalizeParams(params), + }) as any as ZodMiniEnum; +} + +// ZodMiniLiteral +export interface ZodMiniLiteral + extends _ZodMiniType> { + // _zod: core.$ZodLiteralInternals; +} +export const ZodMiniLiteral: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniLiteral", + (inst, def) => { + core.$ZodLiteral.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function literal>( + value: T, + params?: string | core.$ZodLiteralParams +): ZodMiniLiteral; +export function literal( + value: T, + params?: string | core.$ZodLiteralParams +): ZodMiniLiteral; +export function literal(value: any, params: any) { + return new ZodMiniLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util.normalizeParams(params), + }); +} + +// ZodMiniFile +export interface ZodMiniFile extends _ZodMiniType { + // _zod: core.$ZodFileInternals; +} +export const ZodMiniFile: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniFile", + (inst, def) => { + core.$ZodFile.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function file(params?: string | core.$ZodFileParams): ZodMiniFile { + return core._file(ZodMiniFile, params) as any; +} + +// ZodMiniTransform +export interface ZodMiniTransform extends _ZodMiniType> { + // _zod: core.$ZodTransformInternals; +} +export const ZodMiniTransform: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniTransform", + (inst, def) => { + core.$ZodTransform.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function transform( + fn: (input: I, ctx: core.ParsePayload) => O +): ZodMiniTransform, I> { + return new ZodMiniTransform({ + type: "transform", + transform: fn as any, + }) as any; +} + +// ZodMiniOptional +export interface ZodMiniOptional + extends _ZodMiniType>, + core.$ZodOptional { + // _zod: core.$ZodOptionalInternals; +} +export const ZodMiniOptional: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniOptional", + (inst, def) => { + core.$ZodOptional.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function optional(innerType: T): ZodMiniOptional { + return new ZodMiniOptional({ + type: "optional", + innerType: innerType as any as core.$ZodType, + }) as any; +} + +// ZodMiniNullable +export interface ZodMiniNullable + extends _ZodMiniType> { + // _zod: core.$ZodNullableInternals; +} +export const ZodMiniNullable: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNullable", + (inst, def) => { + core.$ZodNullable.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function nullable(innerType: T): ZodMiniNullable { + return new ZodMiniNullable({ + type: "nullable", + innerType: innerType as any as core.$ZodType, + }) as any; +} + +// nullish +export function nullish(innerType: T): ZodMiniOptional> { + return optional(nullable(innerType)); +} + +// ZodMiniDefault +export interface ZodMiniDefault extends _ZodMiniType> { + // _zod: core.$ZodDefaultInternals; +} +export const ZodMiniDefault: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniDefault", + (inst, def) => { + core.$ZodDefault.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function _default( + innerType: T, + defaultValue: util.NoUndefined> | (() => util.NoUndefined>) +): ZodMiniDefault { + return new ZodMiniDefault({ + type: "default", + innerType: innerType as any as core.$ZodType, + get defaultValue() { + return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue; + }, + }) as any; +} + +// ZodMiniPrefault +export interface ZodMiniPrefault + extends _ZodMiniType> { + // _zod: core.$ZodPrefaultInternals; +} +export const ZodMiniPrefault: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniPrefault", + (inst, def) => { + core.$ZodPrefault.init(inst, def); + ZodMiniType.init(inst, def); + } +); +export function prefault( + innerType: T, + defaultValue: util.NoUndefined> | (() => util.NoUndefined>) +): ZodMiniPrefault { + return new ZodMiniPrefault({ + type: "prefault", + innerType: innerType as any as core.$ZodType, + get defaultValue() { + return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue; + }, + }) as any; +} + +// ZodMiniNonOptional +export interface ZodMiniNonOptional + extends _ZodMiniType> { + // _zod: core.$ZodNonOptionalInternals; +} +export const ZodMiniNonOptional: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniNonOptional", + (inst, def) => { + core.$ZodNonOptional.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function nonoptional( + innerType: T, + params?: string | core.$ZodNonOptionalParams +): ZodMiniNonOptional { + return new ZodMiniNonOptional({ + type: "nonoptional", + innerType: innerType as any as core.$ZodType, + ...util.normalizeParams(params), + }) as any; +} + +// ZodMiniSuccess +export interface ZodMiniSuccess extends _ZodMiniType> { + // _zod: core.$ZodSuccessInternals; +} +export const ZodMiniSuccess: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniSuccess", + (inst, def) => { + core.$ZodSuccess.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function success(innerType: T): ZodMiniSuccess { + return new ZodMiniSuccess({ + type: "success", + innerType: innerType as any as core.$ZodType, + }) as any; +} + +// ZodMiniCatch +export interface ZodMiniCatch extends _ZodMiniType> { + // _zod: core.$ZodCatchInternals; +} +export const ZodMiniCatch: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniCatch", + (inst, def) => { + core.$ZodCatch.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +function _catch( + innerType: T, + catchValue: core.output | ((ctx: core.$ZodCatchCtx) => core.output) +): ZodMiniCatch { + return new ZodMiniCatch({ + type: "catch", + innerType: innerType as any as core.$ZodType, + catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue) as ( + ctx: core.$ZodCatchCtx + ) => core.output, + }) as any; +} +export { _catch as catch }; + +// ZodMiniNaN +export interface ZodMiniNaN extends _ZodMiniType { + // _zod: core.$ZodNaNInternals; +} +export const ZodMiniNaN: core.$constructor = /*@__PURE__*/ core.$constructor("ZodMiniNaN", (inst, def) => { + core.$ZodNaN.init(inst, def); + ZodMiniType.init(inst, def); +}); + +export function nan(params?: string | core.$ZodNaNParams): ZodMiniNaN { + return core._nan(ZodMiniNaN, params) as any; +} + +// ZodMiniPipe +export interface ZodMiniPipe + extends _ZodMiniType> { + // _zod: core.$ZodPipeInternals; +} +export const ZodMiniPipe: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniPipe", + (inst, def) => { + core.$ZodPipe.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function pipe< + const A extends SomeType, + B extends core.$ZodType> = core.$ZodType>, +>(in_: A, out: B | core.$ZodType>): ZodMiniPipe { + return new ZodMiniPipe({ + type: "pipe", + in: in_ as any as core.$ZodType, + out: out as any as core.$ZodType, + }) as any; +} + +// /** @deprecated Use `z.pipe()` and `z.transform()` instead. */ +// export function preprocess( +// fn: (arg: unknown, ctx: core.ParsePayload) => A, +// schema: U, +// params?: ZodPreprocessParams +// ): ZodPipe, U> { +// return pipe(transform(fn as any, params), schema as any, params); +// } + +// ZodMiniReadonly +export interface ZodMiniReadonly + extends _ZodMiniType> { + // _zod: core.$ZodReadonlyInternals; +} +export const ZodMiniReadonly: core.$constructor = /*@__PURE__*/ core.$constructor( + "ZodMiniReadonly", + (inst, def) => { + core.$ZodReadonly.init(inst, def); + ZodMiniType.init(inst, def); + } +); + +export function readonly(innerType: T): ZodMiniReadonly { + return new ZodMiniReadonly({ + type: "readonly", + innerType: innerType as any as core.$ZodType, + }) as any; +} + +// ZodMiniTemplateLiteral +export interface ZodMiniTemplateLiteral