LogoLogo

Schema Benchmarks

    • home
      Home

    • download_2
      Download

    • timer
      Initialization
    • check_circle
      Validation
    • output_circle
      Parsing
    • swap_horiz
      Codec
    • schema
      Standard Schema
    • format_quote
      String

    • error
      Stack
    • assignment_turned_in
      TypeScript

  • JSON Schema

    • data_object
      Schema to JSON
    • code
      JSON to Schema
    • verified
      Compliance

    • deployed_code
      Libraries

    • article
      Blog
Expand sidebarExpand sidebar
zod/mini/Compiled (unminified)Compiled (unminified)
github
GitHubGitHub
DiscordDiscord
PreferencesPreferences
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
Created by eskimojo for Open Circle

Preferences

Style
Theme
NPM browser
Code ligatures
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
schemas/libraries/zod/mini/download_compiled/index/unminified.js
code_off
View RawView Raw
Copy to clipboardCopy to clipboard
//#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js function toZod() { return (schema) => schema; } function getEnumValues(entries) { const numericValues = Object.values( entries, ).filter( (v) => typeof v === "number", ); return Object.entries(entries) .filter( ([k, _]) => numericValues.indexOf(+k) === -1, ) .map(([_, v]) => v); } function jsonStringifyReplacer( _, value, ) { if (typeof value === "bigint") return value.toString(); return value; } var Cached = class { constructor(getter) { this._getter = getter; this._value = void 0; } get value() { const getter = this._getter; if (getter !== void 0) { this._value = getter(); this._getter = void 0; } return this._value; } }; function cached(getter) { return new Cached(getter); } function nullish(input) { return ( input === null || input === void 0 ); } function cleanRegex(source) { const start = source.startsWith("^") ? 1 : 0; const end = source.endsWith("$") ? source.length - 1 : source.length; return source.slice(start, end); } function assignProp( target, prop, value, ) { Object.defineProperty(target, prop, { value, writable: true, enumerable: true, configurable: true, }); } const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {}; function isObject(data) { return ( typeof data === "object" && data !== null && !Array.isArray(data) ); } const propertyKeyTypes = /* @__PURE__*/ new Set([ "string", "number", "symbol", ]); function escapeRegex(str) { return str.replace( /[.*+?^${}()|[\]\\]/g, "\\$&", ); } function clone(inst, def, params) { const cl = new inst._zod.constr( def ?? inst._zod.def, ); if (!def || params?.parent) cl._zod.parent = inst; return cl; } function normalizeParams(_params) { const params = _params; if (!params) return {}; if (typeof params === "string") return { error: () => params }; if (params?.message !== void 0) { if (params?.error !== void 0) throw new Error( "Cannot specify both `message` and `error` params", ); params.error = params.message; } delete params.message; if (typeof params.error === "string") return { ...params, error: () => params.error, }; return params; } function optionalKeys(shape) { return Object.keys(shape).filter( (k) => { return ( shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional" ); }, ); } function aborted(x, startIndex = 0) { if (x.aborted === true) return true; for ( let i = startIndex; i < x.issues.length; i++ ) if (x.issues[i]?.continue !== true) return true; return false; } function explicitlyAborted( x, startIndex = 0, ) { if (x.aborted === true) return true; for ( let i = startIndex; i < x.issues.length; i++ ) if (x.issues[i]?.continue === false) return true; return false; } function prefixIssues(path, issues) { return issues.map((iss) => { var _a; (_a = iss).path ?? (_a.path = []); iss.path.unshift(path); return iss; }); } function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */ function sizeCaps(defChecks) { const caps = []; for (const ch of defChecks ?? []) { const d = ch._zod.def; if ( !/_(length|size)$|_equals$/.test( d.check, ) ) break; const max = d.maximum ?? d.length ?? d.size; if (max >= 0) caps.push([max, ch]); } return caps; } function attachSchema( issues, start, inst, ) { var _a; for ( let i = start; i < issues.length; i++ ) (_a = issues[i]).schema ?? (_a.schema = inst); } function finalizeIssue( iss, ctx, config, ) { var _a; const traits = iss.inst?._zod?.traits; if (traits?.has("$ZodType")) { if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst); else iss.schema = iss.inst; } const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0; const message = iss.message ? iss.message : (unwrapMessage( iss.inst?._zod.def?.error?.( iss, ), ) ?? unwrapMessage( schemaError?.(iss), ) ?? unwrapMessage( ctx?.error?.(iss), ) ?? unwrapMessage( config.customError?.(iss), ) ?? unwrapMessage( config.localeError?.(iss), ) ?? "Invalid input"); const full = {}; for (const k of Object.keys(iss)) { if ( k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__" ) continue; full[k] = iss[k]; } full.path ?? (full.path = []); full.message = message; if (ctx?.reportInput) full.input = iss.input; return full; } const highSurrogate = /[\uD800-\uDBFF]/; function codePointLength(str) { const units = str.length; if (!highSurrogate.test(str)) return units; let count = units; for (let i = 0; i < units - 1; i++) if ( (str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320 ) { count--; i++; } return count; } function getLengthableOrigin(input) { if (Array.isArray(input)) return "array"; if (typeof input === "string") return "string"; return "unknown"; } /** * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working. * * Call this from a `proto` initializer, which runs once per prototype — never per instance. */ function members(proto, table) { for (const key in table) { const desc = Object.getOwnPropertyDescriptor( table, key, ); if (desc.get) Object.defineProperty( proto, key, { ...desc, enumerable: false, }, ); else defineBound( proto, key, desc.value, ); } } /** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */ function own( inst, key, value, enumerable = true, ) { Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value, }); return value; } /** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */ function hide(inst, key, value) { return own(inst, key, value, false); } function defineBound(proto, key, fn) { Object.defineProperty(proto, key, { configurable: true, get() { return this == null ? fn : own(this, key, fn.bind(this)); }, set(value) { own(this, key, value); }, }); } /** Returns the prototype to install on, or `undefined` if this group is already installed on it. */ function claim(inst, sentinel) { const proto = Object.getPrototypeOf(inst); return sentinel in proto ? void 0 : proto; } let installing; let broke = false; const breaker = { configurable: true, get() { broke = true; }, }; /** * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s * constructor, computed from the internals object itself and cached there on * first read. One accessor per constructor rather than one per instance. */ function defineLazyInternal( inst, key, compute, ) { const proto = Object.getPrototypeOf( inst._zod, ); if ( key in proto && installing !== inst._zod ) { installing = void 0; return; } installing = inst._zod; Object.defineProperty(proto, key, { configurable: true, get() { Object.defineProperty( this, key, breaker, ); const outer = broke; broke = false; try { const value = compute(this); if (broke) delete this[key]; else Object.defineProperty( this, key, { configurable: true, writable: true, value, }, ); broke = broke || outer; return value; } catch (err) { delete this[key]; broke = broke || outer; throw err; } }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, value, }); }, }); } /** * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own * data property. One accessor per constructor rather than one per instance, because an own accessor * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel. */ function installLazyProp( inst, key, make, enumerable, ) { const proto = claim(inst, key); if (!proto) return; Object.defineProperty(proto, key, { configurable: true, get() { const desc = { configurable: true, writable: true, enumerable, value: void 0, }; Object.defineProperty( this, key, desc, ); desc.value = make(this); Object.defineProperty( this, key, desc, ); return desc.value; }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value, }); }, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.js var _a; const _zodDesc = { value: void 0, enumerable: false, }; let _E = "captureStackTrace" in Error ? Error : null; function newError(Definition) { const E = _E; if (E) { const saved = E.stackTraceLimit; if (typeof saved === "number") { try { E.stackTraceLimit = 0; } catch { _E = null; return new Definition(); } try { return new Definition(); } finally { E.stackTraceLimit = saved; } } } return new Definition(); } /* @__NO_SIDE_EFFECTS__ */ function $constructor( name, initializer, proto, params, ) { const zodProto = {}; function Internals(def) { this.def = def; this.constr = _; this.traits = /* @__PURE__ */ new Set(); } Internals.prototype = zodProto; const protoMembers = proto; const initialized = protoMembers && /* @__PURE__ */ new WeakSet(); function init(inst, def) { if (!inst._zod) { _zodDesc.value = new Internals( def, ); try { Object.defineProperty( inst, "_zod", _zodDesc, ); } finally { _zodDesc.value = void 0; } } else if ( inst._zod.traits.has(name) ) return; inst._zod.traits.add(name); initializer(inst, def); if (initialized) { const own = Object.getPrototypeOf(inst); const ctorProto = inst._zod.constr.prototype; let up = own; while (up && up !== ctorProto) up = Object.getPrototypeOf(up); const target = up ?? own; if (!initialized.has(target)) { initialized.add(target); members(target, protoMembers); } } const proto = _.prototype; for (const k in proto) { if ( !Object.prototype.hasOwnProperty.call( proto, k, ) ) continue; if (!(k in inst)) inst[k] = proto[k].bind(inst); } } const Parent = params?.Parent ?? Object; class Definition extends Parent {} Object.defineProperty( Definition, "name", { value: name }, ); function _(def) { const inst = params?.Parent ? newError(Definition) : this; init(inst, def); const deferred = inst._zod.deferred; if (deferred) { for (const fn of deferred) fn(); inst._zod.deferred = void 0; } const pp = globalThis.__zod_globalConfig ?.postProcessor; if (pp) pp(inst); return inst; } Object.defineProperty(_, "init", { value: init, }); Object.defineProperty( _, Symbol.hasInstance, { value: (inst) => { if ( params?.Parent && inst instanceof params.Parent ) return true; return inst?._zod?.traits?.has( name, ); }, }, ); Object.defineProperty(_, "name", { value: name, }); return _; } var $ZodAsyncError = class extends Error { constructor() { super( `Encountered Promise during synchronous parse. Use .parseAsync() instead.`, ); } }; (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {}); const globalConfig = globalThis.__zod_globalConfig; function config(newConfig) { if (newConfig) Object.assign( globalConfig, newConfig, ); return globalConfig; } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.js function _getMessage() { const internals = this._zod; internals.message ?? (internals.message = JSON.stringify( internals.def, jsonStringifyReplacer, 2, )); return internals.message; } function _setMessage(value) { this._zod.message = value; } const _messageDesc = { get: _getMessage, set: _setMessage, enumerable: true, configurable: true, }; const _issuesDesc = { value: void 0, enumerable: false, }; const _installedToString = /* @__PURE__ */ new WeakSet([ Object.prototype, Error.prototype, ]); const initializer = (inst, def) => { inst.name = "$ZodError"; _issuesDesc.value = def; Object.defineProperty( inst, "issues", _issuesDesc, ); _issuesDesc.value = void 0; Object.defineProperty( inst, "message", _messageDesc, ); const proto = Object.getPrototypeOf(inst); if (!_installedToString.has(proto)) { _installedToString.add(proto); Object.defineProperty( proto, "toString", { configurable: true, enumerable: false, get() { const value = () => this.message; Object.defineProperty( this, "toString", { value, configurable: true, writable: true, }, ); return value; }, set(value) { Object.defineProperty( this, "toString", { value, configurable: true, writable: true, }, ); }, }, ); } }; const $ZodRealError = /* @__PURE__ */ $constructor( "$ZodError", initializer, void 0, { Parent: Error }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js const _parse = (_Err) => { const fn = ( schema, value, _ctx, _params, ) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); if (result.issues.length) { const e = new ( _params?.Err ?? _Err )( result.issues.map((iss) => finalizeIssue( iss, ctx, config(), ), ), ); captureStackTrace( e, _params?.callee ?? fn, ); throw e; } return result.value; }; return fn; }; const parse = /* @__PURE__*/ _parse( $ZodRealError, ); const _parseAsync = (_Err) => { const fn = async ( schema, value, _ctx, params, ) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; if (result.issues.length) { const e = new ( params?.Err ?? _Err )( result.issues.map((iss) => finalizeIssue( iss, ctx, config(), ), ), ); captureStackTrace( e, params?.callee ?? fn, ); throw e; } return result.value; }; return fn; }; const parseAsync = /* @__PURE__*/ _parseAsync( $ZodRealError, ); const _safeParse = (_Err) => (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); return result.issues.length ? failure( _Err, result.issues, ctx, ) : { success: true, data: result.value, }; }; const safeParse = /* @__PURE__*/ _safeParse( $ZodRealError, ); function failure(Err, issues, ctx) { let error; return { success: false, get error() { if (!error) { error = new Err( issues.map((iss) => finalizeIssue( iss, ctx, config(), ), ), ); issues = void 0; ctx = void 0; } return error; }, set error(e) { error = e; issues = void 0; ctx = void 0; }, }; } const _safeParseAsync = (_Err) => async (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; return result.issues.length ? failure( _Err, result.issues, ctx, ) : { success: true, data: result.value, }; }; const safeParseAsync = /* @__PURE__*/ _safeParseAsync( $ZodRealError, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js const httpProtocol = /^https?$/; const anyString = /^[\s\S]{0,}$/; const number$1 = /^-?\d+(?:\.\d+)?$/; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js const $ZodCheck = /*@__PURE__*/ $constructor( "$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); inst._zod.def = def; (_a = inst._zod).onattach ?? (_a.onattach = []); }, ); /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */ const _whenHasLength = (payload) => { const val = payload.value; return ( !nullish(val) && val.length !== void 0 ); }; const numericOriginMap = { number: "number", bigint: "bigint", object: "date", }; const $ZodCheckLessThan = /*@__PURE__*/ $constructor( "$ZodCheckLessThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[ typeof def.value ]; inst._zod.check = (payload) => { if ( def.inclusive ? payload.value <= def.value : payload.value < def.value ) return; payload.issues.push({ origin: numericOriginMap[ typeof payload.value ] ?? origin, code: "too_big", maximum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }, ); const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor( "$ZodCheckGreaterThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[ typeof def.value ]; inst._zod.check = (payload) => { if ( def.inclusive ? payload.value >= def.value : payload.value > def.value ) return; payload.issues.push({ origin: numericOriginMap[ typeof payload.value ] ?? origin, code: "too_small", minimum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }, ); const $ZodCheckMaxLength = /*@__PURE__*/ $constructor( "$ZodCheckMaxLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_big", maximum: def.maximum, inclusive: true, input, inst, continue: !def.abort, }); }; }, ); const $ZodCheckMinLength = /*@__PURE__*/ $constructor( "$ZodCheckMinLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_small", minimum: def.minimum, inclusive: true, input, inst, continue: !def.abort, }); }; }, ); const $ZodCheckStringFormat = /*@__PURE__*/ $constructor( "$ZodCheckStringFormat", (inst, def) => { var _a, _b; $ZodCheck.init(inst, def); if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => { def.pattern.lastIndex = 0; if ( def.pattern.test( payload.value, ) ) return; payload.issues.push({ origin: "string", code: "invalid_format", format: def.format, input: payload.value, ...(def.pattern ? { pattern: def.pattern.toString(), } : {}), inst, continue: !def.abort, }); }); else (_b = inst._zod).check ?? (_b.check = () => {}); }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.js const version = { major: 4, minor: 6, patch: 7, }; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.js const $ZodType = /*@__PURE__*/ $constructor( "$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); inst._zod.def = def; inst._zod.bag = inst._zod.bag || {}; inst._zod.version = version; const defChecks = inst._zod.def.checks; const checks = inst._zod.traits.has( "$ZodCheck", ) ? [inst, ...(defChecks ?? [])] : defChecks?.length ? [...defChecks] : []; for (const ch of checks) for (const fn of ch._zod .onattach) fn(inst); if (checks.length === 0) { (_a = inst._zod).deferred ?? (_a.deferred = []); inst._zod.deferred?.push(() => { inst._zod.run = inst._zod.parse; }); } else { const runChecks = ( payload, checks, ctx, ) => { if (payload.memo) return payload; let isAborted = aborted(payload); let asyncResult; for (const ch of checks) { if (ch._zod.def.when) { if ( explicitlyAborted( payload, ) ) continue; if ( !ch._zod.def.when( payload, ) ) continue; } else if (isAborted) continue; const currLen = payload.issues.length; const _ = ch._zod.check(payload); if ( _ instanceof Promise && ctx?.async === false ) throw new $ZodAsyncError(); if ( asyncResult || _ instanceof Promise ) asyncResult = ( asyncResult ?? Promise.resolve() ).then(async () => { await _; if ( payload.issues .length === currLen ) return; attachSchema( payload.issues, currLen, inst, ); if (!isAborted) isAborted = aborted( payload, currLen, ); }); else { if ( payload.issues .length === currLen ) continue; attachSchema( payload.issues, currLen, inst, ); if (!isAborted) isAborted = aborted( payload, currLen, ); } } if (asyncResult) return asyncResult.then( () => { return payload; }, ); return payload; }; const handleCanaryResult = ( canary, payload, ctx, ) => { if (aborted(canary)) { canary.aborted = true; return canary; } const checkResult = runChecks( payload, checks, ctx, ); if ( checkResult instanceof Promise ) { if (ctx.async === false) throw new $ZodAsyncError(); return checkResult.then( (checkResult) => inst._zod.parse( checkResult, ctx, ), ); } return inst._zod.parse( checkResult, ctx, ); }; inst._zod.run = ( payload, ctx, ) => { if (ctx.skipChecks) return inst._zod.parse( payload, ctx, ); if ( ctx.direction === "backward" ) { const canary = inst._zod.parse( { value: payload.value, issues: [], }, { ...ctx, skipChecks: true, }, ); if ( canary instanceof Promise ) return canary.then( (canary) => { return handleCanaryResult( canary, payload, ctx, ); }, ); return handleCanaryResult( canary, payload, ctx, ); } const result = inst._zod.parse( payload, ctx, ); if ( result instanceof Promise ) { if (ctx.async === false) throw new $ZodAsyncError(); return result.then( (result) => runChecks( result, checks, ctx, ), ); } return runChecks( result, checks, ctx, ); }; } }, { get "~standard"() { return hide( this, "~standard", standardProps(this), ); }, set "~standard"(value) { own(this, "~standard", value); }, }, ); /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */ const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue( iss, ctx, config(), ), ), } : { value: r.value }; async function validateAsync( inst, value, ) { const ctx = { async: true }; return toStandardResult( await inst._zod.run( { value, issues: [], }, ctx, ), ctx, ); } function standardProps(inst) { return { validate: (value) => { const ctx = { async: false }; try { const r = inst._zod.run( { value, issues: [], }, ctx, ); if (!(r instanceof Promise)) return toStandardResult( r, ctx, ); } catch (_) {} return validateAsync(inst, value); }, vendor: "zod", version: 1, }; } const $ZodString = /*@__PURE__*/ $constructor( "$ZodString", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = def.pattern ?? anyString; inst._zod.parse = ( payload, _, ) => { if (def.coerce) try { payload.value = String( payload.value, ); } catch (_) {} if ( typeof payload.value === "string" ) return payload; payload.issues.push({ expected: "string", code: "invalid_type", input: payload.value, inst, }); return payload; }; }, ); const $ZodStringFormat = /*@__PURE__*/ $constructor( "$ZodStringFormat", (inst, def) => { $ZodCheckStringFormat.init( inst, def, ); $ZodString.init(inst, def); }, ); function canParseURL(input) { try { if ( typeof URL !== "undefined" && typeof URL.canParse === "function" ) return URL.canParse(input); new URL(input); return true; } catch { return false; } } function validateURL(trimmed, def) { if ( !("normalize" in def) && !("hostname" in def) && !("protocol" in def) ) return canParseURL(trimmed) || 2; return parseURLObject(trimmed, def); } /** Parses a URL while preserving the non-normalizing HTTP guard. */ function parseURLObject(trimmed, def) { if ( !def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed) ) return 1; try { if (typeof URL !== "undefined") { const URLStatic = URL; if ( typeof URLStatic.parse === "function" ) return ( URLStatic.parse(trimmed) ?? 2 ); } return new URL(trimmed); } catch { return 2; } } const asciiTabOrNewline = /[\t\n\r]/g; /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */ function stripTabAndNewline(value) { return value.replace( asciiTabOrNewline, "", ); } function urlHostnameOk(url, hostname) { hostname.lastIndex = 0; return hostname.test(url.hostname); } function urlProtocolOk(url, protocol) { protocol.lastIndex = 0; return protocol.test( url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol, ); } const $ZodURL = /*@__PURE__*/ $constructor( "$ZodURL", (inst, def) => { $ZodStringFormat.init(inst, def); inst._zod.check = (payload) => { try { const trimmed = payload.value.trim(); const url = validateURL( trimmed, def, ); if (url === 1) { payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid URL format", input: payload.value, inst, continue: !def.abort, }); return; } if (url === 2) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); return; } if (url === true) { payload.value = stripTabAndNewline( trimmed, ); return; } if ( def.hostname && !urlHostnameOk( url, def.hostname, ) ) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid hostname", pattern: def.hostname.source, input: payload.value, inst, continue: !def.abort, }); if ( def.protocol && !urlProtocolOk( url, def.protocol, ) ) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid protocol", pattern: def.protocol.source, input: payload.value, inst, continue: !def.abort, }); payload.value = def.normalize ? url.href : stripTabAndNewline( trimmed, ); return; } catch (_) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); } }; }, ); const $ZodNumber = /*@__PURE__*/ $constructor( "$ZodNumber", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = number$1; inst._zod.parse = ( payload, _ctx, ) => { if (def.coerce) try { payload.value = Number( payload.value, ); } catch (_) {} const input = payload.value; if ( typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input) ) return payload; const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? String(input) : void 0 : void 0; payload.issues.push({ expected: "number", code: "invalid_type", input, inst, ...(received ? { received } : {}), }); return payload; }; }, ); const $ZodDate = /*@__PURE__*/ $constructor( "$ZodDate", (inst, def) => { $ZodType.init(inst, def); inst._zod.parse = ( payload, _ctx, ) => { if (def.coerce) try { payload.value = new Date( payload.value, ); } catch (_err) {} const input = payload.value; const isDate = input instanceof Date; if ( isDate && !Number.isNaN(input.getTime()) ) return payload; payload.issues.push({ expected: "date", code: "invalid_type", input, ...(isDate ? { received: "Invalid Date", } : {}), inst, }); return payload; }; }, ); function capSize(inst, size) { const caps = sizeCaps( inst._zod.def.checks, ); if (!caps.length) return; const cap = Math.min( ...caps.map((c) => c[0]), ); const parse = inst._zod.parse; inst._zod.parse = (payload, ctx) => { const n = size(payload.value); if ( n > cap && !ctx?.skipChecks && ctx?.direction !== "backward" ) { for (const [max, ch] of sizeCaps( inst._zod.def.checks, )) if ( n > max && ch._zod.def.when(payload) ) { const start = payload.issues.length; ch._zod.check(payload); payload.issues[ start ].continue = false; attachSchema( payload.issues, start, inst, ); return payload; } } return parse(payload, ctx); }; } const arraySize = (input) => Array.isArray(input) ? input.length : -1; function handleArrayResult( result, final, index, ) { if (result.issues.length) final.issues.push( ...prefixIssues( index, result.issues, ), ); final.value[index] = result.value; } const $ZodArray = /*@__PURE__*/ $constructor( "$ZodArray", (inst, def) => { $ZodType.init(inst, def); const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = ( payload, ctx, ) => { const input = payload.value; if (!Array.isArray(input)) { payload.issues.push({ expected: "array", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc( inst, payload, Array(input.length), ctx, ) : Array(input.length); const proms = []; const abortEarly = ctx?.abortEarly; for ( let i = 0; i < input.length; i++ ) { const item = input[i]; const result = def.element._zod.run( { value: item, issues: [], }, ctx, ); if (result instanceof Promise) proms.push( result.then((result) => handleArrayResult( result, payload, i, ), ), ); else { handleArrayResult( result, payload, i, ); if ( abortEarly && result.issues.length !== 0 && aborted(result) ) break; } } if (proms.length) return Promise.all( proms, ).then(() => payload); return payload; }; capSize(inst, arraySize); }, ); function handlePropertyResult( result, final, key, input, optin, optout, ) { const isPresent = key in input; const isOptionalOut = optout === "optional"; if ( !isPresent && isOptionalOut && optin === "optional" ) return; if (result.issues.length) { if ( optin !== void 0 && isOptionalOut && !isPresent ) return; final.issues.push( ...prefixIssues( key, result.issues, ), ); } if (!isPresent && optin === void 0) { if (!result.issues.length) final.issues.push({ code: "invalid_type", expected: "nonoptional", input: void 0, path: [key], }); return; } if (result.value === void 0) { if ( isPresent || (optin === "defaulted" && !isOptionalOut) ) final.value[key] = void 0; } else final.value[key] = result.value; } const NO_SYMBOL_KEYS = []; function normalizeDef(def) { const keys = Object.keys(def.shape); const ownSymbols = Object.getOwnPropertySymbols( def.shape, ); const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS; const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys; for (const k of allKeys) if ( !def.shape?.[ k ]?._zod?.traits?.has("$ZodType") ) throw new Error( `Invalid element at key "${String(k)}": expected a Zod schema`, ); const okeys = optionalKeys(def.shape); return { ...def, allKeys, symbolKeys, keySet: new Set(keys), numKeys: keys.length, optionalKeys: new Set(okeys), }; } function handleCatchall( proms, input, payload, ctx, def, inst, abortEarly, ) { const unrecognized = []; const keySet = def.keySet; const _catchall = def.catchall._zod; const t = _catchall.def.type; const optin = _catchall.optin; const optout = _catchall.optout; let seen = 0; for (const key in input) { if ( abortEarly && payload.issues.length !== seen ) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (keySet.has(key)) continue; if (key === "__proto__") { if (t === "never") unrecognized.push(key); continue; } if (t === "never") { unrecognized.push(key); continue; } const r = _catchall.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push( r.then((r) => handlePropertyResult( r, payload, key, input, optin, optout, ), ), ); else handlePropertyResult( r, payload, key, input, optin, optout, ); } if (unrecognized.length) payload.issues.push({ code: "unrecognized_keys", keys: unrecognized, input, inst, continue: true, }); if (!proms.length) return payload; return Promise.all(proms).then(() => { return payload; }); } const $ZodObject = /*@__PURE__*/ $constructor( "$ZodObject", (inst, def) => { $ZodType.init(inst, def); const desc = Object.getOwnPropertyDescriptor( def, "shape", ); const sh = desc?.get ? desc.get.raw : (def.shape ?? {}); if (sh) { const get = () => { const newSh = { ...sh }; Object.defineProperty( def, "shape", { value: newSh }, ); get.raw = newSh; return newSh; }; get.raw = sh; Object.defineProperty( def, "shape", { get }, ); } const _normalized = cached(() => normalizeDef(def), ); defineLazyInternal( inst, "propValues", (zod) => { const shape = zod.def.shape; const propValues = {}; for (const key in shape) { const field = shape[key]._zod; if (field.values) { if ( !Object.prototype.hasOwnProperty.call( propValues, key, ) ) assignProp( propValues, key, /* @__PURE__ */ new Set(), ); for (const v of field.values) propValues[key].add(v); if ( field.optin !== void 0 ) propValues[key].add( void 0, ); } } return propValues; }, ); const isObject$1 = isObject; const catchall = def.catchall; let value; const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = ( payload, ctx, ) => { value ?? (value = _normalized.value); const input = payload.value; if (!isObject$1(input)) { payload.issues.push({ expected: "object", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc( inst, payload, {}, ctx, ) : {}; const proms = []; const shape = value.shape; const abortEarly = ctx?.abortEarly; let seen = payload.issues.length; for (const key of value.allKeys) { if ( abortEarly && payload.issues.length !== seen ) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (key === "__proto__") continue; const el = shape[key]; const optin = el._zod.optin; const optout = el._zod.optout; const r = el._zod.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push( r.then((r) => handlePropertyResult( r, payload, key, input, optin, optout, ), ), ); else handlePropertyResult( r, payload, key, input, optin, optout, ); } if (!catchall) return proms.length ? Promise.all(proms).then( () => payload, ) : payload; return handleCatchall( proms, input, payload, ctx, _normalized.value, inst, abortEarly === true, ); }; }, ); const $ZodEnum = /*@__PURE__*/ $constructor( "$ZodEnum", (inst, def) => { $ZodType.init(inst, def); const values = getEnumValues( def.entries, ); const valuesSet = new Set(values); inst._zod.values = valuesSet; defineLazyInternal( inst, "pattern", (zod) => { const patternValues = getEnumValues( zod.def.entries, ).filter((k) => propertyKeyTypes.has( typeof k, ), ); return new RegExp( patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$", ); }, ); inst._zod.parse = ( payload, _ctx, ) => { const input = payload.value; if (valuesSet.has(input)) return payload; payload.issues.push({ code: "invalid_value", values, input, inst, }); return payload; }; }, ); const $ZodNullable = /*@__PURE__*/ $constructor( "$ZodNullable", (inst, def) => { $ZodType.init(inst, def); defineLazyInternal( inst, "optin", (zod) => zod.def.innerType._zod.optin, ); defineLazyInternal( inst, "optout", (zod) => zod.def.innerType._zod.optout, ); defineLazyInternal( inst, "pattern", (zod) => { const pattern = zod.def.innerType._zod .pattern; return pattern ? new RegExp( `^(${cleanRegex(pattern.source)}|null)$`, ) : void 0; }, ); defineLazyInternal( inst, "values", (zod) => { return zod.def.innerType._zod .values ? /* @__PURE__ */ new Set([ ...zod.def.innerType ._zod.values, null, ]) : void 0; }, ); inst._zod.parse = ( payload, ctx, ) => { if (payload.value === null) return payload; return def.innerType._zod.run( payload, ctx, ); }; }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.js function snapshotChecks(def) { if (def.checks) def.checks = [...def.checks]; return def; } // @__NO_SIDE_EFFECTS__ function _string(Class, params) { return new Class( snapshotChecks({ type: "string", ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _url(Class, params) { return new Class({ type: "string", format: "url", check: "string_format", abort: false, ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _number(Class, params) { return new Class( snapshotChecks({ type: "number", checks: [], ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _date(Class, params) { return new Class({ type: "date", ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _lte(value, params) { return new $ZodCheckLessThan({ check: "less_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _gte(value, params) { return new $ZodCheckGreaterThan({ check: "greater_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _maxLength(maximum, params) { return new $ZodCheckMaxLength({ check: "max_length", ...normalizeParams(params), maximum, }); } // @__NO_SIDE_EFFECTS__ function _minLength(minimum, params) { return new $ZodCheckMinLength({ check: "min_length", ...normalizeParams(params), minimum, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/mini/schemas.js const ZodMiniType = /*@__PURE__*/ $constructor( "ZodMiniType", (inst, def) => { if (!inst._zod) throw new Error( "Uninitialized schema in ZodMiniType.", ); $ZodType.init(inst, def); inst.def = def; inst.type = def.type; }, { get with() { return this.check; }, set with(value) { own(this, "with", value); }, parse(data, params) { return parse( this, data, params, { callee: this.parse }, ); }, parseAsync(data, params) { return parseAsync( this, data, params, { callee: this.parseAsync }, ); }, safeParse(data, params) { return safeParse( this, data, params, ); }, safeParseAsync(data, params) { return safeParseAsync( this, data, params, ); }, check(...checks) { const def = this.def; return this.clone( { ...def, checks: [ ...(def.checks ?? []), ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom", }, onattach: [], }, } : ch, ), ], }, { parent: true }, ); }, clone(_def, params) { return clone( this, _def, params, ); }, brand() { return this; }, register(reg, meta) { reg.add(this, meta); return this; }, apply(fn, ...args) { return args.length === 0 ? fn(this) : fn(this, ...args); }, }, ); const ZodMiniString = /*@__PURE__*/ $constructor( "ZodMiniString", (inst, def) => { $ZodString.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function string(params) { return /* @__PURE__ */ _string( ZodMiniString, params, ); } const ZodMiniStringFormat = /*@__PURE__*/ $constructor( "ZodMiniStringFormat", (inst, def) => { $ZodStringFormat.init(inst, def); ZodMiniString.init(inst, def); }, ); const ZodMiniURL = /*@__PURE__*/ $constructor( "ZodMiniURL", (inst, def) => { $ZodURL.init(inst, def); ZodMiniStringFormat.init( inst, def, ); }, ); // @__NO_SIDE_EFFECTS__ function url(params) { return /* @__PURE__ */ _url( ZodMiniURL, params, ); } const ZodMiniNumber = /*@__PURE__*/ $constructor( "ZodMiniNumber", (inst, def) => { $ZodNumber.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function number(params) { return /* @__PURE__ */ _number( ZodMiniNumber, params, ); } const ZodMiniDate = /*@__PURE__*/ $constructor( "ZodMiniDate", (inst, def) => { $ZodDate.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function date(params) { return /* @__PURE__ */ _date( ZodMiniDate, params, ); } const ZodMiniArray = /*@__PURE__*/ $constructor( "ZodMiniArray", (inst, def) => { $ZodArray.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function array(element, params) { return new ZodMiniArray({ type: "array", element, ...normalizeParams(params), }); } const ZodMiniObject = /*@__PURE__*/ $constructor( "ZodMiniObject", (inst, def) => { $ZodObject.init(inst, def); ZodMiniType.init(inst, def); installLazyProp( inst, "shape", (self) => self._zod.def.shape, false, ); }, ); // @__NO_SIDE_EFFECTS__ function object(shape, params) { const def = { type: "object", shape: shape ?? {}, ...normalizeParams(params), }; return new ZodMiniObject(def); } const ZodMiniEnum = /*@__PURE__*/ $constructor( "ZodMiniEnum", (inst, def) => { $ZodEnum.init(inst, def); ZodMiniType.init(inst, def); inst.options = [ ...inst._zod.values, ]; }, ); // @__NO_SIDE_EFFECTS__ function _enum(values, params) { const entries = Array.isArray(values) ? Object.fromEntries( values.map((v) => [v, v]), ) : values; return new ZodMiniEnum({ type: "enum", entries, ...normalizeParams(params), }); } const ZodMiniNullable = /*@__PURE__*/ $constructor( "ZodMiniNullable", (inst, def) => { $ZodNullable.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function nullable(innerType) { return new ZodMiniNullable({ type: "nullable", innerType, }); } //#endregion //#region ../schemas/libraries/zod/mini/download/index.ts const imageSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), type: /* @__PURE__ */ _enum([ "jpg", "png", ]), size: /* @__PURE__ */ number(), url: /* @__PURE__ */ url(), }); const ratingSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), stars: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(5), ), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), text: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(1e3), ), images: /* @__PURE__ */ array( imageSchema, ), }); toZod()( /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), brand: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), description: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(500), ), price: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(1e4), ), discount: /* @__PURE__ */ nullable( /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(100), ), ), quantity: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(0), /* @__PURE__ */ _lte(10), ), tags: /* @__PURE__ */ array( /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), ), images: /* @__PURE__ */ array( imageSchema, ), ratings: /* @__PURE__ */ array( ratingSchema, ), }), ).parse({}); //#endregion
//#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js function toZod() { return (schema) => schema; } function getEnumValues(entries) { const numericValues = Object.values(entries).filter( (v) => typeof v === "number", ); return Object.entries(entries) .filter(([k, _]) => numericValues.indexOf(+k) === -1) .map(([_, v]) => v); } function jsonStringifyReplacer(_, value) { if (typeof value === "bigint") return value.toString(); return value; } var Cached = class { constructor(getter) { this._getter = getter; this._value = void 0; } get value() { const getter = this._getter; if (getter !== void 0) { this._value = getter(); this._getter = void 0; } return this._value; } }; function cached(getter) { return new Cached(getter); } function nullish(input) { return input === null || input === void 0; } function cleanRegex(source) { const start = source.startsWith("^") ? 1 : 0; const end = source.endsWith("$") ? source.length - 1 : source.length; return source.slice(start, end); } function assignProp(target, prop, value) { Object.defineProperty(target, prop, { value, writable: true, enumerable: true, configurable: true, }); } const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {}; function isObject(data) { return ( typeof data === "object" && data !== null && !Array.isArray(data) ); } const propertyKeyTypes = /* @__PURE__*/ new Set([ "string", "number", "symbol", ]); function escapeRegex(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function clone(inst, def, params) { const cl = new inst._zod.constr(def ?? inst._zod.def); if (!def || params?.parent) cl._zod.parent = inst; return cl; } function normalizeParams(_params) { const params = _params; if (!params) return {}; if (typeof params === "string") return { error: () => params }; if (params?.message !== void 0) { if (params?.error !== void 0) throw new Error( "Cannot specify both `message` and `error` params", ); params.error = params.message; } delete params.message; if (typeof params.error === "string") return { ...params, error: () => params.error, }; return params; } function optionalKeys(shape) { return Object.keys(shape).filter((k) => { return ( shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional" ); }); } function aborted(x, startIndex = 0) { if (x.aborted === true) return true; for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true; return false; } function explicitlyAborted(x, startIndex = 0) { if (x.aborted === true) return true; for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue === false) return true; return false; } function prefixIssues(path, issues) { return issues.map((iss) => { var _a; (_a = iss).path ?? (_a.path = []); iss.path.unshift(path); return iss; }); } function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */ function sizeCaps(defChecks) { const caps = []; for (const ch of defChecks ?? []) { const d = ch._zod.def; if (!/_(length|size)$|_equals$/.test(d.check)) break; const max = d.maximum ?? d.length ?? d.size; if (max >= 0) caps.push([max, ch]); } return caps; } function attachSchema(issues, start, inst) { var _a; for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst); } function finalizeIssue(iss, ctx, config) { var _a; const traits = iss.inst?._zod?.traits; if (traits?.has("$ZodType")) { if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst); else iss.schema = iss.inst; } const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0; const message = iss.message ? iss.message : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input"); const full = {}; for (const k of Object.keys(iss)) { if ( k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__" ) continue; full[k] = iss[k]; } full.path ?? (full.path = []); full.message = message; if (ctx?.reportInput) full.input = iss.input; return full; } const highSurrogate = /[\uD800-\uDBFF]/; function codePointLength(str) { const units = str.length; if (!highSurrogate.test(str)) return units; let count = units; for (let i = 0; i < units - 1; i++) if ( (str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320 ) { count--; i++; } return count; } function getLengthableOrigin(input) { if (Array.isArray(input)) return "array"; if (typeof input === "string") return "string"; return "unknown"; } /** * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working. * * Call this from a `proto` initializer, which runs once per prototype — never per instance. */ function members(proto, table) { for (const key in table) { const desc = Object.getOwnPropertyDescriptor( table, key, ); if (desc.get) Object.defineProperty(proto, key, { ...desc, enumerable: false, }); else defineBound(proto, key, desc.value); } } /** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */ function own(inst, key, value, enumerable = true) { Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value, }); return value; } /** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */ function hide(inst, key, value) { return own(inst, key, value, false); } function defineBound(proto, key, fn) { Object.defineProperty(proto, key, { configurable: true, get() { return this == null ? fn : own(this, key, fn.bind(this)); }, set(value) { own(this, key, value); }, }); } /** Returns the prototype to install on, or `undefined` if this group is already installed on it. */ function claim(inst, sentinel) { const proto = Object.getPrototypeOf(inst); return sentinel in proto ? void 0 : proto; } let installing; let broke = false; const breaker = { configurable: true, get() { broke = true; }, }; /** * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s * constructor, computed from the internals object itself and cached there on * first read. One accessor per constructor rather than one per instance. */ function defineLazyInternal(inst, key, compute) { const proto = Object.getPrototypeOf(inst._zod); if (key in proto && installing !== inst._zod) { installing = void 0; return; } installing = inst._zod; Object.defineProperty(proto, key, { configurable: true, get() { Object.defineProperty(this, key, breaker); const outer = broke; broke = false; try { const value = compute(this); if (broke) delete this[key]; else Object.defineProperty(this, key, { configurable: true, writable: true, value, }); broke = broke || outer; return value; } catch (err) { delete this[key]; broke = broke || outer; throw err; } }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, value, }); }, }); } /** * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own * data property. One accessor per constructor rather than one per instance, because an own accessor * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel. */ function installLazyProp(inst, key, make, enumerable) { const proto = claim(inst, key); if (!proto) return; Object.defineProperty(proto, key, { configurable: true, get() { const desc = { configurable: true, writable: true, enumerable, value: void 0, }; Object.defineProperty(this, key, desc); desc.value = make(this); Object.defineProperty(this, key, desc); return desc.value; }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value, }); }, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.js var _a; const _zodDesc = { value: void 0, enumerable: false, }; let _E = "captureStackTrace" in Error ? Error : null; function newError(Definition) { const E = _E; if (E) { const saved = E.stackTraceLimit; if (typeof saved === "number") { try { E.stackTraceLimit = 0; } catch { _E = null; return new Definition(); } try { return new Definition(); } finally { E.stackTraceLimit = saved; } } } return new Definition(); } /* @__NO_SIDE_EFFECTS__ */ function $constructor(name, initializer, proto, params) { const zodProto = {}; function Internals(def) { this.def = def; this.constr = _; this.traits = /* @__PURE__ */ new Set(); } Internals.prototype = zodProto; const protoMembers = proto; const initialized = protoMembers && /* @__PURE__ */ new WeakSet(); function init(inst, def) { if (!inst._zod) { _zodDesc.value = new Internals(def); try { Object.defineProperty(inst, "_zod", _zodDesc); } finally { _zodDesc.value = void 0; } } else if (inst._zod.traits.has(name)) return; inst._zod.traits.add(name); initializer(inst, def); if (initialized) { const own = Object.getPrototypeOf(inst); const ctorProto = inst._zod.constr.prototype; let up = own; while (up && up !== ctorProto) up = Object.getPrototypeOf(up); const target = up ?? own; if (!initialized.has(target)) { initialized.add(target); members(target, protoMembers); } } const proto = _.prototype; for (const k in proto) { if (!Object.prototype.hasOwnProperty.call(proto, k)) continue; if (!(k in inst)) inst[k] = proto[k].bind(inst); } } const Parent = params?.Parent ?? Object; class Definition extends Parent {} Object.defineProperty(Definition, "name", { value: name, }); function _(def) { const inst = params?.Parent ? newError(Definition) : this; init(inst, def); const deferred = inst._zod.deferred; if (deferred) { for (const fn of deferred) fn(); inst._zod.deferred = void 0; } const pp = globalThis.__zod_globalConfig?.postProcessor; if (pp) pp(inst); return inst; } Object.defineProperty(_, "init", { value: init }); Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => { if (params?.Parent && inst instanceof params.Parent) return true; return inst?._zod?.traits?.has(name); }, }); Object.defineProperty(_, "name", { value: name }); return _; } var $ZodAsyncError = class extends Error { constructor() { super( `Encountered Promise during synchronous parse. Use .parseAsync() instead.`, ); } }; (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {}); const globalConfig = globalThis.__zod_globalConfig; function config(newConfig) { if (newConfig) Object.assign(globalConfig, newConfig); return globalConfig; } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.js function _getMessage() { const internals = this._zod; internals.message ?? (internals.message = JSON.stringify( internals.def, jsonStringifyReplacer, 2, )); return internals.message; } function _setMessage(value) { this._zod.message = value; } const _messageDesc = { get: _getMessage, set: _setMessage, enumerable: true, configurable: true, }; const _issuesDesc = { value: void 0, enumerable: false, }; const _installedToString = /* @__PURE__ */ new WeakSet([ Object.prototype, Error.prototype, ]); const initializer = (inst, def) => { inst.name = "$ZodError"; _issuesDesc.value = def; Object.defineProperty(inst, "issues", _issuesDesc); _issuesDesc.value = void 0; Object.defineProperty(inst, "message", _messageDesc); const proto = Object.getPrototypeOf(inst); if (!_installedToString.has(proto)) { _installedToString.add(proto); Object.defineProperty(proto, "toString", { configurable: true, enumerable: false, get() { const value = () => this.message; Object.defineProperty(this, "toString", { value, configurable: true, writable: true, }); return value; }, set(value) { Object.defineProperty(this, "toString", { value, configurable: true, writable: true, }); }, }); } }; const $ZodRealError = /* @__PURE__ */ $constructor( "$ZodError", initializer, void 0, { Parent: Error }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js const _parse = (_Err) => { const fn = (schema, value, _ctx, _params) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); if (result.issues.length) { const e = new (_params?.Err ?? _Err)( result.issues.map((iss) => finalizeIssue(iss, ctx, config()), ), ); captureStackTrace(e, _params?.callee ?? fn); throw e; } return result.value; }; return fn; }; const parse = /* @__PURE__*/ _parse($ZodRealError); const _parseAsync = (_Err) => { const fn = async (schema, value, _ctx, params) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; if (result.issues.length) { const e = new (params?.Err ?? _Err)( result.issues.map((iss) => finalizeIssue(iss, ctx, config()), ), ); captureStackTrace(e, params?.callee ?? fn); throw e; } return result.value; }; return fn; }; const parseAsync = /* @__PURE__*/ _parseAsync($ZodRealError); const _safeParse = (_Err) => (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value, }; }; const safeParse = /* @__PURE__*/ _safeParse($ZodRealError); function failure(Err, issues, ctx) { let error; return { success: false, get error() { if (!error) { error = new Err( issues.map((iss) => finalizeIssue(iss, ctx, config()), ), ); issues = void 0; ctx = void 0; } return error; }, set error(e) { error = e; issues = void 0; ctx = void 0; }, }; } const _safeParseAsync = (_Err) => async (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value, }; }; const safeParseAsync = /* @__PURE__*/ _safeParseAsync($ZodRealError); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js const httpProtocol = /^https?$/; const anyString = /^[\s\S]{0,}$/; const number$1 = /^-?\d+(?:\.\d+)?$/; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js const $ZodCheck = /*@__PURE__*/ $constructor( "$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); inst._zod.def = def; (_a = inst._zod).onattach ?? (_a.onattach = []); }, ); /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */ const _whenHasLength = (payload) => { const val = payload.value; return !nullish(val) && val.length !== void 0; }; const numericOriginMap = { number: "number", bigint: "bigint", object: "date", }; const $ZodCheckLessThan = /*@__PURE__*/ $constructor( "$ZodCheckLessThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[typeof def.value]; inst._zod.check = (payload) => { if ( def.inclusive ? payload.value <= def.value : payload.value < def.value ) return; payload.issues.push({ origin: numericOriginMap[typeof payload.value] ?? origin, code: "too_big", maximum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }, ); const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor( "$ZodCheckGreaterThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[typeof def.value]; inst._zod.check = (payload) => { if ( def.inclusive ? payload.value >= def.value : payload.value > def.value ) return; payload.issues.push({ origin: numericOriginMap[typeof payload.value] ?? origin, code: "too_small", minimum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }, ); const $ZodCheckMaxLength = /*@__PURE__*/ $constructor( "$ZodCheckMaxLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_big", maximum: def.maximum, inclusive: true, input, inst, continue: !def.abort, }); }; }, ); const $ZodCheckMinLength = /*@__PURE__*/ $constructor( "$ZodCheckMinLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_small", minimum: def.minimum, inclusive: true, input, inst, continue: !def.abort, }); }; }, ); const $ZodCheckStringFormat = /*@__PURE__*/ $constructor( "$ZodCheckStringFormat", (inst, def) => { var _a, _b; $ZodCheck.init(inst, def); if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => { def.pattern.lastIndex = 0; if (def.pattern.test(payload.value)) return; payload.issues.push({ origin: "string", code: "invalid_format", format: def.format, input: payload.value, ...(def.pattern ? { pattern: def.pattern.toString() } : {}), inst, continue: !def.abort, }); }); else (_b = inst._zod).check ?? (_b.check = () => {}); }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.js const version = { major: 4, minor: 6, patch: 7, }; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.js const $ZodType = /*@__PURE__*/ $constructor( "$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); inst._zod.def = def; inst._zod.bag = inst._zod.bag || {}; inst._zod.version = version; const defChecks = inst._zod.def.checks; const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...(defChecks ?? [])] : defChecks?.length ? [...defChecks] : []; for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst); if (checks.length === 0) { (_a = inst._zod).deferred ?? (_a.deferred = []); inst._zod.deferred?.push(() => { inst._zod.run = inst._zod.parse; }); } else { const runChecks = (payload, checks, ctx) => { if (payload.memo) return payload; let isAborted = aborted(payload); let asyncResult; for (const ch of checks) { if (ch._zod.def.when) { if (explicitlyAborted(payload)) continue; if (!ch._zod.def.when(payload)) continue; } else if (isAborted) continue; const currLen = payload.issues.length; const _ = ch._zod.check(payload); if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError(); if (asyncResult || _ instanceof Promise) asyncResult = ( asyncResult ?? Promise.resolve() ).then(async () => { await _; if (payload.issues.length === currLen) return; attachSchema(payload.issues, currLen, inst); if (!isAborted) isAborted = aborted(payload, currLen); }); else { if (payload.issues.length === currLen) continue; attachSchema(payload.issues, currLen, inst); if (!isAborted) isAborted = aborted(payload, currLen); } } if (asyncResult) return asyncResult.then(() => { return payload; }); return payload; }; const handleCanaryResult = (canary, payload, ctx) => { if (aborted(canary)) { canary.aborted = true; return canary; } const checkResult = runChecks(payload, checks, ctx); if (checkResult instanceof Promise) { if (ctx.async === false) throw new $ZodAsyncError(); return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx), ); } return inst._zod.parse(checkResult, ctx); }; inst._zod.run = (payload, ctx) => { if (ctx.skipChecks) return inst._zod.parse(payload, ctx); if (ctx.direction === "backward") { const canary = inst._zod.parse( { value: payload.value, issues: [], }, { ...ctx, skipChecks: true, }, ); if (canary instanceof Promise) return canary.then((canary) => { return handleCanaryResult( canary, payload, ctx, ); }); return handleCanaryResult(canary, payload, ctx); } const result = inst._zod.parse(payload, ctx); if (result instanceof Promise) { if (ctx.async === false) throw new $ZodAsyncError(); return result.then((result) => runChecks(result, checks, ctx), ); } return runChecks(result, checks, ctx); }; } }, { get "~standard"() { return hide(this, "~standard", standardProps(this)); }, set "~standard"(value) { own(this, "~standard", value); }, }, ); /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */ const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config()), ), } : { value: r.value }; async function validateAsync(inst, value) { const ctx = { async: true }; return toStandardResult( await inst._zod.run( { value, issues: [], }, ctx, ), ctx, ); } function standardProps(inst) { return { validate: (value) => { const ctx = { async: false }; try { const r = inst._zod.run( { value, issues: [], }, ctx, ); if (!(r instanceof Promise)) return toStandardResult(r, ctx); } catch (_) {} return validateAsync(inst, value); }, vendor: "zod", version: 1, }; } const $ZodString = /*@__PURE__*/ $constructor( "$ZodString", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = def.pattern ?? anyString; inst._zod.parse = (payload, _) => { if (def.coerce) try { payload.value = String(payload.value); } catch (_) {} if (typeof payload.value === "string") return payload; payload.issues.push({ expected: "string", code: "invalid_type", input: payload.value, inst, }); return payload; }; }, ); const $ZodStringFormat = /*@__PURE__*/ $constructor( "$ZodStringFormat", (inst, def) => { $ZodCheckStringFormat.init(inst, def); $ZodString.init(inst, def); }, ); function canParseURL(input) { try { if ( typeof URL !== "undefined" && typeof URL.canParse === "function" ) return URL.canParse(input); new URL(input); return true; } catch { return false; } } function validateURL(trimmed, def) { if ( !("normalize" in def) && !("hostname" in def) && !("protocol" in def) ) return canParseURL(trimmed) || 2; return parseURLObject(trimmed, def); } /** Parses a URL while preserving the non-normalizing HTTP guard. */ function parseURLObject(trimmed, def) { if ( !def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed) ) return 1; try { if (typeof URL !== "undefined") { const URLStatic = URL; if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2; } return new URL(trimmed); } catch { return 2; } } const asciiTabOrNewline = /[\t\n\r]/g; /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */ function stripTabAndNewline(value) { return value.replace(asciiTabOrNewline, ""); } function urlHostnameOk(url, hostname) { hostname.lastIndex = 0; return hostname.test(url.hostname); } function urlProtocolOk(url, protocol) { protocol.lastIndex = 0; return protocol.test( url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol, ); } const $ZodURL = /*@__PURE__*/ $constructor( "$ZodURL", (inst, def) => { $ZodStringFormat.init(inst, def); inst._zod.check = (payload) => { try { const trimmed = payload.value.trim(); const url = validateURL(trimmed, def); if (url === 1) { payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid URL format", input: payload.value, inst, continue: !def.abort, }); return; } if (url === 2) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); return; } if (url === true) { payload.value = stripTabAndNewline(trimmed); return; } if ( def.hostname && !urlHostnameOk(url, def.hostname) ) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid hostname", pattern: def.hostname.source, input: payload.value, inst, continue: !def.abort, }); if ( def.protocol && !urlProtocolOk(url, def.protocol) ) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid protocol", pattern: def.protocol.source, input: payload.value, inst, continue: !def.abort, }); payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed); return; } catch (_) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); } }; }, ); const $ZodNumber = /*@__PURE__*/ $constructor( "$ZodNumber", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = number$1; inst._zod.parse = (payload, _ctx) => { if (def.coerce) try { payload.value = Number(payload.value); } catch (_) {} const input = payload.value; if ( typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input) ) return payload; const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? String(input) : void 0 : void 0; payload.issues.push({ expected: "number", code: "invalid_type", input, inst, ...(received ? { received } : {}), }); return payload; }; }, ); const $ZodDate = /*@__PURE__*/ $constructor( "$ZodDate", (inst, def) => { $ZodType.init(inst, def); inst._zod.parse = (payload, _ctx) => { if (def.coerce) try { payload.value = new Date(payload.value); } catch (_err) {} const input = payload.value; const isDate = input instanceof Date; if (isDate && !Number.isNaN(input.getTime())) return payload; payload.issues.push({ expected: "date", code: "invalid_type", input, ...(isDate ? { received: "Invalid Date" } : {}), inst, }); return payload; }; }, ); function capSize(inst, size) { const caps = sizeCaps(inst._zod.def.checks); if (!caps.length) return; const cap = Math.min(...caps.map((c) => c[0])); const parse = inst._zod.parse; inst._zod.parse = (payload, ctx) => { const n = size(payload.value); if ( n > cap && !ctx?.skipChecks && ctx?.direction !== "backward" ) { for (const [max, ch] of sizeCaps( inst._zod.def.checks, )) if (n > max && ch._zod.def.when(payload)) { const start = payload.issues.length; ch._zod.check(payload); payload.issues[start].continue = false; attachSchema(payload.issues, start, inst); return payload; } } return parse(payload, ctx); }; } const arraySize = (input) => Array.isArray(input) ? input.length : -1; function handleArrayResult(result, final, index) { if (result.issues.length) final.issues.push( ...prefixIssues(index, result.issues), ); final.value[index] = result.value; } const $ZodArray = /*@__PURE__*/ $constructor( "$ZodArray", (inst, def) => { $ZodType.init(inst, def); const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = (payload, ctx) => { const input = payload.value; if (!Array.isArray(input)) { payload.issues.push({ expected: "array", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc( inst, payload, Array(input.length), ctx, ) : Array(input.length); const proms = []; const abortEarly = ctx?.abortEarly; for (let i = 0; i < input.length; i++) { const item = input[i]; const result = def.element._zod.run( { value: item, issues: [], }, ctx, ); if (result instanceof Promise) proms.push( result.then((result) => handleArrayResult(result, payload, i), ), ); else { handleArrayResult(result, payload, i); if ( abortEarly && result.issues.length !== 0 && aborted(result) ) break; } } if (proms.length) return Promise.all(proms).then(() => payload); return payload; }; capSize(inst, arraySize); }, ); function handlePropertyResult( result, final, key, input, optin, optout, ) { const isPresent = key in input; const isOptionalOut = optout === "optional"; if (!isPresent && isOptionalOut && optin === "optional") return; if (result.issues.length) { if (optin !== void 0 && isOptionalOut && !isPresent) return; final.issues.push(...prefixIssues(key, result.issues)); } if (!isPresent && optin === void 0) { if (!result.issues.length) final.issues.push({ code: "invalid_type", expected: "nonoptional", input: void 0, path: [key], }); return; } if (result.value === void 0) { if ( isPresent || (optin === "defaulted" && !isOptionalOut) ) final.value[key] = void 0; } else final.value[key] = result.value; } const NO_SYMBOL_KEYS = []; function normalizeDef(def) { const keys = Object.keys(def.shape); const ownSymbols = Object.getOwnPropertySymbols( def.shape, ); const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS; const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys; for (const k of allKeys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error( `Invalid element at key "${String(k)}": expected a Zod schema`, ); const okeys = optionalKeys(def.shape); return { ...def, allKeys, symbolKeys, keySet: new Set(keys), numKeys: keys.length, optionalKeys: new Set(okeys), }; } function handleCatchall( proms, input, payload, ctx, def, inst, abortEarly, ) { const unrecognized = []; const keySet = def.keySet; const _catchall = def.catchall._zod; const t = _catchall.def.type; const optin = _catchall.optin; const optout = _catchall.optout; let seen = 0; for (const key in input) { if (abortEarly && payload.issues.length !== seen) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (keySet.has(key)) continue; if (key === "__proto__") { if (t === "never") unrecognized.push(key); continue; } if (t === "never") { unrecognized.push(key); continue; } const r = _catchall.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push( r.then((r) => handlePropertyResult( r, payload, key, input, optin, optout, ), ), ); else handlePropertyResult( r, payload, key, input, optin, optout, ); } if (unrecognized.length) payload.issues.push({ code: "unrecognized_keys", keys: unrecognized, input, inst, continue: true, }); if (!proms.length) return payload; return Promise.all(proms).then(() => { return payload; }); } const $ZodObject = /*@__PURE__*/ $constructor( "$ZodObject", (inst, def) => { $ZodType.init(inst, def); const desc = Object.getOwnPropertyDescriptor( def, "shape", ); const sh = desc?.get ? desc.get.raw : (def.shape ?? {}); if (sh) { const get = () => { const newSh = { ...sh }; Object.defineProperty(def, "shape", { value: newSh, }); get.raw = newSh; return newSh; }; get.raw = sh; Object.defineProperty(def, "shape", { get }); } const _normalized = cached(() => normalizeDef(def)); defineLazyInternal(inst, "propValues", (zod) => { const shape = zod.def.shape; const propValues = {}; for (const key in shape) { const field = shape[key]._zod; if (field.values) { if ( !Object.prototype.hasOwnProperty.call( propValues, key, ) ) assignProp( propValues, key, /* @__PURE__ */ new Set(), ); for (const v of field.values) propValues[key].add(v); if (field.optin !== void 0) propValues[key].add(void 0); } } return propValues; }); const isObject$1 = isObject; const catchall = def.catchall; let value; const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = (payload, ctx) => { value ?? (value = _normalized.value); const input = payload.value; if (!isObject$1(input)) { payload.issues.push({ expected: "object", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {}; const proms = []; const shape = value.shape; const abortEarly = ctx?.abortEarly; let seen = payload.issues.length; for (const key of value.allKeys) { if (abortEarly && payload.issues.length !== seen) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (key === "__proto__") continue; const el = shape[key]; const optin = el._zod.optin; const optout = el._zod.optout; const r = el._zod.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push( r.then((r) => handlePropertyResult( r, payload, key, input, optin, optout, ), ), ); else handlePropertyResult( r, payload, key, input, optin, optout, ); } if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload; return handleCatchall( proms, input, payload, ctx, _normalized.value, inst, abortEarly === true, ); }; }, ); const $ZodEnum = /*@__PURE__*/ $constructor( "$ZodEnum", (inst, def) => { $ZodType.init(inst, def); const values = getEnumValues(def.entries); const valuesSet = new Set(values); inst._zod.values = valuesSet; defineLazyInternal(inst, "pattern", (zod) => { const patternValues = getEnumValues( zod.def.entries, ).filter((k) => propertyKeyTypes.has(typeof k)); return new RegExp( patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$", ); }); inst._zod.parse = (payload, _ctx) => { const input = payload.value; if (valuesSet.has(input)) return payload; payload.issues.push({ code: "invalid_value", values, input, inst, }); return payload; }; }, ); const $ZodNullable = /*@__PURE__*/ $constructor( "$ZodNullable", (inst, def) => { $ZodType.init(inst, def); defineLazyInternal( inst, "optin", (zod) => zod.def.innerType._zod.optin, ); defineLazyInternal( inst, "optout", (zod) => zod.def.innerType._zod.optout, ); defineLazyInternal(inst, "pattern", (zod) => { const pattern = zod.def.innerType._zod.pattern; return pattern ? new RegExp( `^(${cleanRegex(pattern.source)}|null)$`, ) : void 0; }); defineLazyInternal(inst, "values", (zod) => { return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([ ...zod.def.innerType._zod.values, null, ]) : void 0; }); inst._zod.parse = (payload, ctx) => { if (payload.value === null) return payload; return def.innerType._zod.run(payload, ctx); }; }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.js function snapshotChecks(def) { if (def.checks) def.checks = [...def.checks]; return def; } // @__NO_SIDE_EFFECTS__ function _string(Class, params) { return new Class( snapshotChecks({ type: "string", ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _url(Class, params) { return new Class({ type: "string", format: "url", check: "string_format", abort: false, ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _number(Class, params) { return new Class( snapshotChecks({ type: "number", checks: [], ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _date(Class, params) { return new Class({ type: "date", ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _lte(value, params) { return new $ZodCheckLessThan({ check: "less_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _gte(value, params) { return new $ZodCheckGreaterThan({ check: "greater_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _maxLength(maximum, params) { return new $ZodCheckMaxLength({ check: "max_length", ...normalizeParams(params), maximum, }); } // @__NO_SIDE_EFFECTS__ function _minLength(minimum, params) { return new $ZodCheckMinLength({ check: "min_length", ...normalizeParams(params), minimum, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/mini/schemas.js const ZodMiniType = /*@__PURE__*/ $constructor( "ZodMiniType", (inst, def) => { if (!inst._zod) throw new Error( "Uninitialized schema in ZodMiniType.", ); $ZodType.init(inst, def); inst.def = def; inst.type = def.type; }, { get with() { return this.check; }, set with(value) { own(this, "with", value); }, parse(data, params) { return parse(this, data, params, { callee: this.parse, }); }, parseAsync(data, params) { return parseAsync(this, data, params, { callee: this.parseAsync, }); }, safeParse(data, params) { return safeParse(this, data, params); }, safeParseAsync(data, params) { return safeParseAsync(this, data, params); }, check(...checks) { const def = this.def; return this.clone( { ...def, checks: [ ...(def.checks ?? []), ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [], }, } : ch, ), ], }, { parent: true }, ); }, clone(_def, params) { return clone(this, _def, params); }, brand() { return this; }, register(reg, meta) { reg.add(this, meta); return this; }, apply(fn, ...args) { return args.length === 0 ? fn(this) : fn(this, ...args); }, }, ); const ZodMiniString = /*@__PURE__*/ $constructor( "ZodMiniString", (inst, def) => { $ZodString.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function string(params) { return /* @__PURE__ */ _string(ZodMiniString, params); } const ZodMiniStringFormat = /*@__PURE__*/ $constructor( "ZodMiniStringFormat", (inst, def) => { $ZodStringFormat.init(inst, def); ZodMiniString.init(inst, def); }, ); const ZodMiniURL = /*@__PURE__*/ $constructor( "ZodMiniURL", (inst, def) => { $ZodURL.init(inst, def); ZodMiniStringFormat.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function url(params) { return /* @__PURE__ */ _url(ZodMiniURL, params); } const ZodMiniNumber = /*@__PURE__*/ $constructor( "ZodMiniNumber", (inst, def) => { $ZodNumber.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function number(params) { return /* @__PURE__ */ _number(ZodMiniNumber, params); } const ZodMiniDate = /*@__PURE__*/ $constructor( "ZodMiniDate", (inst, def) => { $ZodDate.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function date(params) { return /* @__PURE__ */ _date(ZodMiniDate, params); } const ZodMiniArray = /*@__PURE__*/ $constructor( "ZodMiniArray", (inst, def) => { $ZodArray.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function array(element, params) { return new ZodMiniArray({ type: "array", element, ...normalizeParams(params), }); } const ZodMiniObject = /*@__PURE__*/ $constructor( "ZodMiniObject", (inst, def) => { $ZodObject.init(inst, def); ZodMiniType.init(inst, def); installLazyProp( inst, "shape", (self) => self._zod.def.shape, false, ); }, ); // @__NO_SIDE_EFFECTS__ function object(shape, params) { const def = { type: "object", shape: shape ?? {}, ...normalizeParams(params), }; return new ZodMiniObject(def); } const ZodMiniEnum = /*@__PURE__*/ $constructor( "ZodMiniEnum", (inst, def) => { $ZodEnum.init(inst, def); ZodMiniType.init(inst, def); inst.options = [...inst._zod.values]; }, ); // @__NO_SIDE_EFFECTS__ function _enum(values, params) { const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; return new ZodMiniEnum({ type: "enum", entries, ...normalizeParams(params), }); } const ZodMiniNullable = /*@__PURE__*/ $constructor( "ZodMiniNullable", (inst, def) => { $ZodNullable.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function nullable(innerType) { return new ZodMiniNullable({ type: "nullable", innerType, }); } //#endregion //#region ../schemas/libraries/zod/mini/download/index.ts const imageSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), type: /* @__PURE__ */ _enum(["jpg", "png"]), size: /* @__PURE__ */ number(), url: /* @__PURE__ */ url(), }); const ratingSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), stars: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(5), ), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), text: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(1e3), ), images: /* @__PURE__ */ array(imageSchema), }); toZod()( /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), brand: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), description: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(500), ), price: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(1e4), ), discount: /* @__PURE__ */ nullable( /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(100), ), ), quantity: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(0), /* @__PURE__ */ _lte(10), ), tags: /* @__PURE__ */ array( /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), ), images: /* @__PURE__ */ array(imageSchema), ratings: /* @__PURE__ */ array(ratingSchema), }), ).parse({}); //#endregion
//#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js function toZod() { return (schema) => schema; } function getEnumValues(entries) { const numericValues = Object.values(entries).filter( (v) => typeof v === "number", ); return Object.entries(entries) .filter(([k, _]) => numericValues.indexOf(+k) === -1) .map(([_, v]) => v); } function jsonStringifyReplacer(_, value) { if (typeof value === "bigint") return value.toString(); return value; } var Cached = class { constructor(getter) { this._getter = getter; this._value = void 0; } get value() { const getter = this._getter; if (getter !== void 0) { this._value = getter(); this._getter = void 0; } return this._value; } }; function cached(getter) { return new Cached(getter); } function nullish(input) { return input === null || input === void 0; } function cleanRegex(source) { const start = source.startsWith("^") ? 1 : 0; const end = source.endsWith("$") ? source.length - 1 : source.length; return source.slice(start, end); } function assignProp(target, prop, value) { Object.defineProperty(target, prop, { value, writable: true, enumerable: true, configurable: true, }); } const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {}; function isObject(data) { return typeof data === "object" && data !== null && !Array.isArray(data); } const propertyKeyTypes = /* @__PURE__*/ new Set(["string", "number", "symbol"]); function escapeRegex(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function clone(inst, def, params) { const cl = new inst._zod.constr(def ?? inst._zod.def); if (!def || params?.parent) cl._zod.parent = inst; return cl; } function normalizeParams(_params) { const params = _params; if (!params) return {}; if (typeof params === "string") return { error: () => params }; if (params?.message !== void 0) { if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params"); params.error = params.message; } delete params.message; if (typeof params.error === "string") return { ...params, error: () => params.error, }; return params; } function optionalKeys(shape) { return Object.keys(shape).filter((k) => { return ( shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional" ); }); } function aborted(x, startIndex = 0) { if (x.aborted === true) return true; for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true; return false; } function explicitlyAborted(x, startIndex = 0) { if (x.aborted === true) return true; for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue === false) return true; return false; } function prefixIssues(path, issues) { return issues.map((iss) => { var _a; (_a = iss).path ?? (_a.path = []); iss.path.unshift(path); return iss; }); } function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */ function sizeCaps(defChecks) { const caps = []; for (const ch of defChecks ?? []) { const d = ch._zod.def; if (!/_(length|size)$|_equals$/.test(d.check)) break; const max = d.maximum ?? d.length ?? d.size; if (max >= 0) caps.push([max, ch]); } return caps; } function attachSchema(issues, start, inst) { var _a; for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst); } function finalizeIssue(iss, ctx, config) { var _a; const traits = iss.inst?._zod?.traits; if (traits?.has("$ZodType")) { if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst); else iss.schema = iss.inst; } const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0; const message = iss.message ? iss.message : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input"); const full = {}; for (const k of Object.keys(iss)) { if ( k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__" ) continue; full[k] = iss[k]; } full.path ?? (full.path = []); full.message = message; if (ctx?.reportInput) full.input = iss.input; return full; } const highSurrogate = /[\uD800-\uDBFF]/; function codePointLength(str) { const units = str.length; if (!highSurrogate.test(str)) return units; let count = units; for (let i = 0; i < units - 1; i++) if ( (str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320 ) { count--; i++; } return count; } function getLengthableOrigin(input) { if (Array.isArray(input)) return "array"; if (typeof input === "string") return "string"; return "unknown"; } /** * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working. * * Call this from a `proto` initializer, which runs once per prototype — never per instance. */ function members(proto, table) { for (const key in table) { const desc = Object.getOwnPropertyDescriptor(table, key); if (desc.get) Object.defineProperty(proto, key, { ...desc, enumerable: false, }); else defineBound(proto, key, desc.value); } } /** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */ function own(inst, key, value, enumerable = true) { Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value, }); return value; } /** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */ function hide(inst, key, value) { return own(inst, key, value, false); } function defineBound(proto, key, fn) { Object.defineProperty(proto, key, { configurable: true, get() { return this == null ? fn : own(this, key, fn.bind(this)); }, set(value) { own(this, key, value); }, }); } /** Returns the prototype to install on, or `undefined` if this group is already installed on it. */ function claim(inst, sentinel) { const proto = Object.getPrototypeOf(inst); return sentinel in proto ? void 0 : proto; } let installing; let broke = false; const breaker = { configurable: true, get() { broke = true; }, }; /** * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s * constructor, computed from the internals object itself and cached there on * first read. One accessor per constructor rather than one per instance. */ function defineLazyInternal(inst, key, compute) { const proto = Object.getPrototypeOf(inst._zod); if (key in proto && installing !== inst._zod) { installing = void 0; return; } installing = inst._zod; Object.defineProperty(proto, key, { configurable: true, get() { Object.defineProperty(this, key, breaker); const outer = broke; broke = false; try { const value = compute(this); if (broke) delete this[key]; else Object.defineProperty(this, key, { configurable: true, writable: true, value, }); broke = broke || outer; return value; } catch (err) { delete this[key]; broke = broke || outer; throw err; } }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, value, }); }, }); } /** * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own * data property. One accessor per constructor rather than one per instance, because an own accessor * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel. */ function installLazyProp(inst, key, make, enumerable) { const proto = claim(inst, key); if (!proto) return; Object.defineProperty(proto, key, { configurable: true, get() { const desc = { configurable: true, writable: true, enumerable, value: void 0, }; Object.defineProperty(this, key, desc); desc.value = make(this); Object.defineProperty(this, key, desc); return desc.value; }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value, }); }, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.js var _a; const _zodDesc = { value: void 0, enumerable: false, }; let _E = "captureStackTrace" in Error ? Error : null; function newError(Definition) { const E = _E; if (E) { const saved = E.stackTraceLimit; if (typeof saved === "number") { try { E.stackTraceLimit = 0; } catch { _E = null; return new Definition(); } try { return new Definition(); } finally { E.stackTraceLimit = saved; } } } return new Definition(); } /* @__NO_SIDE_EFFECTS__ */ function $constructor(name, initializer, proto, params) { const zodProto = {}; function Internals(def) { this.def = def; this.constr = _; this.traits = /* @__PURE__ */ new Set(); } Internals.prototype = zodProto; const protoMembers = proto; const initialized = protoMembers && /* @__PURE__ */ new WeakSet(); function init(inst, def) { if (!inst._zod) { _zodDesc.value = new Internals(def); try { Object.defineProperty(inst, "_zod", _zodDesc); } finally { _zodDesc.value = void 0; } } else if (inst._zod.traits.has(name)) return; inst._zod.traits.add(name); initializer(inst, def); if (initialized) { const own = Object.getPrototypeOf(inst); const ctorProto = inst._zod.constr.prototype; let up = own; while (up && up !== ctorProto) up = Object.getPrototypeOf(up); const target = up ?? own; if (!initialized.has(target)) { initialized.add(target); members(target, protoMembers); } } const proto = _.prototype; for (const k in proto) { if (!Object.prototype.hasOwnProperty.call(proto, k)) continue; if (!(k in inst)) inst[k] = proto[k].bind(inst); } } const Parent = params?.Parent ?? Object; class Definition extends Parent {} Object.defineProperty(Definition, "name", { value: name }); function _(def) { const inst = params?.Parent ? newError(Definition) : this; init(inst, def); const deferred = inst._zod.deferred; if (deferred) { for (const fn of deferred) fn(); inst._zod.deferred = void 0; } const pp = globalThis.__zod_globalConfig?.postProcessor; if (pp) pp(inst); return inst; } Object.defineProperty(_, "init", { value: init }); Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => { if (params?.Parent && inst instanceof params.Parent) return true; return inst?._zod?.traits?.has(name); }, }); Object.defineProperty(_, "name", { value: name }); return _; } var $ZodAsyncError = class extends Error { constructor() { super( `Encountered Promise during synchronous parse. Use .parseAsync() instead.`, ); } }; (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {}); const globalConfig = globalThis.__zod_globalConfig; function config(newConfig) { if (newConfig) Object.assign(globalConfig, newConfig); return globalConfig; } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.js function _getMessage() { const internals = this._zod; internals.message ?? (internals.message = JSON.stringify( internals.def, jsonStringifyReplacer, 2, )); return internals.message; } function _setMessage(value) { this._zod.message = value; } const _messageDesc = { get: _getMessage, set: _setMessage, enumerable: true, configurable: true, }; const _issuesDesc = { value: void 0, enumerable: false, }; const _installedToString = /* @__PURE__ */ new WeakSet([ Object.prototype, Error.prototype, ]); const initializer = (inst, def) => { inst.name = "$ZodError"; _issuesDesc.value = def; Object.defineProperty(inst, "issues", _issuesDesc); _issuesDesc.value = void 0; Object.defineProperty(inst, "message", _messageDesc); const proto = Object.getPrototypeOf(inst); if (!_installedToString.has(proto)) { _installedToString.add(proto); Object.defineProperty(proto, "toString", { configurable: true, enumerable: false, get() { const value = () => this.message; Object.defineProperty(this, "toString", { value, configurable: true, writable: true, }); return value; }, set(value) { Object.defineProperty(this, "toString", { value, configurable: true, writable: true, }); }, }); } }; const $ZodRealError = /* @__PURE__ */ $constructor( "$ZodError", initializer, void 0, { Parent: Error }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js const _parse = (_Err) => { const fn = (schema, value, _ctx, _params) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); if (result.issues.length) { const e = new (_params?.Err ?? _Err)( result.issues.map((iss) => finalizeIssue(iss, ctx, config())), ); captureStackTrace(e, _params?.callee ?? fn); throw e; } return result.value; }; return fn; }; const parse = /* @__PURE__*/ _parse($ZodRealError); const _parseAsync = (_Err) => { const fn = async (schema, value, _ctx, params) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; if (result.issues.length) { const e = new (params?.Err ?? _Err)( result.issues.map((iss) => finalizeIssue(iss, ctx, config())), ); captureStackTrace(e, params?.callee ?? fn); throw e; } return result.value; }; return fn; }; const parseAsync = /* @__PURE__*/ _parseAsync($ZodRealError); const _safeParse = (_Err) => (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value, }; }; const safeParse = /* @__PURE__*/ _safeParse($ZodRealError); function failure(Err, issues, ctx) { let error; return { success: false, get error() { if (!error) { error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config()))); issues = void 0; ctx = void 0; } return error; }, set error(e) { error = e; issues = void 0; ctx = void 0; }, }; } const _safeParseAsync = (_Err) => async (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value, }; }; const safeParseAsync = /* @__PURE__*/ _safeParseAsync($ZodRealError); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js const httpProtocol = /^https?$/; const anyString = /^[\s\S]{0,}$/; const number$1 = /^-?\d+(?:\.\d+)?$/; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); inst._zod.def = def; (_a = inst._zod).onattach ?? (_a.onattach = []); }); /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */ const _whenHasLength = (payload) => { const val = payload.value; return !nullish(val) && val.length !== void 0; }; const numericOriginMap = { number: "number", bigint: "bigint", object: "date", }; const $ZodCheckLessThan = /*@__PURE__*/ $constructor( "$ZodCheckLessThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[typeof def.value]; inst._zod.check = (payload) => { if ( def.inclusive ? payload.value <= def.value : payload.value < def.value ) return; payload.issues.push({ origin: numericOriginMap[typeof payload.value] ?? origin, code: "too_big", maximum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }, ); const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor( "$ZodCheckGreaterThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[typeof def.value]; inst._zod.check = (payload) => { if ( def.inclusive ? payload.value >= def.value : payload.value > def.value ) return; payload.issues.push({ origin: numericOriginMap[typeof payload.value] ?? origin, code: "too_small", minimum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }, ); const $ZodCheckMaxLength = /*@__PURE__*/ $constructor( "$ZodCheckMaxLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_big", maximum: def.maximum, inclusive: true, input, inst, continue: !def.abort, }); }; }, ); const $ZodCheckMinLength = /*@__PURE__*/ $constructor( "$ZodCheckMinLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_small", minimum: def.minimum, inclusive: true, input, inst, continue: !def.abort, }); }; }, ); const $ZodCheckStringFormat = /*@__PURE__*/ $constructor( "$ZodCheckStringFormat", (inst, def) => { var _a, _b; $ZodCheck.init(inst, def); if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => { def.pattern.lastIndex = 0; if (def.pattern.test(payload.value)) return; payload.issues.push({ origin: "string", code: "invalid_format", format: def.format, input: payload.value, ...(def.pattern ? { pattern: def.pattern.toString() } : {}), inst, continue: !def.abort, }); }); else (_b = inst._zod).check ?? (_b.check = () => {}); }, ); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.js const version = { major: 4, minor: 6, patch: 7, }; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.js const $ZodType = /*@__PURE__*/ $constructor( "$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); inst._zod.def = def; inst._zod.bag = inst._zod.bag || {}; inst._zod.version = version; const defChecks = inst._zod.def.checks; const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...(defChecks ?? [])] : defChecks?.length ? [...defChecks] : []; for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst); if (checks.length === 0) { (_a = inst._zod).deferred ?? (_a.deferred = []); inst._zod.deferred?.push(() => { inst._zod.run = inst._zod.parse; }); } else { const runChecks = (payload, checks, ctx) => { if (payload.memo) return payload; let isAborted = aborted(payload); let asyncResult; for (const ch of checks) { if (ch._zod.def.when) { if (explicitlyAborted(payload)) continue; if (!ch._zod.def.when(payload)) continue; } else if (isAborted) continue; const currLen = payload.issues.length; const _ = ch._zod.check(payload); if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError(); if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { await _; if (payload.issues.length === currLen) return; attachSchema(payload.issues, currLen, inst); if (!isAborted) isAborted = aborted(payload, currLen); }); else { if (payload.issues.length === currLen) continue; attachSchema(payload.issues, currLen, inst); if (!isAborted) isAborted = aborted(payload, currLen); } } if (asyncResult) return asyncResult.then(() => { return payload; }); return payload; }; const handleCanaryResult = (canary, payload, ctx) => { if (aborted(canary)) { canary.aborted = true; return canary; } const checkResult = runChecks(payload, checks, ctx); if (checkResult instanceof Promise) { if (ctx.async === false) throw new $ZodAsyncError(); return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx), ); } return inst._zod.parse(checkResult, ctx); }; inst._zod.run = (payload, ctx) => { if (ctx.skipChecks) return inst._zod.parse(payload, ctx); if (ctx.direction === "backward") { const canary = inst._zod.parse( { value: payload.value, issues: [], }, { ...ctx, skipChecks: true, }, ); if (canary instanceof Promise) return canary.then((canary) => { return handleCanaryResult(canary, payload, ctx); }); return handleCanaryResult(canary, payload, ctx); } const result = inst._zod.parse(payload, ctx); if (result instanceof Promise) { if (ctx.async === false) throw new $ZodAsyncError(); return result.then((result) => runChecks(result, checks, ctx)); } return runChecks(result, checks, ctx); }; } }, { get "~standard"() { return hide(this, "~standard", standardProps(this)); }, set "~standard"(value) { own(this, "~standard", value); }, }, ); /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */ const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }; async function validateAsync(inst, value) { const ctx = { async: true }; return toStandardResult( await inst._zod.run( { value, issues: [], }, ctx, ), ctx, ); } function standardProps(inst) { return { validate: (value) => { const ctx = { async: false }; try { const r = inst._zod.run( { value, issues: [], }, ctx, ); if (!(r instanceof Promise)) return toStandardResult(r, ctx); } catch (_) {} return validateAsync(inst, value); }, vendor: "zod", version: 1, }; } const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = def.pattern ?? anyString; inst._zod.parse = (payload, _) => { if (def.coerce) try { payload.value = String(payload.value); } catch (_) {} if (typeof payload.value === "string") return payload; payload.issues.push({ expected: "string", code: "invalid_type", input: payload.value, inst, }); return payload; }; }); const $ZodStringFormat = /*@__PURE__*/ $constructor( "$ZodStringFormat", (inst, def) => { $ZodCheckStringFormat.init(inst, def); $ZodString.init(inst, def); }, ); function canParseURL(input) { try { if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input); new URL(input); return true; } catch { return false; } } function validateURL(trimmed, def) { if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2; return parseURLObject(trimmed, def); } /** Parses a URL while preserving the non-normalizing HTTP guard. */ function parseURLObject(trimmed, def) { if ( !def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed) ) return 1; try { if (typeof URL !== "undefined") { const URLStatic = URL; if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2; } return new URL(trimmed); } catch { return 2; } } const asciiTabOrNewline = /[\t\n\r]/g; /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */ function stripTabAndNewline(value) { return value.replace(asciiTabOrNewline, ""); } function urlHostnameOk(url, hostname) { hostname.lastIndex = 0; return hostname.test(url.hostname); } function urlProtocolOk(url, protocol) { protocol.lastIndex = 0; return protocol.test( url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol, ); } const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => { $ZodStringFormat.init(inst, def); inst._zod.check = (payload) => { try { const trimmed = payload.value.trim(); const url = validateURL(trimmed, def); if (url === 1) { payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid URL format", input: payload.value, inst, continue: !def.abort, }); return; } if (url === 2) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); return; } if (url === true) { payload.value = stripTabAndNewline(trimmed); return; } if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid hostname", pattern: def.hostname.source, input: payload.value, inst, continue: !def.abort, }); if (def.protocol && !urlProtocolOk(url, def.protocol)) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid protocol", pattern: def.protocol.source, input: payload.value, inst, continue: !def.abort, }); payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed); return; } catch (_) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); } }; }); const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = number$1; inst._zod.parse = (payload, _ctx) => { if (def.coerce) try { payload.value = Number(payload.value); } catch (_) {} const input = payload.value; if ( typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input) ) return payload; const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? String(input) : void 0 : void 0; payload.issues.push({ expected: "number", code: "invalid_type", input, inst, ...(received ? { received } : {}), }); return payload; }; }); const $ZodDate = /*@__PURE__*/ $constructor("$ZodDate", (inst, def) => { $ZodType.init(inst, def); inst._zod.parse = (payload, _ctx) => { if (def.coerce) try { payload.value = new Date(payload.value); } catch (_err) {} const input = payload.value; const isDate = input instanceof Date; if (isDate && !Number.isNaN(input.getTime())) return payload; payload.issues.push({ expected: "date", code: "invalid_type", input, ...(isDate ? { received: "Invalid Date" } : {}), inst, }); return payload; }; }); function capSize(inst, size) { const caps = sizeCaps(inst._zod.def.checks); if (!caps.length) return; const cap = Math.min(...caps.map((c) => c[0])); const parse = inst._zod.parse; inst._zod.parse = (payload, ctx) => { const n = size(payload.value); if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") { for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) { const start = payload.issues.length; ch._zod.check(payload); payload.issues[start].continue = false; attachSchema(payload.issues, start, inst); return payload; } } return parse(payload, ctx); }; } const arraySize = (input) => (Array.isArray(input) ? input.length : -1); function handleArrayResult(result, final, index) { if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues)); final.value[index] = result.value; } const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => { $ZodType.init(inst, def); const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = (payload, ctx) => { const input = payload.value; if (!Array.isArray(input)) { payload.issues.push({ expected: "array", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length); const proms = []; const abortEarly = ctx?.abortEarly; for (let i = 0; i < input.length; i++) { const item = input[i]; const result = def.element._zod.run( { value: item, issues: [], }, ctx, ); if (result instanceof Promise) proms.push( result.then((result) => handleArrayResult(result, payload, i)), ); else { handleArrayResult(result, payload, i); if (abortEarly && result.issues.length !== 0 && aborted(result)) break; } } if (proms.length) return Promise.all(proms).then(() => payload); return payload; }; capSize(inst, arraySize); }); function handlePropertyResult(result, final, key, input, optin, optout) { const isPresent = key in input; const isOptionalOut = optout === "optional"; if (!isPresent && isOptionalOut && optin === "optional") return; if (result.issues.length) { if (optin !== void 0 && isOptionalOut && !isPresent) return; final.issues.push(...prefixIssues(key, result.issues)); } if (!isPresent && optin === void 0) { if (!result.issues.length) final.issues.push({ code: "invalid_type", expected: "nonoptional", input: void 0, path: [key], }); return; } if (result.value === void 0) { if (isPresent || (optin === "defaulted" && !isOptionalOut)) final.value[key] = void 0; } else final.value[key] = result.value; } const NO_SYMBOL_KEYS = []; function normalizeDef(def) { const keys = Object.keys(def.shape); const ownSymbols = Object.getOwnPropertySymbols(def.shape); const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS; const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys; for (const k of allKeys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error( `Invalid element at key "${String(k)}": expected a Zod schema`, ); const okeys = optionalKeys(def.shape); return { ...def, allKeys, symbolKeys, keySet: new Set(keys), numKeys: keys.length, optionalKeys: new Set(okeys), }; } function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) { const unrecognized = []; const keySet = def.keySet; const _catchall = def.catchall._zod; const t = _catchall.def.type; const optin = _catchall.optin; const optout = _catchall.optout; let seen = 0; for (const key in input) { if (abortEarly && payload.issues.length !== seen) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (keySet.has(key)) continue; if (key === "__proto__") { if (t === "never") unrecognized.push(key); continue; } if (t === "never") { unrecognized.push(key); continue; } const r = _catchall.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push( r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout), ), ); else handlePropertyResult(r, payload, key, input, optin, optout); } if (unrecognized.length) payload.issues.push({ code: "unrecognized_keys", keys: unrecognized, input, inst, continue: true, }); if (!proms.length) return payload; return Promise.all(proms).then(() => { return payload; }); } const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => { $ZodType.init(inst, def); const desc = Object.getOwnPropertyDescriptor(def, "shape"); const sh = desc?.get ? desc.get.raw : (def.shape ?? {}); if (sh) { const get = () => { const newSh = { ...sh }; Object.defineProperty(def, "shape", { value: newSh }); get.raw = newSh; return newSh; }; get.raw = sh; Object.defineProperty(def, "shape", { get }); } const _normalized = cached(() => normalizeDef(def)); defineLazyInternal(inst, "propValues", (zod) => { const shape = zod.def.shape; const propValues = {}; for (const key in shape) { const field = shape[key]._zod; if (field.values) { if (!Object.prototype.hasOwnProperty.call(propValues, key)) assignProp(propValues, key, /* @__PURE__ */ new Set()); for (const v of field.values) propValues[key].add(v); if (field.optin !== void 0) propValues[key].add(void 0); } } return propValues; }); const isObject$1 = isObject; const catchall = def.catchall; let value; const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = (payload, ctx) => { value ?? (value = _normalized.value); const input = payload.value; if (!isObject$1(input)) { payload.issues.push({ expected: "object", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {}; const proms = []; const shape = value.shape; const abortEarly = ctx?.abortEarly; let seen = payload.issues.length; for (const key of value.allKeys) { if (abortEarly && payload.issues.length !== seen) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (key === "__proto__") continue; const el = shape[key]; const optin = el._zod.optin; const optout = el._zod.optout; const r = el._zod.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push( r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout), ), ); else handlePropertyResult(r, payload, key, input, optin, optout); } if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload; return handleCatchall( proms, input, payload, ctx, _normalized.value, inst, abortEarly === true, ); }; }); const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => { $ZodType.init(inst, def); const values = getEnumValues(def.entries); const valuesSet = new Set(values); inst._zod.values = valuesSet; defineLazyInternal(inst, "pattern", (zod) => { const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k), ); return new RegExp( patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$", ); }); inst._zod.parse = (payload, _ctx) => { const input = payload.value; if (valuesSet.has(input)) return payload; payload.issues.push({ code: "invalid_value", values, input, inst, }); return payload; }; }); const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => { $ZodType.init(inst, def); defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin); defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout); defineLazyInternal(inst, "pattern", (zod) => { const pattern = zod.def.innerType._zod.pattern; return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; }); defineLazyInternal(inst, "values", (zod) => { return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([...zod.def.innerType._zod.values, null]) : void 0; }); inst._zod.parse = (payload, ctx) => { if (payload.value === null) return payload; return def.innerType._zod.run(payload, ctx); }; }); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.js function snapshotChecks(def) { if (def.checks) def.checks = [...def.checks]; return def; } // @__NO_SIDE_EFFECTS__ function _string(Class, params) { return new Class( snapshotChecks({ type: "string", ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _url(Class, params) { return new Class({ type: "string", format: "url", check: "string_format", abort: false, ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _number(Class, params) { return new Class( snapshotChecks({ type: "number", checks: [], ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _date(Class, params) { return new Class({ type: "date", ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _lte(value, params) { return new $ZodCheckLessThan({ check: "less_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _gte(value, params) { return new $ZodCheckGreaterThan({ check: "greater_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _maxLength(maximum, params) { return new $ZodCheckMaxLength({ check: "max_length", ...normalizeParams(params), maximum, }); } // @__NO_SIDE_EFFECTS__ function _minLength(minimum, params) { return new $ZodCheckMinLength({ check: "min_length", ...normalizeParams(params), minimum, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/mini/schemas.js const ZodMiniType = /*@__PURE__*/ $constructor( "ZodMiniType", (inst, def) => { if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType."); $ZodType.init(inst, def); inst.def = def; inst.type = def.type; }, { get with() { return this.check; }, set with(value) { own(this, "with", value); }, parse(data, params) { return parse(this, data, params, { callee: this.parse }); }, parseAsync(data, params) { return parseAsync(this, data, params, { callee: this.parseAsync }); }, safeParse(data, params) { return safeParse(this, data, params); }, safeParseAsync(data, params) { return safeParseAsync(this, data, params); }, check(...checks) { const def = this.def; return this.clone( { ...def, checks: [ ...(def.checks ?? []), ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [], }, } : ch, ), ], }, { parent: true }, ); }, clone(_def, params) { return clone(this, _def, params); }, brand() { return this; }, register(reg, meta) { reg.add(this, meta); return this; }, apply(fn, ...args) { return args.length === 0 ? fn(this) : fn(this, ...args); }, }, ); const ZodMiniString = /*@__PURE__*/ $constructor( "ZodMiniString", (inst, def) => { $ZodString.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function string(params) { return /* @__PURE__ */ _string(ZodMiniString, params); } const ZodMiniStringFormat = /*@__PURE__*/ $constructor( "ZodMiniStringFormat", (inst, def) => { $ZodStringFormat.init(inst, def); ZodMiniString.init(inst, def); }, ); const ZodMiniURL = /*@__PURE__*/ $constructor("ZodMiniURL", (inst, def) => { $ZodURL.init(inst, def); ZodMiniStringFormat.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function url(params) { return /* @__PURE__ */ _url(ZodMiniURL, params); } const ZodMiniNumber = /*@__PURE__*/ $constructor( "ZodMiniNumber", (inst, def) => { $ZodNumber.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function number(params) { return /* @__PURE__ */ _number(ZodMiniNumber, params); } const ZodMiniDate = /*@__PURE__*/ $constructor("ZodMiniDate", (inst, def) => { $ZodDate.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function date(params) { return /* @__PURE__ */ _date(ZodMiniDate, params); } const ZodMiniArray = /*@__PURE__*/ $constructor("ZodMiniArray", (inst, def) => { $ZodArray.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function array(element, params) { return new ZodMiniArray({ type: "array", element, ...normalizeParams(params), }); } const ZodMiniObject = /*@__PURE__*/ $constructor( "ZodMiniObject", (inst, def) => { $ZodObject.init(inst, def); ZodMiniType.init(inst, def); installLazyProp(inst, "shape", (self) => self._zod.def.shape, false); }, ); // @__NO_SIDE_EFFECTS__ function object(shape, params) { const def = { type: "object", shape: shape ?? {}, ...normalizeParams(params), }; return new ZodMiniObject(def); } const ZodMiniEnum = /*@__PURE__*/ $constructor("ZodMiniEnum", (inst, def) => { $ZodEnum.init(inst, def); ZodMiniType.init(inst, def); inst.options = [...inst._zod.values]; }); // @__NO_SIDE_EFFECTS__ function _enum(values, params) { const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; return new ZodMiniEnum({ type: "enum", entries, ...normalizeParams(params), }); } const ZodMiniNullable = /*@__PURE__*/ $constructor( "ZodMiniNullable", (inst, def) => { $ZodNullable.init(inst, def); ZodMiniType.init(inst, def); }, ); // @__NO_SIDE_EFFECTS__ function nullable(innerType) { return new ZodMiniNullable({ type: "nullable", innerType, }); } //#endregion //#region ../schemas/libraries/zod/mini/download/index.ts const imageSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), type: /* @__PURE__ */ _enum(["jpg", "png"]), size: /* @__PURE__ */ number(), url: /* @__PURE__ */ url(), }); const ratingSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), stars: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(5), ), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), text: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(1e3), ), images: /* @__PURE__ */ array(imageSchema), }); toZod()( /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), brand: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), description: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(500), ), price: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(1e4), ), discount: /* @__PURE__ */ nullable( /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(100), ), ), quantity: /* @__PURE__ */ number().check( /* @__PURE__ */ _gte(0), /* @__PURE__ */ _lte(10), ), tags: /* @__PURE__ */ array( /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), ), images: /* @__PURE__ */ array(imageSchema), ratings: /* @__PURE__ */ array(ratingSchema), }), ).parse({}); //#endregion
//#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js function toZod() { return (schema) => schema; } function getEnumValues(entries) { const numericValues = Object.values(entries).filter((v) => typeof v === "number"); return Object.entries(entries) .filter(([k, _]) => numericValues.indexOf(+k) === -1) .map(([_, v]) => v); } function jsonStringifyReplacer(_, value) { if (typeof value === "bigint") return value.toString(); return value; } var Cached = class { constructor(getter) { this._getter = getter; this._value = void 0; } get value() { const getter = this._getter; if (getter !== void 0) { this._value = getter(); this._getter = void 0; } return this._value; } }; function cached(getter) { return new Cached(getter); } function nullish(input) { return input === null || input === void 0; } function cleanRegex(source) { const start = source.startsWith("^") ? 1 : 0; const end = source.endsWith("$") ? source.length - 1 : source.length; return source.slice(start, end); } function assignProp(target, prop, value) { Object.defineProperty(target, prop, { value, writable: true, enumerable: true, configurable: true, }); } const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {}; function isObject(data) { return typeof data === "object" && data !== null && !Array.isArray(data); } const propertyKeyTypes = /* @__PURE__*/ new Set(["string", "number", "symbol"]); function escapeRegex(str) { return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function clone(inst, def, params) { const cl = new inst._zod.constr(def ?? inst._zod.def); if (!def || params?.parent) cl._zod.parent = inst; return cl; } function normalizeParams(_params) { const params = _params; if (!params) return {}; if (typeof params === "string") return { error: () => params }; if (params?.message !== void 0) { if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params"); params.error = params.message; } delete params.message; if (typeof params.error === "string") return { ...params, error: () => params.error, }; return params; } function optionalKeys(shape) { return Object.keys(shape).filter((k) => { return shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional"; }); } function aborted(x, startIndex = 0) { if (x.aborted === true) return true; for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true; return false; } function explicitlyAborted(x, startIndex = 0) { if (x.aborted === true) return true; for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue === false) return true; return false; } function prefixIssues(path, issues) { return issues.map((iss) => { var _a; (_a = iss).path ?? (_a.path = []); iss.path.unshift(path); return iss; }); } function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } /** The leading size checks of `defChecks` that set an upper bound, each paired with it. */ function sizeCaps(defChecks) { const caps = []; for (const ch of defChecks ?? []) { const d = ch._zod.def; if (!/_(length|size)$|_equals$/.test(d.check)) break; const max = d.maximum ?? d.length ?? d.size; if (max >= 0) caps.push([max, ch]); } return caps; } function attachSchema(issues, start, inst) { var _a; for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst); } function finalizeIssue(iss, ctx, config) { var _a; const traits = iss.inst?._zod?.traits; if (traits?.has("$ZodType")) { if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst); else iss.schema = iss.inst; } const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0; const message = iss.message ? iss.message : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input"); const full = {}; for (const k of Object.keys(iss)) { if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__") continue; full[k] = iss[k]; } full.path ?? (full.path = []); full.message = message; if (ctx?.reportInput) full.input = iss.input; return full; } const highSurrogate = /[\uD800-\uDBFF]/; function codePointLength(str) { const units = str.length; if (!highSurrogate.test(str)) return units; let count = units; for (let i = 0; i < units - 1; i++) if ((str.charCodeAt(i) & 64512) === 55296 && (str.charCodeAt(i + 1) & 64512) === 56320) { count--; i++; } return count; } function getLengthableOrigin(input) { if (Array.isArray(input)) return "array"; if (typeof input === "string") return "string"; return "unknown"; } /** * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working. * * Call this from a `proto` initializer, which runs once per prototype — never per instance. */ function members(proto, table) { for (const key in table) { const desc = Object.getOwnPropertyDescriptor(table, key); if (desc.get) Object.defineProperty(proto, key, { ...desc, enumerable: false, }); else defineBound(proto, key, desc.value); } } /** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */ function own(inst, key, value, enumerable = true) { Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value, }); return value; } /** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */ function hide(inst, key, value) { return own(inst, key, value, false); } function defineBound(proto, key, fn) { Object.defineProperty(proto, key, { configurable: true, get() { return this == null ? fn : own(this, key, fn.bind(this)); }, set(value) { own(this, key, value); }, }); } /** Returns the prototype to install on, or `undefined` if this group is already installed on it. */ function claim(inst, sentinel) { const proto = Object.getPrototypeOf(inst); return sentinel in proto ? void 0 : proto; } let installing; let broke = false; const breaker = { configurable: true, get() { broke = true; }, }; /** * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s * constructor, computed from the internals object itself and cached there on * first read. One accessor per constructor rather than one per instance. */ function defineLazyInternal(inst, key, compute) { const proto = Object.getPrototypeOf(inst._zod); if (key in proto && installing !== inst._zod) { installing = void 0; return; } installing = inst._zod; Object.defineProperty(proto, key, { configurable: true, get() { Object.defineProperty(this, key, breaker); const outer = broke; broke = false; try { const value = compute(this); if (broke) delete this[key]; else Object.defineProperty(this, key, { configurable: true, writable: true, value, }); broke = broke || outer; return value; } catch (err) { delete this[key]; broke = broke || outer; throw err; } }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, value, }); }, }); } /** * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own * data property. One accessor per constructor rather than one per instance, because an own accessor * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel. */ function installLazyProp(inst, key, make, enumerable) { const proto = claim(inst, key); if (!proto) return; Object.defineProperty(proto, key, { configurable: true, get() { const desc = { configurable: true, writable: true, enumerable, value: void 0, }; Object.defineProperty(this, key, desc); desc.value = make(this); Object.defineProperty(this, key, desc); return desc.value; }, set(value) { Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value, }); }, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.js var _a; const _zodDesc = { value: void 0, enumerable: false, }; let _E = "captureStackTrace" in Error ? Error : null; function newError(Definition) { const E = _E; if (E) { const saved = E.stackTraceLimit; if (typeof saved === "number") { try { E.stackTraceLimit = 0; } catch { _E = null; return new Definition(); } try { return new Definition(); } finally { E.stackTraceLimit = saved; } } } return new Definition(); } /* @__NO_SIDE_EFFECTS__ */ function $constructor(name, initializer, proto, params) { const zodProto = {}; function Internals(def) { this.def = def; this.constr = _; this.traits = /* @__PURE__ */ new Set(); } Internals.prototype = zodProto; const protoMembers = proto; const initialized = protoMembers && /* @__PURE__ */ new WeakSet(); function init(inst, def) { if (!inst._zod) { _zodDesc.value = new Internals(def); try { Object.defineProperty(inst, "_zod", _zodDesc); } finally { _zodDesc.value = void 0; } } else if (inst._zod.traits.has(name)) return; inst._zod.traits.add(name); initializer(inst, def); if (initialized) { const own = Object.getPrototypeOf(inst); const ctorProto = inst._zod.constr.prototype; let up = own; while (up && up !== ctorProto) up = Object.getPrototypeOf(up); const target = up ?? own; if (!initialized.has(target)) { initialized.add(target); members(target, protoMembers); } } const proto = _.prototype; for (const k in proto) { if (!Object.prototype.hasOwnProperty.call(proto, k)) continue; if (!(k in inst)) inst[k] = proto[k].bind(inst); } } const Parent = params?.Parent ?? Object; class Definition extends Parent {} Object.defineProperty(Definition, "name", { value: name }); function _(def) { const inst = params?.Parent ? newError(Definition) : this; init(inst, def); const deferred = inst._zod.deferred; if (deferred) { for (const fn of deferred) fn(); inst._zod.deferred = void 0; } const pp = globalThis.__zod_globalConfig?.postProcessor; if (pp) pp(inst); return inst; } Object.defineProperty(_, "init", { value: init }); Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => { if (params?.Parent && inst instanceof params.Parent) return true; return inst?._zod?.traits?.has(name); }, }); Object.defineProperty(_, "name", { value: name }); return _; } var $ZodAsyncError = class extends Error { constructor() { super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } }; (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {}); const globalConfig = globalThis.__zod_globalConfig; function config(newConfig) { if (newConfig) Object.assign(globalConfig, newConfig); return globalConfig; } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.js function _getMessage() { const internals = this._zod; internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2)); return internals.message; } function _setMessage(value) { this._zod.message = value; } const _messageDesc = { get: _getMessage, set: _setMessage, enumerable: true, configurable: true, }; const _issuesDesc = { value: void 0, enumerable: false, }; const _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]); const initializer = (inst, def) => { inst.name = "$ZodError"; _issuesDesc.value = def; Object.defineProperty(inst, "issues", _issuesDesc); _issuesDesc.value = void 0; Object.defineProperty(inst, "message", _messageDesc); const proto = Object.getPrototypeOf(inst); if (!_installedToString.has(proto)) { _installedToString.add(proto); Object.defineProperty(proto, "toString", { configurable: true, enumerable: false, get() { const value = () => this.message; Object.defineProperty(this, "toString", { value, configurable: true, writable: true, }); return value; }, set(value) { Object.defineProperty(this, "toString", { value, configurable: true, writable: true, }); }, }); } }; const $ZodRealError = /* @__PURE__ */ $constructor("$ZodError", initializer, void 0, { Parent: Error, }); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js const _parse = (_Err) => { const fn = (schema, value, _ctx, _params) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); if (result.issues.length) { const e = new (_params?.Err ?? _Err)( result.issues.map((iss) => finalizeIssue(iss, ctx, config())), ); captureStackTrace(e, _params?.callee ?? fn); throw e; } return result.value; }; return fn; }; const parse = /* @__PURE__*/ _parse($ZodRealError); const _parseAsync = (_Err) => { const fn = async (schema, value, _ctx, params) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; if (result.issues.length) { const e = new (params?.Err ?? _Err)( result.issues.map((iss) => finalizeIssue(iss, ctx, config())), ); captureStackTrace(e, params?.callee ?? fn); throw e; } return result.value; }; return fn; }; const parseAsync = /* @__PURE__*/ _parseAsync($ZodRealError); const _safeParse = (_Err) => (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: false, } : { async: false }; const result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) throw new $ZodAsyncError(); return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value, }; }; const safeParse = /* @__PURE__*/ _safeParse($ZodRealError); function failure(Err, issues, ctx) { let error; return { success: false, get error() { if (!error) { error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config()))); issues = void 0; ctx = void 0; } return error; }, set error(e) { error = e; issues = void 0; ctx = void 0; }, }; } const _safeParseAsync = (_Err) => async (schema, value, _ctx) => { const ctx = _ctx ? { ..._ctx, async: true, } : { async: true }; let result = schema._zod.run( { value, issues: [], }, ctx, ); if (result instanceof Promise) result = await result; return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value, }; }; const safeParseAsync = /* @__PURE__*/ _safeParseAsync($ZodRealError); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js const httpProtocol = /^https?$/; const anyString = /^[\s\S]{0,}$/; const number$1 = /^-?\d+(?:\.\d+)?$/; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); inst._zod.def = def; (_a = inst._zod).onattach ?? (_a.onattach = []); }); /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */ const _whenHasLength = (payload) => { const val = payload.value; return !nullish(val) && val.length !== void 0; }; const numericOriginMap = { number: "number", bigint: "bigint", object: "date", }; const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[typeof def.value]; inst._zod.check = (payload) => { if (def.inclusive ? payload.value <= def.value : payload.value < def.value) return; payload.issues.push({ origin: numericOriginMap[typeof payload.value] ?? origin, code: "too_big", maximum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }); const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => { $ZodCheck.init(inst, def); const origin = numericOriginMap[typeof def.value]; inst._zod.check = (payload) => { if (def.inclusive ? payload.value >= def.value : payload.value > def.value) return; payload.issues.push({ origin: numericOriginMap[typeof payload.value] ?? origin, code: "too_small", minimum: typeof def.value === "object" ? def.value.getTime() : def.value, input: payload.value, inclusive: def.inclusive, inst, continue: !def.abort, }); }; }); const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_big", maximum: def.maximum, inclusive: true, input, inst, continue: !def.abort, }); }; }); const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => { var _a; $ZodCheck.init(inst, def); (_a = inst._zod.def).when ?? (_a.when = _whenHasLength); inst._zod.check = (payload) => { const input = payload.value; const units = input.length; if ( (typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum ) return; const origin = getLengthableOrigin(input); payload.issues.push({ origin, code: "too_small", minimum: def.minimum, inclusive: true, input, inst, continue: !def.abort, }); }; }); const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => { var _a, _b; $ZodCheck.init(inst, def); if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => { def.pattern.lastIndex = 0; if (def.pattern.test(payload.value)) return; payload.issues.push({ origin: "string", code: "invalid_format", format: def.format, input: payload.value, ...(def.pattern ? { pattern: def.pattern.toString() } : {}), inst, continue: !def.abort, }); }); else (_b = inst._zod).check ?? (_b.check = () => {}); }); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.js const version = { major: 4, minor: 6, patch: 7, }; //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.js const $ZodType = /*@__PURE__*/ $constructor( "$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); inst._zod.def = def; inst._zod.bag = inst._zod.bag || {}; inst._zod.version = version; const defChecks = inst._zod.def.checks; const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...(defChecks ?? [])] : defChecks?.length ? [...defChecks] : []; for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst); if (checks.length === 0) { (_a = inst._zod).deferred ?? (_a.deferred = []); inst._zod.deferred?.push(() => { inst._zod.run = inst._zod.parse; }); } else { const runChecks = (payload, checks, ctx) => { if (payload.memo) return payload; let isAborted = aborted(payload); let asyncResult; for (const ch of checks) { if (ch._zod.def.when) { if (explicitlyAborted(payload)) continue; if (!ch._zod.def.when(payload)) continue; } else if (isAborted) continue; const currLen = payload.issues.length; const _ = ch._zod.check(payload); if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError(); if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { await _; if (payload.issues.length === currLen) return; attachSchema(payload.issues, currLen, inst); if (!isAborted) isAborted = aborted(payload, currLen); }); else { if (payload.issues.length === currLen) continue; attachSchema(payload.issues, currLen, inst); if (!isAborted) isAborted = aborted(payload, currLen); } } if (asyncResult) return asyncResult.then(() => { return payload; }); return payload; }; const handleCanaryResult = (canary, payload, ctx) => { if (aborted(canary)) { canary.aborted = true; return canary; } const checkResult = runChecks(payload, checks, ctx); if (checkResult instanceof Promise) { if (ctx.async === false) throw new $ZodAsyncError(); return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx)); } return inst._zod.parse(checkResult, ctx); }; inst._zod.run = (payload, ctx) => { if (ctx.skipChecks) return inst._zod.parse(payload, ctx); if (ctx.direction === "backward") { const canary = inst._zod.parse( { value: payload.value, issues: [], }, { ...ctx, skipChecks: true, }, ); if (canary instanceof Promise) return canary.then((canary) => { return handleCanaryResult(canary, payload, ctx); }); return handleCanaryResult(canary, payload, ctx); } const result = inst._zod.parse(payload, ctx); if (result instanceof Promise) { if (ctx.async === false) throw new $ZodAsyncError(); return result.then((result) => runChecks(result, checks, ctx)); } return runChecks(result, checks, ctx); }; } }, { get "~standard"() { return hide(this, "~standard", standardProps(this)); }, set "~standard"(value) { own(this, "~standard", value); }, }, ); /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */ const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }; async function validateAsync(inst, value) { const ctx = { async: true }; return toStandardResult( await inst._zod.run( { value, issues: [], }, ctx, ), ctx, ); } function standardProps(inst) { return { validate: (value) => { const ctx = { async: false }; try { const r = inst._zod.run( { value, issues: [], }, ctx, ); if (!(r instanceof Promise)) return toStandardResult(r, ctx); } catch (_) {} return validateAsync(inst, value); }, vendor: "zod", version: 1, }; } const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = def.pattern ?? anyString; inst._zod.parse = (payload, _) => { if (def.coerce) try { payload.value = String(payload.value); } catch (_) {} if (typeof payload.value === "string") return payload; payload.issues.push({ expected: "string", code: "invalid_type", input: payload.value, inst, }); return payload; }; }); const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => { $ZodCheckStringFormat.init(inst, def); $ZodString.init(inst, def); }); function canParseURL(input) { try { if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input); new URL(input); return true; } catch { return false; } } function validateURL(trimmed, def) { if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2; return parseURLObject(trimmed, def); } /** Parses a URL while preserving the non-normalizing HTTP guard. */ function parseURLObject(trimmed, def) { if ( !def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed) ) return 1; try { if (typeof URL !== "undefined") { const URLStatic = URL; if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2; } return new URL(trimmed); } catch { return 2; } } const asciiTabOrNewline = /[\t\n\r]/g; /** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL("https://exa\nmple.com")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */ function stripTabAndNewline(value) { return value.replace(asciiTabOrNewline, ""); } function urlHostnameOk(url, hostname) { hostname.lastIndex = 0; return hostname.test(url.hostname); } function urlProtocolOk(url, protocol) { protocol.lastIndex = 0; return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol); } const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => { $ZodStringFormat.init(inst, def); inst._zod.check = (payload) => { try { const trimmed = payload.value.trim(); const url = validateURL(trimmed, def); if (url === 1) { payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid URL format", input: payload.value, inst, continue: !def.abort, }); return; } if (url === 2) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); return; } if (url === true) { payload.value = stripTabAndNewline(trimmed); return; } if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid hostname", pattern: def.hostname.source, input: payload.value, inst, continue: !def.abort, }); if (def.protocol && !urlProtocolOk(url, def.protocol)) payload.issues.push({ code: "invalid_format", format: "url", note: "Invalid protocol", pattern: def.protocol.source, input: payload.value, inst, continue: !def.abort, }); payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed); return; } catch (_) { payload.issues.push({ code: "invalid_format", format: "url", input: payload.value, inst, continue: !def.abort, }); } }; }); const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => { $ZodType.init(inst, def); inst._zod.pattern = number$1; inst._zod.parse = (payload, _ctx) => { if (def.coerce) try { payload.value = Number(payload.value); } catch (_) {} const input = payload.value; if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload; const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? String(input) : void 0 : void 0; payload.issues.push({ expected: "number", code: "invalid_type", input, inst, ...(received ? { received } : {}), }); return payload; }; }); const $ZodDate = /*@__PURE__*/ $constructor("$ZodDate", (inst, def) => { $ZodType.init(inst, def); inst._zod.parse = (payload, _ctx) => { if (def.coerce) try { payload.value = new Date(payload.value); } catch (_err) {} const input = payload.value; const isDate = input instanceof Date; if (isDate && !Number.isNaN(input.getTime())) return payload; payload.issues.push({ expected: "date", code: "invalid_type", input, ...(isDate ? { received: "Invalid Date" } : {}), inst, }); return payload; }; }); function capSize(inst, size) { const caps = sizeCaps(inst._zod.def.checks); if (!caps.length) return; const cap = Math.min(...caps.map((c) => c[0])); const parse = inst._zod.parse; inst._zod.parse = (payload, ctx) => { const n = size(payload.value); if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") { for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) { const start = payload.issues.length; ch._zod.check(payload); payload.issues[start].continue = false; attachSchema(payload.issues, start, inst); return payload; } } return parse(payload, ctx); }; } const arraySize = (input) => (Array.isArray(input) ? input.length : -1); function handleArrayResult(result, final, index) { if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues)); final.value[index] = result.value; } const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => { $ZodType.init(inst, def); const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = (payload, ctx) => { const input = payload.value; if (!Array.isArray(input)) { payload.issues.push({ expected: "array", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length); const proms = []; const abortEarly = ctx?.abortEarly; for (let i = 0; i < input.length; i++) { const item = input[i]; const result = def.element._zod.run( { value: item, issues: [], }, ctx, ); if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i))); else { handleArrayResult(result, payload, i); if (abortEarly && result.issues.length !== 0 && aborted(result)) break; } } if (proms.length) return Promise.all(proms).then(() => payload); return payload; }; capSize(inst, arraySize); }); function handlePropertyResult(result, final, key, input, optin, optout) { const isPresent = key in input; const isOptionalOut = optout === "optional"; if (!isPresent && isOptionalOut && optin === "optional") return; if (result.issues.length) { if (optin !== void 0 && isOptionalOut && !isPresent) return; final.issues.push(...prefixIssues(key, result.issues)); } if (!isPresent && optin === void 0) { if (!result.issues.length) final.issues.push({ code: "invalid_type", expected: "nonoptional", input: void 0, path: [key], }); return; } if (result.value === void 0) { if (isPresent || (optin === "defaulted" && !isOptionalOut)) final.value[key] = void 0; } else final.value[key] = result.value; } const NO_SYMBOL_KEYS = []; function normalizeDef(def) { const keys = Object.keys(def.shape); const ownSymbols = Object.getOwnPropertySymbols(def.shape); const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS; const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys; for (const k of allKeys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${String(k)}": expected a Zod schema`); const okeys = optionalKeys(def.shape); return { ...def, allKeys, symbolKeys, keySet: new Set(keys), numKeys: keys.length, optionalKeys: new Set(okeys), }; } function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) { const unrecognized = []; const keySet = def.keySet; const _catchall = def.catchall._zod; const t = _catchall.def.type; const optin = _catchall.optin; const optout = _catchall.optout; let seen = 0; for (const key in input) { if (abortEarly && payload.issues.length !== seen) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (keySet.has(key)) continue; if (key === "__proto__") { if (t === "never") unrecognized.push(key); continue; } if (t === "never") { unrecognized.push(key); continue; } const r = _catchall.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout))); else handlePropertyResult(r, payload, key, input, optin, optout); } if (unrecognized.length) payload.issues.push({ code: "unrecognized_keys", keys: unrecognized, input, inst, continue: true, }); if (!proms.length) return payload; return Promise.all(proms).then(() => { return payload; }); } const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => { $ZodType.init(inst, def); const desc = Object.getOwnPropertyDescriptor(def, "shape"); const sh = desc?.get ? desc.get.raw : (def.shape ?? {}); if (sh) { const get = () => { const newSh = { ...sh }; Object.defineProperty(def, "shape", { value: newSh }); get.raw = newSh; return newSh; }; get.raw = sh; Object.defineProperty(def, "shape", { get }); } const _normalized = cached(() => normalizeDef(def)); defineLazyInternal(inst, "propValues", (zod) => { const shape = zod.def.shape; const propValues = {}; for (const key in shape) { const field = shape[key]._zod; if (field.values) { if (!Object.prototype.hasOwnProperty.call(propValues, key)) assignProp(propValues, key, /* @__PURE__ */ new Set()); for (const v of field.values) propValues[key].add(v); if (field.optin !== void 0) propValues[key].add(void 0); } } return propValues; }); const isObject$1 = isObject; const catchall = def.catchall; let value; const memo = globalConfig.memoizer; memo?.attach(inst); inst._zod.parse = (payload, ctx) => { value ?? (value = _normalized.value); const input = payload.value; if (!isObject$1(input)) { payload.issues.push({ expected: "object", code: "invalid_type", input, inst, }); return payload; } payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {}; const proms = []; const shape = value.shape; const abortEarly = ctx?.abortEarly; let seen = payload.issues.length; for (const key of value.allKeys) { if (abortEarly && payload.issues.length !== seen) { if (aborted(payload, seen)) break; seen = payload.issues.length; } if (key === "__proto__") continue; const el = shape[key]; const optin = el._zod.optin; const optout = el._zod.optout; const r = el._zod.run( { value: input[key], issues: [], }, ctx, ); if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout))); else handlePropertyResult(r, payload, key, input, optin, optout); } if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload; return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true); }; }); const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => { $ZodType.init(inst, def); const values = getEnumValues(def.entries); const valuesSet = new Set(values); inst._zod.values = valuesSet; defineLazyInternal(inst, "pattern", (zod) => { const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k), ); return new RegExp( patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$", ); }); inst._zod.parse = (payload, _ctx) => { const input = payload.value; if (valuesSet.has(input)) return payload; payload.issues.push({ code: "invalid_value", values, input, inst, }); return payload; }; }); const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => { $ZodType.init(inst, def); defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin); defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout); defineLazyInternal(inst, "pattern", (zod) => { const pattern = zod.def.innerType._zod.pattern; return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; }); defineLazyInternal(inst, "values", (zod) => { return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([...zod.def.innerType._zod.values, null]) : void 0; }); inst._zod.parse = (payload, ctx) => { if (payload.value === null) return payload; return def.innerType._zod.run(payload, ctx); }; }); //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.js function snapshotChecks(def) { if (def.checks) def.checks = [...def.checks]; return def; } // @__NO_SIDE_EFFECTS__ function _string(Class, params) { return new Class( snapshotChecks({ type: "string", ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _url(Class, params) { return new Class({ type: "string", format: "url", check: "string_format", abort: false, ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _number(Class, params) { return new Class( snapshotChecks({ type: "number", checks: [], ...normalizeParams(params), }), ); } // @__NO_SIDE_EFFECTS__ function _date(Class, params) { return new Class({ type: "date", ...normalizeParams(params), }); } // @__NO_SIDE_EFFECTS__ function _lte(value, params) { return new $ZodCheckLessThan({ check: "less_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _gte(value, params) { return new $ZodCheckGreaterThan({ check: "greater_than", ...normalizeParams(params), value, inclusive: true, }); } // @__NO_SIDE_EFFECTS__ function _maxLength(maximum, params) { return new $ZodCheckMaxLength({ check: "max_length", ...normalizeParams(params), maximum, }); } // @__NO_SIDE_EFFECTS__ function _minLength(minimum, params) { return new $ZodCheckMinLength({ check: "min_length", ...normalizeParams(params), minimum, }); } //#endregion //#region ../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/mini/schemas.js const ZodMiniType = /*@__PURE__*/ $constructor( "ZodMiniType", (inst, def) => { if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType."); $ZodType.init(inst, def); inst.def = def; inst.type = def.type; }, { get with() { return this.check; }, set with(value) { own(this, "with", value); }, parse(data, params) { return parse(this, data, params, { callee: this.parse }); }, parseAsync(data, params) { return parseAsync(this, data, params, { callee: this.parseAsync }); }, safeParse(data, params) { return safeParse(this, data, params); }, safeParseAsync(data, params) { return safeParseAsync(this, data, params); }, check(...checks) { const def = this.def; return this.clone( { ...def, checks: [ ...(def.checks ?? []), ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [], }, } : ch, ), ], }, { parent: true }, ); }, clone(_def, params) { return clone(this, _def, params); }, brand() { return this; }, register(reg, meta) { reg.add(this, meta); return this; }, apply(fn, ...args) { return args.length === 0 ? fn(this) : fn(this, ...args); }, }, ); const ZodMiniString = /*@__PURE__*/ $constructor("ZodMiniString", (inst, def) => { $ZodString.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function string(params) { return /* @__PURE__ */ _string(ZodMiniString, params); } const ZodMiniStringFormat = /*@__PURE__*/ $constructor("ZodMiniStringFormat", (inst, def) => { $ZodStringFormat.init(inst, def); ZodMiniString.init(inst, def); }); const ZodMiniURL = /*@__PURE__*/ $constructor("ZodMiniURL", (inst, def) => { $ZodURL.init(inst, def); ZodMiniStringFormat.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function url(params) { return /* @__PURE__ */ _url(ZodMiniURL, params); } const ZodMiniNumber = /*@__PURE__*/ $constructor("ZodMiniNumber", (inst, def) => { $ZodNumber.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function number(params) { return /* @__PURE__ */ _number(ZodMiniNumber, params); } const ZodMiniDate = /*@__PURE__*/ $constructor("ZodMiniDate", (inst, def) => { $ZodDate.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function date(params) { return /* @__PURE__ */ _date(ZodMiniDate, params); } const ZodMiniArray = /*@__PURE__*/ $constructor("ZodMiniArray", (inst, def) => { $ZodArray.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function array(element, params) { return new ZodMiniArray({ type: "array", element, ...normalizeParams(params), }); } const ZodMiniObject = /*@__PURE__*/ $constructor("ZodMiniObject", (inst, def) => { $ZodObject.init(inst, def); ZodMiniType.init(inst, def); installLazyProp(inst, "shape", (self) => self._zod.def.shape, false); }); // @__NO_SIDE_EFFECTS__ function object(shape, params) { const def = { type: "object", shape: shape ?? {}, ...normalizeParams(params), }; return new ZodMiniObject(def); } const ZodMiniEnum = /*@__PURE__*/ $constructor("ZodMiniEnum", (inst, def) => { $ZodEnum.init(inst, def); ZodMiniType.init(inst, def); inst.options = [...inst._zod.values]; }); // @__NO_SIDE_EFFECTS__ function _enum(values, params) { const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; return new ZodMiniEnum({ type: "enum", entries, ...normalizeParams(params), }); } const ZodMiniNullable = /*@__PURE__*/ $constructor("ZodMiniNullable", (inst, def) => { $ZodNullable.init(inst, def); ZodMiniType.init(inst, def); }); // @__NO_SIDE_EFFECTS__ function nullable(innerType) { return new ZodMiniNullable({ type: "nullable", innerType, }); } //#endregion //#region ../schemas/libraries/zod/mini/download/index.ts const imageSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), type: /* @__PURE__ */ _enum(["jpg", "png"]), size: /* @__PURE__ */ number(), url: /* @__PURE__ */ url(), }); const ratingSchema = /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), stars: /* @__PURE__ */ number().check(/* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(5)), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), text: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(1e3), ), images: /* @__PURE__ */ array(imageSchema), }); toZod()( /* @__PURE__ */ object({ id: /* @__PURE__ */ number(), created: /* @__PURE__ */ date(), title: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(100), ), brand: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30), ), description: /* @__PURE__ */ string().check( /* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(500), ), price: /* @__PURE__ */ number().check(/* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(1e4)), discount: /* @__PURE__ */ nullable( /* @__PURE__ */ number().check(/* @__PURE__ */ _gte(1), /* @__PURE__ */ _lte(100)), ), quantity: /* @__PURE__ */ number().check(/* @__PURE__ */ _gte(0), /* @__PURE__ */ _lte(10)), tags: /* @__PURE__ */ array( /* @__PURE__ */ string().check(/* @__PURE__ */ _minLength(1), /* @__PURE__ */ _maxLength(30)), ), images: /* @__PURE__ */ array(imageSchema), ratings: /* @__PURE__ */ array(ratingSchema), }), ).parse({}); //#endregion