diff --git a/dist/main.js b/dist/main.js index bc33908..5e48266 100644 --- a/dist/main.js +++ b/dist/main.js @@ -44,7 +44,7 @@ var require_tunnel = __commonJS({ var http3 = __require("http"); var https2 = __require("https"); var events = __require("events"); - var assert4 = __require("assert"); + var assert3 = __require("assert"); var util3 = __require("util"); exports.httpOverHttp = httpOverHttp2; exports.httpsOverHttp = httpsOverHttp2; @@ -163,18 +163,18 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error100 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error100.code = "ECONNRESET"; - options.request.emit("error", error100); + var error99 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error99.code = "ECONNRESET"; + options.request.emit("error", error99); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug2("got illegal response body from proxy"); socket.destroy(); - var error100 = new Error("got illegal response body from proxy"); - error100.code = "ECONNRESET"; - options.request.emit("error", error100); + var error99 = new Error("got illegal response body from proxy"); + error99.code = "ECONNRESET"; + options.request.emit("error", error99); self2.removeSocket(placeholder); return; } @@ -189,9 +189,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error100 = new Error("tunneling socket could not be established, cause=" + cause.message); - error100.code = "ECONNRESET"; - options.request.emit("error", error100); + var error99 = new Error("tunneling socket could not be established, cause=" + cause.message); + error99.code = "ECONNRESET"; + options.request.emit("error", error99); self2.removeSocket(placeholder); } }; @@ -962,7 +962,7 @@ var require_tree = __commonJS({ var require_util = __commonJS({ "node_modules/undici/lib/core/util.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { kDestroyed, kBodyUsed, kListeners, kBody } = require_symbols(); var { IncomingMessage } = __require("node:http"); var stream4 = __require("node:stream"); @@ -981,7 +981,7 @@ var require_util = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert4(!this[kBodyUsed], "disturbed"); + assert3(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -990,7 +990,7 @@ var require_util = __commonJS({ if (isStream2(body)) { if (bodyLength(body) === 0) { body.on("data", function() { - assert4(false); + assert3(false); }); } if (typeof body.readableDidRead !== "boolean") { @@ -1013,27 +1013,27 @@ var require_util = __commonJS({ function isStream2(obj) { return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } - function isBlobLike(object4) { - if (object4 === null) { + function isBlobLike(object3) { + if (object3 === null) { return false; - } else if (object4 instanceof Blob2) { + } else if (object3 instanceof Blob2) { return true; - } else if (typeof object4 !== "object") { + } else if (typeof object3 !== "object") { return false; } else { - const sTag = object4[Symbol.toStringTag]; - return (sTag === "Blob" || sTag === "File") && ("stream" in object4 && typeof object4.stream === "function" || "arrayBuffer" in object4 && typeof object4.arrayBuffer === "function"); + const sTag = object3[Symbol.toStringTag]; + return (sTag === "Blob" || sTag === "File") && ("stream" in object3 && typeof object3.stream === "function" || "arrayBuffer" in object3 && typeof object3.arrayBuffer === "function"); } } - function buildURL2(url5, queryParams) { - if (url5.includes("?") || url5.includes("#")) { + function buildURL2(url4, queryParams) { + if (url4.includes("?") || url4.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url5 += "?" + stringified; + url4 += "?" + stringified; } - return url5; + return url4; } function isValidPort(port) { const value = parseInt(port, 10); @@ -1042,39 +1042,39 @@ var require_util = __commonJS({ function isHttpOrHttpsPrefixed(value) { return value != null && value[0] === "h" && value[1] === "t" && value[2] === "t" && value[3] === "p" && (value[4] === ":" || value[4] === "s" && value[5] === ":"); } - function parseURL(url5) { - if (typeof url5 === "string") { - url5 = new URL(url5); - if (!isHttpOrHttpsPrefixed(url5.origin || url5.protocol)) { + function parseURL(url4) { + if (typeof url4 === "string") { + url4 = new URL(url4); + if (!isHttpOrHttpsPrefixed(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url5; + return url4; } - if (!url5 || typeof url5 !== "object") { + if (!url4 || typeof url4 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!(url5 instanceof URL)) { - if (url5.port != null && url5.port !== "" && isValidPort(url5.port) === false) { + if (!(url4 instanceof URL)) { + if (url4.port != null && url4.port !== "" && isValidPort(url4.port) === false) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url5.path != null && typeof url5.path !== "string") { + if (url4.path != null && typeof url4.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url5.pathname != null && typeof url5.pathname !== "string") { + if (url4.pathname != null && typeof url4.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url5.hostname != null && typeof url5.hostname !== "string") { + if (url4.hostname != null && typeof url4.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url5.origin != null && typeof url5.origin !== "string") { + if (url4.origin != null && typeof url4.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - if (!isHttpOrHttpsPrefixed(url5.origin || url5.protocol)) { + if (!isHttpOrHttpsPrefixed(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - const port = url5.port != null ? url5.port : url5.protocol === "https:" ? 443 : 80; - let origin2 = url5.origin != null ? url5.origin : `${url5.protocol || ""}//${url5.hostname || ""}:${port}`; - let path = url5.path != null ? url5.path : `${url5.pathname || ""}${url5.search || ""}`; + const port = url4.port != null ? url4.port : url4.protocol === "https:" ? 443 : 80; + let origin2 = url4.origin != null ? url4.origin : `${url4.protocol || ""}//${url4.hostname || ""}:${port}`; + let path = url4.path != null ? url4.path : `${url4.pathname || ""}${url4.search || ""}`; if (origin2[origin2.length - 1] === "/") { origin2 = origin2.slice(0, origin2.length - 1); } @@ -1083,22 +1083,22 @@ var require_util = __commonJS({ } return new URL(`${origin2}${path}`); } - if (!isHttpOrHttpsPrefixed(url5.origin || url5.protocol)) { + if (!isHttpOrHttpsPrefixed(url4.origin || url4.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url5; + return url4; } - function parseOrigin(url5) { - url5 = parseURL(url5); - if (url5.pathname !== "/" || url5.search || url5.hash) { + function parseOrigin(url4) { + url4 = parseURL(url4); + if (url4.pathname !== "/" || url4.search || url4.hash) { throw new InvalidArgumentError("invalid url"); } - return url5; + return url4; } function getHostname(host) { if (host[0] === "[") { const idx2 = host.indexOf("]"); - assert4(idx2 !== -1); + assert3(idx2 !== -1); return host.substring(1, idx2); } const idx = host.indexOf(":"); @@ -1109,7 +1109,7 @@ var require_util = __commonJS({ if (!host) { return null; } - assert4(typeof host === "string"); + assert3(typeof host === "string"); const servername = getHostname(host); if (net.isIP(servername)) { return ""; @@ -1304,8 +1304,8 @@ var require_util = __commonJS({ } ); } - function isFormDataLike(object4) { - return object4 && typeof object4 === "object" && typeof object4.append === "function" && typeof object4.delete === "function" && typeof object4.get === "function" && typeof object4.getAll === "function" && typeof object4.has === "function" && typeof object4.set === "function" && object4[Symbol.toStringTag] === "FormData"; + function isFormDataLike(object3) { + return object3 && typeof object3 === "object" && typeof object3.append === "function" && typeof object3.delete === "function" && typeof object3.get === "function" && typeof object3.getAll === "function" && typeof object3.has === "function" && typeof object3.set === "function" && object3[Symbol.toStringTag] === "FormData"; } function addAbortListener(signal, listener) { if ("addEventListener" in signal) { @@ -1383,10 +1383,10 @@ var require_util = __commonJS({ } obj[kListeners] = null; } - function errorRequest(client, request3, err) { + function errorRequest(client, request2, err) { try { - request3.onError(err); - assert4(request3.aborted); + request2.onError(err); + assert3(request2.aborted); } catch (err2) { client.emit("error", err2); } @@ -1497,37 +1497,37 @@ var require_diagnostics = __commonJS({ const debuglog = fetchDebuglog.enabled ? fetchDebuglog : undiciDebugLog; diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { const { - connectParams: { version: version4, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debuglog( "connecting to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, - version4 + version3 ); }); diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { const { - connectParams: { version: version4, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debuglog( "connected to %s using %s%s", `${host}${port ? `:${port}` : ""}`, protocol, - version4 + version3 ); }); diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { - connectParams: { version: version4, protocol, port, host }, - error: error100 + connectParams: { version: version3, protocol, port, host }, + error: error99 } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, - version4, - error100.message + version3, + error99.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1558,14 +1558,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path, origin: origin2 }, - error: error100 + error: error99 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin2, path, - error100.message + error99.message ); }); isClientSet = true; @@ -1575,40 +1575,40 @@ var require_diagnostics = __commonJS({ const debuglog = undiciDebugLog.enabled ? undiciDebugLog : websocketDebuglog; diagnosticsChannel.channel("undici:client:beforeConnect").subscribe((evt) => { const { - connectParams: { version: version4, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debuglog( "connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version4 + version3 ); }); diagnosticsChannel.channel("undici:client:connected").subscribe((evt) => { const { - connectParams: { version: version4, protocol, port, host } + connectParams: { version: version3, protocol, port, host } } = evt; debuglog( "connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version4 + version3 ); }); diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { - connectParams: { version: version4, protocol, port, host }, - error: error100 + connectParams: { version: version3, protocol, port, host }, + error: error99 } = evt; debuglog( "connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, - version4, - error100.message + version3, + error99.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -1657,7 +1657,7 @@ var require_request = __commonJS({ InvalidArgumentError, NotSupportedError } = require_errors(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { isValidHTTPToken, isValidHeaderValue, @@ -1826,8 +1826,8 @@ var require_request = __commonJS({ } } onConnect(abort) { - assert4(!this.aborted); - assert4(!this.completed); + assert3(!this.aborted); + assert3(!this.completed); if (this.error) { abort(this.error); } else { @@ -1839,8 +1839,8 @@ var require_request = __commonJS({ return this[kHandler].onResponseStarted?.(); } onHeaders(statusCode, headers, resume, statusText) { - assert4(!this.aborted); - assert4(!this.completed); + assert3(!this.aborted); + assert3(!this.completed); if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } @@ -1851,8 +1851,8 @@ var require_request = __commonJS({ } } onData(chunk) { - assert4(!this.aborted); - assert4(!this.completed); + assert3(!this.aborted); + assert3(!this.completed); try { return this[kHandler].onData(chunk); } catch (err) { @@ -1861,13 +1861,13 @@ var require_request = __commonJS({ } } onUpgrade(statusCode, headers, socket) { - assert4(!this.aborted); - assert4(!this.completed); + assert3(!this.aborted); + assert3(!this.completed); return this[kHandler].onUpgrade(statusCode, headers, socket); } onComplete(trailers) { this.onFinally(); - assert4(!this.aborted); + assert3(!this.aborted); this.completed = true; if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }); @@ -1878,16 +1878,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error100) { + onError(error99) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error100 }); + channels.error.publish({ request: this, error: error99 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error100); + return this[kHandler].onError(error99); } onFinally() { if (this.errorHandler) { @@ -1904,7 +1904,7 @@ var require_request = __commonJS({ return this; } }; - function processHeader(request3, key, val) { + function processHeader(request2, key, val) { if (val && (typeof val === "object" && !Array.isArray(val))) { throw new InvalidArgumentError(`invalid ${key} header`); } else if (val === void 0) { @@ -1944,24 +1944,24 @@ var require_request = __commonJS({ val = `${val}`; } if (headerName === "host") { - if (request3.host !== null) { + if (request2.host !== null) { throw new InvalidArgumentError("duplicate host header"); } if (typeof val !== "string") { throw new InvalidArgumentError("invalid host header"); } - request3.host = val; + request2.host = val; } else if (headerName === "content-length") { - if (request3.contentLength !== null) { + if (request2.contentLength !== null) { throw new InvalidArgumentError("duplicate content-length header"); } - request3.contentLength = parseInt(val, 10); - if (!Number.isFinite(request3.contentLength)) { + request2.contentLength = parseInt(val, 10); + if (!Number.isFinite(request2.contentLength)) { throw new InvalidArgumentError("invalid content-length header"); } - } else if (request3.contentType === null && headerName === "content-type") { - request3.contentType = val; - request3.headers.push(key, val); + } else if (request2.contentType === null && headerName === "content-type") { + request2.contentType = val; + request2.headers.push(key, val); } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { throw new InvalidArgumentError(`invalid ${headerName} header`); } else if (headerName === "connection") { @@ -1970,12 +1970,12 @@ var require_request = __commonJS({ throw new InvalidArgumentError("invalid connection header"); } if (value === "close") { - request3.reset = true; + request2.reset = true; } } else if (headerName === "expect") { throw new NotSupportedError("expect header not supported"); } else { - request3.headers.push(key, val); + request2.headers.push(key, val); } } module.exports = Request; @@ -2441,11 +2441,11 @@ var require_connect = __commonJS({ "node_modules/undici/lib/core/connect.js"(exports, module) { "use strict"; var net = __require("node:net"); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var util3 = require_util(); var { InvalidArgumentError, ConnectTimeoutError } = require_errors(); var timers = require_timers(); - function noop6() { + function noop5() { } var tls; var SessionCache; @@ -2505,15 +2505,15 @@ var require_connect = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname6, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname5, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = __require("node:tls"); } servername = servername || options.servername || util3.getServerName(host) || null; - const sessionKey = servername || hostname6; - assert4(sessionKey); + const sessionKey = servername || hostname5; + assert3(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; port = port || 443; socket = tls.connect({ @@ -2528,13 +2528,13 @@ var require_connect = __commonJS({ socket: httpSocket, // upgrade socket connection port, - host: hostname6 + host: hostname5 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); }); } else { - assert4(!httpSocket, "httpSocket can only be sent on TLS update"); + assert3(!httpSocket, "httpSocket can only be sent on TLS update"); port = port || 80; socket = net.connect({ highWaterMark: 64 * 1024, @@ -2542,14 +2542,14 @@ var require_connect = __commonJS({ ...options, localAddress, port, - host: hostname6 + host: hostname5 }); } if (options.keepAlive == null || options.keepAlive) { const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; socket.setKeepAlive(true, keepAliveInitialDelay); } - const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname6, port }); + const clearConnectTimeout = setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname5, port }); socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { queueMicrotask(clearConnectTimeout); if (callback) { @@ -2570,7 +2570,7 @@ var require_connect = __commonJS({ } var setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { if (!opts.timeout) { - return noop6; + return noop5; } let s1 = null; let s2 = null; @@ -2586,7 +2586,7 @@ var require_connect = __commonJS({ }; } : (socketWeakRef, opts) => { if (!opts.timeout) { - return noop6; + return noop5; } let s1 = null; const fastTimer = timers.setFastTimeout(() => { @@ -3233,14 +3233,14 @@ var require_global = __commonJS({ var require_data_url = __commonJS({ "node_modules/undici/lib/web/fetch/data-url.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var encoder = new TextEncoder(); var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+\-.^_|~A-Za-z0-9]+$/; var HTTP_WHITESPACE_REGEX = /[\u000A\u000D\u0009\u0020]/; var ASCII_WHITESPACE_REPLACE_REGEX = /[\u0009\u000A\u000C\u000D\u0020]/g; var HTTP_QUOTED_STRING_TOKENS = /^[\u0009\u0020-\u007E\u0080-\u00FF]+$/; function dataURLProcessor(dataURL) { - assert4(dataURL.protocol === "data:"); + assert3(dataURL.protocol === "data:"); let input = URLSerializer(dataURL, true); input = input.slice(5); const position = { position: 0 }; @@ -3276,12 +3276,12 @@ var require_data_url = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url5, excludeFragment = false) { + function URLSerializer(url4, excludeFragment = false) { if (!excludeFragment) { - return url5.href; + return url4.href; } - const href = url5.href; - const hashLength = url5.hash.length; + const href = url4.href; + const hashLength = url4.hash.length; const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); if (!hashLength && href.endsWith("#")) { return serialized.slice(0, -1); @@ -3441,7 +3441,7 @@ var require_data_url = __commonJS({ function collectAnHTTPQuotedString(input, position, extractValue) { const positionStart = position.position; let value = ""; - assert4(input[position.position] === '"'); + assert3(input[position.position] === '"'); position.position++; while (true) { value += collectASequenceOfCodePoints( @@ -3462,7 +3462,7 @@ var require_data_url = __commonJS({ value += input[position.position]; position.position++; } else { - assert4(quoteOrBackslash === '"'); + assert3(quoteOrBackslash === '"'); break; } } @@ -3472,7 +3472,7 @@ var require_data_url = __commonJS({ return input.slice(positionStart, position.position); } function serializeAMimeType(mimeType) { - assert4(mimeType !== "failure"); + assert3(mimeType !== "failure"); const { parameters, essence } = mimeType; let serialization = essence; for (let [name, value] of parameters.entries()) { @@ -3820,8 +3820,8 @@ var require_webidl = __commonJS({ }); } for (const options of converters) { - const { key, defaultValue, required: required4, converter } = options; - if (required4 === true) { + const { key, defaultValue, required: required3, converter } = options; + if (required3 === true) { if (!Object.hasOwn(dictionary, key)) { throw webidl.errors.exception({ header: prefix, @@ -3834,7 +3834,7 @@ var require_webidl = __commonJS({ if (hasDefault && value !== null) { value ??= defaultValue(); } - if (required4 || hasDefault || value !== void 0) { + if (required3 || hasDefault || value !== void 0) { value = converter(value, prefix, `${argument}.${key}`); if (options.allowedValues && !options.allowedValues.includes(value)) { throw webidl.errors.exception({ @@ -4011,7 +4011,7 @@ var require_util2 = __commonJS({ var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url(); var { performance: performance2 } = __require("node:perf_hooks"); var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { isUint8Array } = __require("node:util/types"); var { webidl } = require_webidl(); var supportedHashes = []; @@ -4019,7 +4019,7 @@ var require_util2 = __commonJS({ try { crypto3 = __require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto3.getHashes().filter((hash4) => possibleRelevantHashes.includes(hash4)); + supportedHashes = crypto3.getHashes().filter((hash3) => possibleRelevantHashes.includes(hash3)); } catch { } function responseURL(response) { @@ -4043,9 +4043,9 @@ var require_util2 = __commonJS({ } return location; } - function isValidEncodedURL(url5) { - for (let i = 0; i < url5.length; ++i) { - const code = url5.charCodeAt(i); + function isValidEncodedURL(url4) { + for (let i = 0; i < url4.length; ++i) { + const code = url4.charCodeAt(i); if (code > 126 || // Non-US-ASCII + DEL code < 32) { return false; @@ -4056,18 +4056,18 @@ var require_util2 = __commonJS({ function normalizeBinaryStringToUtf8(value) { return Buffer.from(value, "binary").toString("utf8"); } - function requestCurrentURL(request3) { - return request3.urlList[request3.urlList.length - 1]; + function requestCurrentURL(request2) { + return request2.urlList[request2.urlList.length - 1]; } - function requestBadPort(request3) { - const url5 = requestCurrentURL(request3); - if (urlIsHttpHttpsScheme(url5) && badPortsSet.has(url5.port)) { + function requestBadPort(request2) { + const url4 = requestCurrentURL(request2); + if (urlIsHttpHttpsScheme(url4) && badPortsSet.has(url4.port)) { return "blocked"; } return "allowed"; } - function isErrorLike(object4) { - return object4 instanceof Error || (object4?.constructor?.name === "Error" || object4?.constructor?.name === "DOMException"); + function isErrorLike(object3) { + return object3 instanceof Error || (object3?.constructor?.name === "Error" || object3?.constructor?.name === "DOMException"); } function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { @@ -4084,7 +4084,7 @@ var require_util2 = __commonJS({ function isValidHeaderValue(potentialValue) { return (potentialValue[0] === " " || potentialValue[0] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue[potentialValue.length - 1] === " " || potentialValue.includes("\n") || potentialValue.includes("\r") || potentialValue.includes("\0")) === false; } - function setRequestReferrerPolicyOnRedirect(request3, actualResponse) { + function setRequestReferrerPolicyOnRedirect(request2, actualResponse) { const { headersList } = actualResponse; const policyHeader = (headersList.get("referrer-policy", true) ?? "").split(","); let policy = ""; @@ -4098,7 +4098,7 @@ var require_util2 = __commonJS({ } } if (policy !== "") { - request3.referrerPolicy = policy; + request2.referrerPolicy = policy; } } function crossOriginResourcePolicyCheck() { @@ -4115,33 +4115,33 @@ var require_util2 = __commonJS({ header = httpRequest.mode; httpRequest.headersList.set("sec-fetch-mode", header, true); } - function appendRequestOriginHeader(request3) { - let serializedOrigin = request3.origin; + function appendRequestOriginHeader(request2) { + let serializedOrigin = request2.origin; if (serializedOrigin === "client" || serializedOrigin === void 0) { return; } - if (request3.responseTainting === "cors" || request3.mode === "websocket") { - request3.headersList.append("origin", serializedOrigin, true); - } else if (request3.method !== "GET" && request3.method !== "HEAD") { - switch (request3.referrerPolicy) { + if (request2.responseTainting === "cors" || request2.mode === "websocket") { + request2.headersList.append("origin", serializedOrigin, true); + } else if (request2.method !== "GET" && request2.method !== "HEAD") { + switch (request2.referrerPolicy) { case "no-referrer": serializedOrigin = null; break; case "no-referrer-when-downgrade": case "strict-origin": case "strict-origin-when-cross-origin": - if (request3.origin && urlHasHttpsScheme(request3.origin) && !urlHasHttpsScheme(requestCurrentURL(request3))) { + if (request2.origin && urlHasHttpsScheme(request2.origin) && !urlHasHttpsScheme(requestCurrentURL(request2))) { serializedOrigin = null; } break; case "same-origin": - if (!sameOrigin(request3, requestCurrentURL(request3))) { + if (!sameOrigin(request2, requestCurrentURL(request2))) { serializedOrigin = null; } break; default: } - request3.headersList.append("origin", serializedOrigin, true); + request2.headersList.append("origin", serializedOrigin, true); } } function coarsenTime(timestamp, crossOriginIsolatedCapability) { @@ -4195,26 +4195,26 @@ var require_util2 = __commonJS({ referrerPolicy: policyContainer.referrerPolicy }; } - function determineRequestsReferrer(request3) { - const policy = request3.referrerPolicy; - assert4(policy); + function determineRequestsReferrer(request2) { + const policy = request2.referrerPolicy; + assert3(policy); let referrerSource = null; - if (request3.referrer === "client") { + if (request2.referrer === "client") { const globalOrigin = getGlobalOrigin(); if (!globalOrigin || globalOrigin.origin === "null") { return "no-referrer"; } referrerSource = new URL(globalOrigin); - } else if (request3.referrer instanceof URL) { - referrerSource = request3.referrer; + } else if (request2.referrer instanceof URL) { + referrerSource = request2.referrer; } let referrerURL = stripURLForReferrer(referrerSource); const referrerOrigin = stripURLForReferrer(referrerSource, true); if (referrerURL.toString().length > 4096) { referrerURL = referrerOrigin; } - const areSameOrigin = sameOrigin(request3, referrerURL); - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request3.url); + const areSameOrigin = sameOrigin(request2, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request2.url); switch (policy) { case "origin": return referrerOrigin != null ? referrerOrigin : stripURLForReferrer(referrerSource, true); @@ -4225,7 +4225,7 @@ var require_util2 = __commonJS({ case "origin-when-cross-origin": return areSameOrigin ? referrerURL : referrerOrigin; case "strict-origin-when-cross-origin": { - const currentURL = requestCurrentURL(request3); + const currentURL = requestCurrentURL(request2); if (sameOrigin(referrerURL, currentURL)) { return referrerURL; } @@ -4254,31 +4254,31 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url5, originOnly) { - assert4(url5 instanceof URL); - url5 = new URL(url5); - if (url5.protocol === "file:" || url5.protocol === "about:" || url5.protocol === "blank:") { + function stripURLForReferrer(url4, originOnly) { + assert3(url4 instanceof URL); + url4 = new URL(url4); + if (url4.protocol === "file:" || url4.protocol === "about:" || url4.protocol === "blank:") { return "no-referrer"; } - url5.username = ""; - url5.password = ""; - url5.hash = ""; + url4.username = ""; + url4.password = ""; + url4.hash = ""; if (originOnly) { - url5.pathname = ""; - url5.search = ""; + url4.pathname = ""; + url4.search = ""; } - return url5; + return url4; } - function isURLPotentiallyTrustworthy(url5) { - if (!(url5 instanceof URL)) { + function isURLPotentiallyTrustworthy(url4) { + if (!(url4 instanceof URL)) { return false; } - if (url5.href === "about:blank" || url5.href === "about:srcdoc") { + if (url4.href === "about:blank" || url4.href === "about:srcdoc") { return true; } - if (url5.protocol === "data:") return true; - if (url5.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url5.origin); + if (url4.protocol === "data:") return true; + if (url4.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url4.origin); function isOriginPotentiallyTrustworthy(origin2) { if (origin2 == null || origin2 === "null") return false; const originAsURL = new URL(origin2); @@ -4295,7 +4295,7 @@ var require_util2 = __commonJS({ if (crypto3 === void 0) { return true; } - const parsedMetadata = parseMetadata2(metadataList); + const parsedMetadata = parseMetadata(metadataList); if (parsedMetadata === "no metadata") { return true; } @@ -4322,7 +4322,7 @@ var require_util2 = __commonJS({ return false; } var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; - function parseMetadata2(metadata) { + function parseMetadata(metadata) { const result = []; let empty = true; for (const token of metadata.split(" ")) { @@ -4386,7 +4386,7 @@ var require_util2 = __commonJS({ } return true; } - function tryUpgradeRequestToAPotentiallyTrustworthyURL(request3) { + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) { } function sameOrigin(A, B) { if (A.origin === B.origin && A.origin === "null") { @@ -4400,11 +4400,11 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise4 = new Promise((resolve, reject) => { + const promise3 = new Promise((resolve, reject) => { res = resolve; rej = reject; }); - return { promise: promise4, resolve: res, reject: rej }; + return { promise: promise3, resolve: res, reject: rej }; } function isAborted(fetchParams) { return fetchParams.controller.state === "aborted"; @@ -4420,7 +4420,7 @@ var require_util2 = __commonJS({ if (result === void 0) { throw new TypeError("Value is not JSON serializable"); } - assert4(typeof result === "string"); + assert3(typeof result === "string"); return result; } var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); @@ -4492,7 +4492,7 @@ var require_util2 = __commonJS({ return new FastIterableIterator(target, kind); }; } - function iteratorMixin(name, object4, kInternalIterator, keyIndex = 0, valueIndex = 1) { + function iteratorMixin(name, object3, kInternalIterator, keyIndex = 0, valueIndex = 1) { const makeIterator = createIterator(name, kInternalIterator, keyIndex, valueIndex); const properties = { keys: { @@ -4500,7 +4500,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function keys() { - webidl.brandCheck(this, object4); + webidl.brandCheck(this, object3); return makeIterator(this, "key"); } }, @@ -4509,7 +4509,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function values() { - webidl.brandCheck(this, object4); + webidl.brandCheck(this, object3); return makeIterator(this, "value"); } }, @@ -4518,7 +4518,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function entries() { - webidl.brandCheck(this, object4); + webidl.brandCheck(this, object3); return makeIterator(this, "key+value"); } }, @@ -4527,7 +4527,7 @@ var require_util2 = __commonJS({ enumerable: true, configurable: true, value: function forEach2(callbackfn, thisArg = globalThis) { - webidl.brandCheck(this, object4); + webidl.brandCheck(this, object3); webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); if (typeof callbackfn !== "function") { throw new TypeError( @@ -4540,7 +4540,7 @@ var require_util2 = __commonJS({ } } }; - return Object.defineProperties(object4.prototype, { + return Object.defineProperties(object3.prototype, { ...properties, [Symbol.iterator]: { writable: true, @@ -4581,7 +4581,7 @@ var require_util2 = __commonJS({ } var invalidIsomorphicEncodeValueRegex = /[^\x00-\xFF]/; function isomorphicEncode(input) { - assert4(!invalidIsomorphicEncodeValueRegex.test(input)); + assert3(!invalidIsomorphicEncodeValueRegex.test(input)); return input; } async function readAllBytes(reader) { @@ -4599,17 +4599,17 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url5) { - assert4("protocol" in url5); - const protocol = url5.protocol; + function urlIsLocal(url4) { + assert3("protocol" in url4); + const protocol = url4.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url5) { - return typeof url5 === "string" && url5[5] === ":" && url5[0] === "h" && url5[1] === "t" && url5[2] === "t" && url5[3] === "p" && url5[4] === "s" || url5.protocol === "https:"; + function urlHasHttpsScheme(url4) { + return typeof url4 === "string" && url4[5] === ":" && url4[0] === "h" && url4[1] === "t" && url4[2] === "t" && url4[3] === "p" && url4[4] === "s" || url4.protocol === "https:"; } - function urlIsHttpHttpsScheme(url5) { - assert4("protocol" in url5); - const protocol = url5.protocol; + function urlIsHttpHttpsScheme(url4) { + assert3("protocol" in url4); + const protocol = url4.protocol; return protocol === "http:" || protocol === "https:"; } function simpleRangeHeaderValue(value, allowWhitespace) { @@ -4773,7 +4773,7 @@ var require_util2 = __commonJS({ continue; } } else { - assert4(input.charCodeAt(position.position) === 44); + assert3(input.charCodeAt(position.position) === 44); position.position++; } } @@ -4860,7 +4860,7 @@ var require_util2 = __commonJS({ readAllBytes, simpleRangeHeaderValue, buildContentRange, - parseMetadata: parseMetadata2, + parseMetadata, createInflate, extractMimeType, getDecodeSplit, @@ -4940,8 +4940,8 @@ var require_file = __commonJS({ } }; webidl.converters.Blob = webidl.interfaceConverter(Blob2); - function isFileLike(object4) { - return object4 instanceof File2 || object4 && (typeof object4.stream === "function" || typeof object4.arrayBuffer === "function") && object4[Symbol.toStringTag] === "File"; + function isFileLike(object3) { + return object3 instanceof File2 || object3 && (typeof object3.stream === "function" || typeof object3.arrayBuffer === "function") && object3[Symbol.toStringTag] === "File"; } module.exports = { FileLike, isFileLike }; } @@ -5103,7 +5103,7 @@ var require_formdata_parser = __commonJS({ var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); var { isFileLike } = require_file(); var { makeEntry } = require_formdata(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { File: NodeFile } = __require("node:buffer"); var File2 = globalThis.File ?? NodeFile; var formDataNameBuffer = Buffer.from('form-data; name="'); @@ -5132,7 +5132,7 @@ var require_formdata_parser = __commonJS({ return true; } function multipartFormDataParser(input, mimeType) { - assert4(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); + assert3(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); const boundaryString = mimeType.parameters.get("boundary"); if (boundaryString === void 0) { return "failure"; @@ -5196,8 +5196,8 @@ var require_formdata_parser = __commonJS({ } else { value = utf8DecodeBytes(Buffer.from(body)); } - assert4(isUSVString(name)); - assert4(typeof value === "string" && isUSVString(value) || isFileLike(value)); + assert3(isUSVString(name)); + assert3(typeof value === "string" && isUSVString(value) || isFileLike(value)); entryList.push(makeEntry(name, value, filename)); } } @@ -5243,12 +5243,12 @@ var require_formdata_parser = __commonJS({ return "failure"; } if (bufferStartsWith(input, filenameBuffer, position)) { - let check4 = position.position + filenameBuffer.length; - if (input[check4] === 42) { + let check3 = position.position + filenameBuffer.length; + if (input[check3] === 42) { position.position += 1; - check4 += 1; + check3 += 1; } - if (input[check4] !== 61 || input[check4 + 1] !== 34) { + if (input[check3] !== 61 || input[check3 + 1] !== 34) { return "failure"; } position.position += 12; @@ -5295,7 +5295,7 @@ var require_formdata_parser = __commonJS({ } } function parseMultipartFormDataName(input, position) { - assert4(input[position.position - 1] === 34); + assert3(input[position.position - 1] === 34); let name = collectASequenceOfBytes( (char) => char !== 10 && char !== 13 && char !== 34, input, @@ -5364,7 +5364,7 @@ var require_body = __commonJS({ var { kState } = require_symbols2(); var { webidl } = require_webidl(); var { Blob: Blob2 } = __require("node:buffer"); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { isErrored, isDisturbed } = __require("node:stream"); var { isArrayBuffer: isArrayBuffer2 } = __require("node:util/types"); var { serializeAMimeType } = require_data_url(); @@ -5377,7 +5377,7 @@ var require_body = __commonJS({ random = (max) => Math.floor(Math.random(max)); } var textEncoder2 = new TextEncoder(); - function noop6() { + function noop5() { } var hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; var streamRegistry; @@ -5385,16 +5385,16 @@ var require_body = __commonJS({ streamRegistry = new FinalizationRegistry((weakRef) => { const stream4 = weakRef.deref(); if (stream4 && !stream4.locked && !isDisturbed(stream4) && !isErrored(stream4)) { - stream4.cancel("Response object has been garbage collected").catch(noop6); + stream4.cancel("Response object has been garbage collected").catch(noop5); } }); } - function extractBody(object4, keepalive = false) { + function extractBody(object3, keepalive = false) { let stream4 = null; - if (object4 instanceof ReadableStream) { - stream4 = object4; - } else if (isBlobLike(object4)) { - stream4 = object4.stream(); + if (object3 instanceof ReadableStream) { + stream4 = object3; + } else if (isBlobLike(object3)) { + stream4 = object3.stream(); } else { stream4 = new ReadableStream({ async pull(controller) { @@ -5409,22 +5409,22 @@ var require_body = __commonJS({ type: "bytes" }); } - assert4(isReadableStreamLike(stream4)); + assert3(isReadableStreamLike(stream4)); let action2 = null; let source = null; let length = null; let type = null; - if (typeof object4 === "string") { - source = object4; + if (typeof object3 === "string") { + source = object3; type = "text/plain;charset=UTF-8"; - } else if (object4 instanceof URLSearchParams) { - source = object4.toString(); + } else if (object3 instanceof URLSearchParams) { + source = object3.toString(); type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (isArrayBuffer2(object4)) { - source = new Uint8Array(object4.slice()); - } else if (ArrayBuffer.isView(object4)) { - source = new Uint8Array(object4.buffer.slice(object4.byteOffset, object4.byteOffset + object4.byteLength)); - } else if (util3.isFormDataLike(object4)) { + } else if (isArrayBuffer2(object3)) { + source = new Uint8Array(object3.slice()); + } else if (ArrayBuffer.isView(object3)) { + source = new Uint8Array(object3.buffer.slice(object3.byteOffset, object3.byteOffset + object3.byteLength)); + } else if (util3.isFormDataLike(object3)) { const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; @@ -5434,7 +5434,7 @@ Content-Disposition: form-data`; const rn = new Uint8Array([13, 10]); length = 0; let hasUnknownSizeValue = false; - for (const [name, value] of object4) { + for (const [name, value] of object3) { if (typeof value === "string") { const chunk2 = textEncoder2.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r \r @@ -5462,7 +5462,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r if (hasUnknownSizeValue) { length = null; } - source = object4; + source = object3; action2 = async function* () { for (const part of blobParts) { if (part.stream) { @@ -5473,22 +5473,22 @@ Content-Type: ${value.type || "application/octet-stream"}\r } }; type = `multipart/form-data; boundary=${boundary}`; - } else if (isBlobLike(object4)) { - source = object4; - length = object4.size; - if (object4.type) { - type = object4.type; + } else if (isBlobLike(object3)) { + source = object3; + length = object3.size; + if (object3.type) { + type = object3.type; } - } else if (typeof object4[Symbol.asyncIterator] === "function") { + } else if (typeof object3[Symbol.asyncIterator] === "function") { if (keepalive) { throw new TypeError("keepalive"); } - if (util3.isDisturbed(object4) || object4.locked) { + if (util3.isDisturbed(object3) || object3.locked) { throw new TypeError( "Response body object should not be disturbed or locked" ); } - stream4 = object4 instanceof ReadableStream ? object4 : ReadableStreamFrom(object4); + stream4 = object3 instanceof ReadableStream ? object3 : ReadableStreamFrom(object3); } if (typeof source === "string" || util3.isBuffer(source)) { length = Buffer.byteLength(source); @@ -5497,7 +5497,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r let iterator3; stream4 = new ReadableStream({ async start() { - iterator3 = action2(object4)[Symbol.asyncIterator](); + iterator3 = action2(object3)[Symbol.asyncIterator](); }, async pull(controller) { const { value, done } = await iterator3.next(); @@ -5525,12 +5525,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r const body = { stream: stream4, source, length }; return [body, type]; } - function safelyExtractBody(object4, keepalive = false) { - if (object4 instanceof ReadableStream) { - assert4(!util3.isDisturbed(object4), "The body has already been consumed."); - assert4(!object4.locked, "The stream is locked."); + function safelyExtractBody(object3, keepalive = false) { + if (object3 instanceof ReadableStream) { + assert3(!util3.isDisturbed(object3), "The body has already been consumed."); + assert3(!object3.locked, "The stream is locked."); } - return extractBody(object4, keepalive); + return extractBody(object3, keepalive); } function cloneBody(instance, body) { const [out1, out2] = body.stream.tee(); @@ -5610,30 +5610,30 @@ Content-Type: ${value.type || "application/octet-stream"}\r function mixinBody(prototype2) { Object.assign(prototype2.prototype, bodyMixinMethods(prototype2)); } - async function consumeBody(object4, convertBytesToJSValue, instance) { - webidl.brandCheck(object4, instance); - if (bodyUnusable(object4)) { + async function consumeBody(object3, convertBytesToJSValue, instance) { + webidl.brandCheck(object3, instance); + if (bodyUnusable(object3)) { throw new TypeError("Body is unusable: Body has already been read"); } - throwIfAborted(object4[kState]); - const promise4 = createDeferredPromise(); - const errorSteps = (error100) => promise4.reject(error100); + throwIfAborted(object3[kState]); + const promise3 = createDeferredPromise(); + const errorSteps = (error99) => promise3.reject(error99); const successSteps = (data) => { try { - promise4.resolve(convertBytesToJSValue(data)); + promise3.resolve(convertBytesToJSValue(data)); } catch (e) { errorSteps(e); } }; - if (object4[kState].body == null) { + if (object3[kState].body == null) { successSteps(Buffer.allocUnsafe(0)); - return promise4.promise; + return promise3.promise; } - await fullyReadBody(object4[kState].body, successSteps, errorSteps); - return promise4.promise; + await fullyReadBody(object3[kState].body, successSteps, errorSteps); + return promise3.promise; } - function bodyUnusable(object4) { - const body = object4[kState].body; + function bodyUnusable(object3) { + const body = object3[kState].body; return body != null && (body.stream.locked || util3.isDisturbed(body.stream)); } function parseJSONFromBytes(bytes) { @@ -5663,7 +5663,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r var require_client_h1 = __commonJS({ "node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var util3 = require_util(); var { channels } = require_diagnostics(); var timers = require_timers(); @@ -5733,35 +5733,35 @@ var require_client_h1 = __commonJS({ return 0; }, wasm_on_status: (p, at, len) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_begin: (p) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); return currentParser.onMessageBegin() || 0; }, wasm_on_header_field: (p, at, len) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_header_value: (p, at, len) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; }, wasm_on_body: (p, at, len) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); const start = at - currentBufferPtr + currentBufferRef.byteOffset; return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; }, wasm_on_message_complete: (p) => { - assert4(currentParser.ptr === p); + assert3(currentParser.ptr === p); return currentParser.onMessageComplete() || 0; } /* eslint-enable camelcase */ @@ -5782,7 +5782,7 @@ var require_client_h1 = __commonJS({ var TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER; var Parser = class { constructor(client, socket, { exports: exports2 }) { - assert4(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + assert3(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); this.llhttp = exports2; this.ptr = this.llhttp.llhttp_alloc(constants3.TYPE.RESPONSE); this.client = client; @@ -5831,10 +5831,10 @@ var require_client_h1 = __commonJS({ if (this.socket.destroyed || !this.paused) { return; } - assert4(this.ptr != null); - assert4(currentParser == null); + assert3(this.ptr != null); + assert3(currentParser == null); this.llhttp.llhttp_resume(this.ptr); - assert4(this.timeoutType === TIMEOUT_BODY); + assert3(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); @@ -5854,9 +5854,9 @@ var require_client_h1 = __commonJS({ } } execute(data) { - assert4(this.ptr != null); - assert4(currentParser == null); - assert4(!this.paused); + assert3(this.ptr != null); + assert3(currentParser == null); + assert3(!this.paused); const { socket, llhttp } = this; if (data.length > currentBufferSize) { if (currentBufferPtr) { @@ -5895,9 +5895,9 @@ var require_client_h1 = __commonJS({ } } finish() { - assert4(currentParser === null); - assert4(this.ptr != null); - assert4(!this.paused); + assert3(currentParser === null); + assert3(this.ptr != null); + assert3(!this.paused); const { llhttp } = this; let ret; try { @@ -5929,8 +5929,8 @@ var require_client_h1 = __commonJS({ return new HTTPParserError(message2, constants3.ERROR[ret], data); } destroy() { - assert4(this.ptr != null); - assert4(currentParser == null); + assert3(this.ptr != null); + assert3(currentParser == null); this.llhttp.llhttp_free(this.ptr); this.ptr = null; this.timeout && timers.clearTimeout(this.timeout); @@ -5947,11 +5947,11 @@ var require_client_h1 = __commonJS({ if (socket.destroyed) { return -1; } - const request3 = client[kQueue][client[kRunningIdx]]; - if (!request3) { + const request2 = client[kQueue][client[kRunningIdx]]; + if (!request2) { return -1; } - request3.onResponseStarted(); + request2.onResponseStarted(); } onHeaderField(buf) { const len = this.headers.length; @@ -5991,14 +5991,14 @@ var require_client_h1 = __commonJS({ } onUpgrade(head) { const { upgrade, client, socket, headers, statusCode } = this; - assert4(upgrade); - assert4(client[kSocket] === socket); - assert4(!socket.destroyed); - assert4(!this.paused); - assert4((headers.length & 1) === 0); - const request3 = client[kQueue][client[kRunningIdx]]; - assert4(request3); - assert4(request3.upgrade || request3.method === "CONNECT"); + assert3(upgrade); + assert3(client[kSocket] === socket); + assert3(!socket.destroyed); + assert3(!this.paused); + assert3((headers.length & 1) === 0); + const request2 = client[kQueue][client[kRunningIdx]]; + assert3(request2); + assert3(request2.upgrade || request2.method === "CONNECT"); this.statusCode = null; this.statusText = ""; this.shouldKeepAlive = null; @@ -6015,7 +6015,7 @@ var require_client_h1 = __commonJS({ client[kQueue][client[kRunningIdx]++] = null; client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); try { - request3.onUpgrade(statusCode, headers, socket); + request2.onUpgrade(statusCode, headers, socket); } catch (err) { util3.destroy(socket, err); } @@ -6026,43 +6026,43 @@ var require_client_h1 = __commonJS({ if (socket.destroyed) { return -1; } - const request3 = client[kQueue][client[kRunningIdx]]; - if (!request3) { + const request2 = client[kQueue][client[kRunningIdx]]; + if (!request2) { return -1; } - assert4(!this.upgrade); - assert4(this.statusCode < 200); + assert3(!this.upgrade); + assert3(this.statusCode < 200); if (statusCode === 100) { util3.destroy(socket, new SocketError("bad response", util3.getSocketInfo(socket))); return -1; } - if (upgrade && !request3.upgrade) { + if (upgrade && !request2.upgrade) { util3.destroy(socket, new SocketError("bad upgrade", util3.getSocketInfo(socket))); return -1; } - assert4(this.timeoutType === TIMEOUT_HEADERS); + assert3(this.timeoutType === TIMEOUT_HEADERS); this.statusCode = statusCode; this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. - request3.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; if (this.statusCode >= 200) { - const bodyTimeout = request3.bodyTimeout != null ? request3.bodyTimeout : client[kBodyTimeout]; + const bodyTimeout = request2.bodyTimeout != null ? request2.bodyTimeout : client[kBodyTimeout]; this.setTimeout(bodyTimeout, TIMEOUT_BODY); } else if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } - if (request3.method === "CONNECT") { - assert4(client[kRunning] === 1); + if (request2.method === "CONNECT") { + assert3(client[kRunning] === 1); this.upgrade = true; return 2; } if (upgrade) { - assert4(client[kRunning] === 1); + assert3(client[kRunning] === 1); this.upgrade = true; return 2; } - assert4((this.headers.length & 1) === 0); + assert3((this.headers.length & 1) === 0); this.headers = []; this.headersSize = 0; if (this.shouldKeepAlive && client[kPipelining]) { @@ -6083,11 +6083,11 @@ var require_client_h1 = __commonJS({ } else { socket[kReset] = true; } - const pause = request3.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request3.aborted) { + const pause = request2.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request2.aborted) { return -1; } - if (request3.method === "HEAD") { + if (request2.method === "HEAD") { return 1; } if (statusCode < 200) { @@ -6104,21 +6104,21 @@ var require_client_h1 = __commonJS({ if (socket.destroyed) { return -1; } - const request3 = client[kQueue][client[kRunningIdx]]; - assert4(request3); - assert4(this.timeoutType === TIMEOUT_BODY); + const request2 = client[kQueue][client[kRunningIdx]]; + assert3(request2); + assert3(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { if (this.timeout.refresh) { this.timeout.refresh(); } } - assert4(statusCode >= 200); + assert3(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { util3.destroy(socket, new ResponseExceededMaxSizeError()); return -1; } this.bytesRead += buf.length; - if (request3.onData(buf) === false) { + if (request2.onData(buf) === false) { return constants3.ERROR.PAUSED; } } @@ -6130,10 +6130,10 @@ var require_client_h1 = __commonJS({ if (upgrade) { return; } - assert4(statusCode >= 100); - assert4((this.headers.length & 1) === 0); - const request3 = client[kQueue][client[kRunningIdx]]; - assert4(request3); + assert3(statusCode >= 100); + assert3((this.headers.length & 1) === 0); + const request2 = client[kQueue][client[kRunningIdx]]; + assert3(request2); this.statusCode = null; this.statusText = ""; this.bytesRead = 0; @@ -6145,14 +6145,14 @@ var require_client_h1 = __commonJS({ if (statusCode < 200) { return; } - if (request3.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + if (request2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { util3.destroy(socket, new ResponseContentLengthMismatchError()); return -1; } - request3.onComplete(headers); + request2.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { - assert4(client[kRunning] === 0); + assert3(client[kRunning] === 0); util3.destroy(socket, new InformationalError("reset")); return constants3.ERROR.PAUSED; } else if (!shouldKeepAlive) { @@ -6172,7 +6172,7 @@ var require_client_h1 = __commonJS({ const { socket, timeoutType, client, paused } = parser.deref(); if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert4(!paused, "cannot be paused while waiting for headers"); + assert3(!paused, "cannot be paused while waiting for headers"); util3.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { @@ -6180,7 +6180,7 @@ var require_client_h1 = __commonJS({ util3.destroy(socket, new BodyTimeoutError()); } } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { - assert4(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + assert3(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); util3.destroy(socket, new InformationalError("socket idle timeout")); } } @@ -6196,7 +6196,7 @@ var require_client_h1 = __commonJS({ socket[kBlocking] = false; socket[kParser] = new Parser(client, socket, llhttpInstance); addListener(socket, "error", function(err) { - assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); const parser = this[kParser]; if (err.code === "ECONNRESET" && parser.statusCode && !parser.shouldKeepAlive) { const parserErr = parser.finish(); @@ -6240,19 +6240,19 @@ var require_client_h1 = __commonJS({ client2[kSocket] = null; client2[kHTTPContext] = null; if (client2.destroyed) { - assert4(client2[kPending] === 0); + assert3(client2[kPending] === 0); const requests = client2[kQueue].splice(client2[kRunningIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - util3.errorRequest(client2, request3, err); + const request2 = requests[i]; + util3.errorRequest(client2, request2, err); } } else if (client2[kRunning] > 0 && err.code !== "UND_ERR_INFO") { - const request3 = client2[kQueue][client2[kRunningIdx]]; + const request2 = client2[kQueue][client2[kRunningIdx]]; client2[kQueue][client2[kRunningIdx]++] = null; - util3.errorRequest(client2, request3, err); + util3.errorRequest(client2, request2, err); } client2[kPendingIdx] = client2[kRunningIdx]; - assert4(client2[kRunning] === 0); + assert3(client2[kRunning] === 0); client2.emit("disconnect", client2[kUrl], [client2], err); client2[kResume](); }); @@ -6279,18 +6279,18 @@ var require_client_h1 = __commonJS({ get destroyed() { return socket.destroyed; }, - busy(request3) { + busy(request2) { if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { return true; } - if (request3) { - if (client[kRunning] > 0 && !request3.idempotent) { + if (request2) { + if (client[kRunning] > 0 && !request2.idempotent) { return true; } - if (client[kRunning] > 0 && (request3.upgrade || request3.method === "CONNECT")) { + if (client[kRunning] > 0 && (request2.upgrade || request2.method === "CONNECT")) { return true; } - if (client[kRunning] > 0 && util3.bodyLength(request3.body) !== 0 && (util3.isStream(request3.body) || util3.isAsyncIterable(request3.body) || util3.isFormDataLike(request3.body))) { + if (client[kRunning] > 0 && util3.bodyLength(request2.body) !== 0 && (util3.isStream(request2.body) || util3.isAsyncIterable(request2.body) || util3.isFormDataLike(request2.body))) { return true; } } @@ -6316,8 +6316,8 @@ var require_client_h1 = __commonJS({ } } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request3 = client[kQueue][client[kRunningIdx]]; - const headersTimeout = request3.headersTimeout != null ? request3.headersTimeout : client[kHeadersTimeout]; + const request2 = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request2.headersTimeout != null ? request2.headersTimeout : client[kHeadersTimeout]; socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); } } @@ -6326,21 +6326,21 @@ var require_client_h1 = __commonJS({ function shouldSendContentLength(method) { return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } - function writeH1(client, request3) { - const { method, path, host, upgrade, blocking, reset } = request3; - let { body, headers, contentLength } = request3; + function writeH1(client, request2) { + const { method, path, host, upgrade, blocking, reset } = request2; + let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util3.isFormDataLike(body)) { if (!extractBody) { extractBody = require_body().extractBody; } const [bodyStream, contentType] = extractBody(body); - if (request3.contentType == null) { + if (request2.contentType == null) { headers.push("content-type", contentType); } body = bodyStream.stream; contentLength = bodyStream.length; - } else if (util3.isBlobLike(body) && request3.contentType == null && body.type) { + } else if (util3.isBlobLike(body) && request2.contentType == null && body.type) { headers.push("content-type", body.type); } if (body && typeof body.read === "function") { @@ -6349,33 +6349,33 @@ var require_client_h1 = __commonJS({ const bodyLength = util3.bodyLength(body); contentLength = bodyLength ?? contentLength; if (contentLength === null) { - contentLength = request3.contentLength; + contentLength = request2.contentLength; } if (contentLength === 0 && !expectsPayload) { contentLength = null; } - if (shouldSendContentLength(method) && contentLength > 0 && request3.contentLength !== null && request3.contentLength !== contentLength) { + if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength !== null && request2.contentLength !== contentLength) { if (client[kStrictContentLength]) { - util3.errorRequest(client, request3, new RequestContentLengthMismatchError()); + util3.errorRequest(client, request2, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } const socket = client[kSocket]; const abort = (err) => { - if (request3.aborted || request3.completed) { + if (request2.aborted || request2.completed) { return; } - util3.errorRequest(client, request3, err || new RequestAbortedError()); + util3.errorRequest(client, request2, err || new RequestAbortedError()); util3.destroy(body); util3.destroy(socket, new InformationalError("aborted")); }; try { - request3.onConnect(abort); + request2.onConnect(abort); } catch (err) { - util3.errorRequest(client, request3, err); + util3.errorRequest(client, request2, err); } - if (request3.aborted) { + if (request2.aborted) { return false; } if (method === "HEAD") { @@ -6426,31 +6426,31 @@ upgrade: ${upgrade}\r } } if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request: request3, headers: header, socket }); + channels.sendHeaders.publish({ request: request2, headers: header, socket }); } if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request3, socket, contentLength, header, expectsPayload); + writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload); } else if (util3.isBuffer(body)) { - writeBuffer(abort, body, client, request3, socket, contentLength, header, expectsPayload); + writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else if (util3.isBlobLike(body)) { if (typeof body.stream === "function") { - writeIterable(abort, body.stream(), client, request3, socket, contentLength, header, expectsPayload); + writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload); } else { - writeBlob(abort, body, client, request3, socket, contentLength, header, expectsPayload); + writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload); } } else if (util3.isStream(body)) { - writeStream(abort, body, client, request3, socket, contentLength, header, expectsPayload); + writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else if (util3.isIterable(body)) { - writeIterable(abort, body, client, request3, socket, contentLength, header, expectsPayload); + writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload); } else { - assert4(false); + assert3(false); } return true; } - function writeStream(abort, body, client, request3, socket, contentLength, header, expectsPayload) { - assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + assert3(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); let finished = false; - const writer = new AsyncWriter({ abort, socket, request: request3, contentLength, client, expectsPayload, header }); + const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); const onData = function(chunk) { if (finished) { return; @@ -6485,7 +6485,7 @@ upgrade: ${upgrade}\r return; } finished = true; - assert4(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); + assert3(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); if (!err) { @@ -6516,7 +6516,7 @@ upgrade: ${upgrade}\r setImmediate(onClose); } } - function writeBuffer(abort, body, client, request3, socket, contentLength, header, expectsPayload) { + function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) { try { if (!body) { if (contentLength === 0) { @@ -6524,31 +6524,31 @@ upgrade: ${upgrade}\r \r `, "latin1"); } else { - assert4(contentLength === null, "no body must not have content length"); + assert3(contentLength === null, "no body must not have content length"); socket.write(`${header}\r `, "latin1"); } } else if (util3.isBuffer(body)) { - assert4(contentLength === body.byteLength, "buffer body must have content length"); + assert3(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r \r `, "latin1"); socket.write(body); socket.uncork(); - request3.onBodySent(body); - if (!expectsPayload && request3.reset !== false) { + request2.onBodySent(body); + if (!expectsPayload && request2.reset !== false) { socket[kReset] = true; } } - request3.onRequestSent(); + request2.onRequestSent(); client[kResume](); } catch (err) { abort(err); } } - async function writeBlob(abort, body, client, request3, socket, contentLength, header, expectsPayload) { - assert4(contentLength === body.size, "blob body must have content length"); + async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + assert3(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); @@ -6560,9 +6560,9 @@ upgrade: ${upgrade}\r `, "latin1"); socket.write(buffer); socket.uncork(); - request3.onBodySent(buffer); - request3.onRequestSent(); - if (!expectsPayload && request3.reset !== false) { + request2.onBodySent(buffer); + request2.onRequestSent(); + if (!expectsPayload && request2.reset !== false) { socket[kReset] = true; } client[kResume](); @@ -6570,8 +6570,8 @@ upgrade: ${upgrade}\r abort(err); } } - async function writeIterable(abort, body, client, request3, socket, contentLength, header, expectsPayload) { - assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) { + assert3(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -6581,7 +6581,7 @@ upgrade: ${upgrade}\r } } const waitForDrain = () => new Promise((resolve, reject) => { - assert4(callback === null); + assert3(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -6589,7 +6589,7 @@ upgrade: ${upgrade}\r } }); socket.on("close", onDrain).on("drain", onDrain); - const writer = new AsyncWriter({ abort, socket, request: request3, contentLength, client, expectsPayload, header }); + const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header }); try { for await (const chunk of body) { if (socket[kError]) { @@ -6607,9 +6607,9 @@ upgrade: ${upgrade}\r } } var AsyncWriter = class { - constructor({ abort, socket, request: request3, contentLength, client, expectsPayload, header }) { + constructor({ abort, socket, request: request2, contentLength, client, expectsPayload, header }) { this.socket = socket; - this.request = request3; + this.request = request2; this.contentLength = contentLength; this.client = client; this.bytesWritten = 0; @@ -6619,7 +6619,7 @@ upgrade: ${upgrade}\r socket[kWriting] = true; } write(chunk) { - const { socket, request: request3, contentLength, client, bytesWritten, expectsPayload, header } = this; + const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this; if (socket[kError]) { throw socket[kError]; } @@ -6638,7 +6638,7 @@ upgrade: ${upgrade}\r } socket.cork(); if (bytesWritten === 0) { - if (!expectsPayload && request3.reset !== false) { + if (!expectsPayload && request2.reset !== false) { socket[kReset] = true; } if (contentLength === null) { @@ -6658,7 +6658,7 @@ ${len.toString(16)}\r this.bytesWritten += len; const ret = socket.write(chunk); socket.uncork(); - request3.onBodySent(chunk); + request2.onBodySent(chunk); if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { if (socket[kParser].timeout.refresh) { @@ -6669,8 +6669,8 @@ ${len.toString(16)}\r return ret; } end() { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request3 } = this; - request3.onRequestSent(); + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request2 } = this; + request2.onRequestSent(); socket[kWriting] = false; if (socket[kError]) { throw socket[kError]; @@ -6708,7 +6708,7 @@ ${len.toString(16)}\r const { socket, client, abort } = this; socket[kWriting] = false; if (err) { - assert4(client[kRunning] <= 1, "pipeline should only contain this request"); + assert3(client[kRunning] <= 1, "pipeline should only contain this request"); abort(err); } } @@ -6721,7 +6721,7 @@ ${len.toString(16)}\r var require_client_h2 = __commonJS({ "node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { pipeline } = __require("node:stream"); var util3 = require_util(); var { @@ -6807,11 +6807,11 @@ var require_client_h2 = __commonJS({ const err = this[kSocket][kError] || this[kError] || new SocketError("closed", util3.getSocketInfo(socket2)); client2[kHTTP2Session] = null; if (client2.destroyed) { - assert4(client2[kPending] === 0); + assert3(client2[kPending] === 0); const requests = client2[kQueue].splice(client2[kRunningIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - util3.errorRequest(client2, request3, err); + const request2 = requests[i]; + util3.errorRequest(client2, request2, err); } } }); @@ -6819,7 +6819,7 @@ var require_client_h2 = __commonJS({ client[kHTTP2Session] = session; socket[kHTTP2Session] = session; util3.addListener(socket, "error", function(err) { - assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kError] = err; this[kClient][kOnError](err); }); @@ -6833,7 +6833,7 @@ var require_client_h2 = __commonJS({ this[kHTTP2Session].destroy(err); } client[kPendingIdx] = client[kRunningIdx]; - assert4(client[kRunning] === 0); + assert3(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client[kResume](); }); @@ -6878,7 +6878,7 @@ var require_client_h2 = __commonJS({ } } function onHttp2SessionError(err) { - assert4(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + assert3(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); this[kSocket][kError] = err; this[kClient][kOnError](err); } @@ -6905,24 +6905,24 @@ var require_client_h2 = __commonJS({ } util3.destroy(this[kSocket], err); if (client[kRunningIdx] < client[kQueue].length) { - const request3 = client[kQueue][client[kRunningIdx]]; + const request2 = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; - util3.errorRequest(client, request3, err); + util3.errorRequest(client, request2, err); client[kPendingIdx] = client[kRunningIdx]; } - assert4(client[kRunning] === 0); + assert3(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); client[kResume](); } function shouldSendContentLength(method) { return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } - function writeH2(client, request3) { + function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request3; - let { body } = request3; + const { method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + let { body } = request2; if (upgrade) { - util3.errorRequest(client, request3, new Error("Upgrade not supported for H2")); + util3.errorRequest(client, request2, new Error("Upgrade not supported for H2")); return false; } const headers = {}; @@ -6942,15 +6942,15 @@ var require_client_h2 = __commonJS({ } } let stream4; - const { hostname: hostname6, port } = client[kUrl]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname6}${port ? `:${port}` : ""}`; + const { hostname: hostname5, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname5}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; const abort = (err) => { - if (request3.aborted || request3.completed) { + if (request2.aborted || request2.completed) { return; } err = err || new RequestAbortedError(); - util3.errorRequest(client, request3, err); + util3.errorRequest(client, request2, err); if (stream4 != null) { util3.destroy(stream4, err); } @@ -6959,23 +6959,23 @@ var require_client_h2 = __commonJS({ client[kResume](); }; try { - request3.onConnect(abort); + request2.onConnect(abort); } catch (err) { - util3.errorRequest(client, request3, err); + util3.errorRequest(client, request2, err); } - if (request3.aborted) { + if (request2.aborted) { return false; } if (method === "CONNECT") { session.ref(); stream4 = session.request(headers, { endStream: false, signal }); if (stream4.id && !stream4.pending) { - request3.onUpgrade(null, null, stream4); + request2.onUpgrade(null, null, stream4); ++session[kOpenStreams]; client[kQueue][client[kRunningIdx]++] = null; } else { stream4.once("ready", () => { - request3.onUpgrade(null, null, stream4); + request2.onUpgrade(null, null, stream4); ++session[kOpenStreams]; client[kQueue][client[kRunningIdx]++] = null; }); @@ -7001,20 +7001,20 @@ var require_client_h2 = __commonJS({ contentLength = bodyStream.length; } if (contentLength == null) { - contentLength = request3.contentLength; + contentLength = request2.contentLength; } if (contentLength === 0 || !expectsPayload) { contentLength = null; } - if (shouldSendContentLength(method) && contentLength > 0 && request3.contentLength != null && request3.contentLength !== contentLength) { + if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength != null && request2.contentLength !== contentLength) { if (client[kStrictContentLength]) { - util3.errorRequest(client, request3, new RequestContentLengthMismatchError()); + util3.errorRequest(client, request2, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); } if (contentLength != null) { - assert4(body, "no body must not have content length"); + assert3(body, "no body must not have content length"); headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; } session.ref(); @@ -7033,25 +7033,25 @@ var require_client_h2 = __commonJS({ ++session[kOpenStreams]; stream4.once("response", (headers2) => { const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; - request3.onResponseStarted(); - if (request3.aborted) { + request2.onResponseStarted(); + if (request2.aborted) { const err = new RequestAbortedError(); - util3.errorRequest(client, request3, err); + util3.errorRequest(client, request2, err); util3.destroy(stream4, err); return; } - if (request3.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream4.resume.bind(stream4), "") === false) { + if (request2.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream4.resume.bind(stream4), "") === false) { stream4.pause(); } stream4.on("data", (chunk) => { - if (request3.onData(chunk) === false) { + if (request2.onData(chunk) === false) { stream4.pause(); } }); }); stream4.once("end", () => { if (stream4.state?.state == null || stream4.state.state < 6) { - request3.onComplete([]); + request2.onComplete([]); } if (session[kOpenStreams] === 0) { session.unref(); @@ -7081,7 +7081,7 @@ var require_client_h2 = __commonJS({ stream4, null, client, - request3, + request2, client[kSocket], contentLength, expectsPayload @@ -7092,7 +7092,7 @@ var require_client_h2 = __commonJS({ stream4, body, client, - request3, + request2, client[kSocket], contentLength, expectsPayload @@ -7104,7 +7104,7 @@ var require_client_h2 = __commonJS({ stream4, body.stream(), client, - request3, + request2, client[kSocket], contentLength, expectsPayload @@ -7115,7 +7115,7 @@ var require_client_h2 = __commonJS({ stream4, body, client, - request3, + request2, client[kSocket], contentLength, expectsPayload @@ -7129,7 +7129,7 @@ var require_client_h2 = __commonJS({ stream4, body, client, - request3, + request2, contentLength ); } else if (util3.isIterable(body)) { @@ -7138,47 +7138,47 @@ var require_client_h2 = __commonJS({ stream4, body, client, - request3, + request2, client[kSocket], contentLength, expectsPayload ); } else { - assert4(false); + assert3(false); } } } - function writeBuffer(abort, h2stream, body, client, request3, socket, contentLength, expectsPayload) { + function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { try { if (body != null && util3.isBuffer(body)) { - assert4(contentLength === body.byteLength, "buffer body must have content length"); + assert3(contentLength === body.byteLength, "buffer body must have content length"); h2stream.cork(); h2stream.write(body); h2stream.uncork(); h2stream.end(); - request3.onBodySent(body); + request2.onBodySent(body); } if (!expectsPayload) { socket[kReset] = true; } - request3.onRequestSent(); + request2.onRequestSent(); client[kResume](); - } catch (error100) { - abort(error100); + } catch (error99) { + abort(error99); } } - function writeStream(abort, socket, expectsPayload, h2stream, body, client, request3, contentLength) { - assert4(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); - const pipe4 = pipeline( + function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { + assert3(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + const pipe3 = pipeline( body, h2stream, (err) => { if (err) { - util3.destroy(pipe4, err); + util3.destroy(pipe3, err); abort(err); } else { - util3.removeAllListeners(pipe4); - request3.onRequestSent(); + util3.removeAllListeners(pipe3); + request2.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } @@ -7186,13 +7186,13 @@ var require_client_h2 = __commonJS({ } } ); - util3.addListener(pipe4, "data", onPipeData); + util3.addListener(pipe3, "data", onPipeData); function onPipeData(chunk) { - request3.onBodySent(chunk); + request2.onBodySent(chunk); } } - async function writeBlob(abort, h2stream, body, client, request3, socket, contentLength, expectsPayload) { - assert4(contentLength === body.size, "blob body must have content length"); + async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { + assert3(contentLength === body.size, "blob body must have content length"); try { if (contentLength != null && contentLength !== body.size) { throw new RequestContentLengthMismatchError(); @@ -7202,8 +7202,8 @@ var require_client_h2 = __commonJS({ h2stream.write(buffer); h2stream.uncork(); h2stream.end(); - request3.onBodySent(buffer); - request3.onRequestSent(); + request2.onBodySent(buffer); + request2.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } @@ -7212,8 +7212,8 @@ var require_client_h2 = __commonJS({ abort(err); } } - async function writeIterable(abort, h2stream, body, client, request3, socket, contentLength, expectsPayload) { - assert4(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) { + assert3(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); let callback = null; function onDrain() { if (callback) { @@ -7223,7 +7223,7 @@ var require_client_h2 = __commonJS({ } } const waitForDrain = () => new Promise((resolve, reject) => { - assert4(callback === null); + assert3(callback === null); if (socket[kError]) { reject(socket[kError]); } else { @@ -7237,13 +7237,13 @@ var require_client_h2 = __commonJS({ throw socket[kError]; } const res = h2stream.write(chunk); - request3.onBodySent(chunk); + request2.onBodySent(chunk); if (!res) { await waitForDrain(); } } h2stream.end(); - request3.onRequestSent(); + request2.onRequestSent(); if (!expectsPayload) { socket[kReset] = true; } @@ -7264,7 +7264,7 @@ var require_redirect_handler = __commonJS({ "use strict"; var util3 = require_util(); var { kBodyUsed } = require_symbols(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { InvalidArgumentError } = require_errors(); var EE = __require("node:events"); var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; @@ -7275,7 +7275,7 @@ var require_redirect_handler = __commonJS({ this[kBodyUsed] = false; } async *[Symbol.asyncIterator]() { - assert4(!this[kBodyUsed], "disturbed"); + assert3(!this[kBodyUsed], "disturbed"); this[kBodyUsed] = true; yield* this[kBody]; } @@ -7297,7 +7297,7 @@ var require_redirect_handler = __commonJS({ if (util3.isStream(this.opts.body)) { if (util3.bodyLength(this.opts.body) === 0) { this.opts.body.on("data", function() { - assert4(false); + assert3(false); }); } if (typeof this.opts.body.readableDidRead !== "boolean") { @@ -7319,8 +7319,8 @@ var require_redirect_handler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error100) { - this.handler.onError(error100); + onError(error99) { + this.handler.onError(error99); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7409,7 +7409,7 @@ var require_redirect_handler = __commonJS({ } } } else { - assert4(headers == null, "headers must be an object or an array"); + assert3(headers == null, "headers must be an object or an array"); } return ret; } @@ -7443,7 +7443,7 @@ var require_redirect_interceptor = __commonJS({ var require_client = __commonJS({ "node_modules/undici/lib/dispatcher/client.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var net = __require("node:net"); var http3 = __require("node:http"); var util3 = require_util(); @@ -7502,7 +7502,7 @@ var require_client = __commonJS({ var connectH2 = require_client_h2(); var deprecatedInterceptorWarned = false; var kClosedResolve = /* @__PURE__ */ Symbol("kClosedResolve"); - var noop6 = () => { + var noop5 = () => { }; function getPipelining(client) { return client[kPipelining] ?? client[kHTTPContext]?.defaultPipelining ?? 1; @@ -7513,7 +7513,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../../types/client.js').Client.Options} options */ - constructor(url5, { + constructor(url4, { interceptors, maxHeaderSize, headersTimeout, @@ -7630,7 +7630,7 @@ var require_client = __commonJS({ } else { this[kInterceptors] = [createRedirectInterceptor({ maxRedirections })]; } - this[kUrl] = util3.parseOrigin(url5); + this[kUrl] = util3.parseOrigin(url4); this[kConnector] = connect2; this[kPipelining] = pipelining != null ? pipelining : 1; this[kMaxHeadersSize] = maxHeaderSize || http3.maxHeaderSize; @@ -7690,10 +7690,10 @@ var require_client = __commonJS({ } [kDispatch](opts, handler2) { const origin2 = opts.origin || this[kUrl].origin; - const request3 = new Request(origin2, opts, handler2); - this[kQueue].push(request3); + const request2 = new Request(origin2, opts, handler2); + this[kQueue].push(request2); if (this[kResuming]) { - } else if (util3.bodyLength(request3.body) == null && util3.isIterable(request3.body)) { + } else if (util3.bodyLength(request2.body) == null && util3.isIterable(request2.body)) { this[kResuming] = 1; queueMicrotask(() => resume(this)); } else { @@ -7717,8 +7717,8 @@ var require_client = __commonJS({ return new Promise((resolve) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - util3.errorRequest(this, request3, err); + const request2 = requests[i]; + util3.errorRequest(this, request2, err); } const callback = () => { if (this[kClosedResolve]) { @@ -7740,32 +7740,32 @@ var require_client = __commonJS({ var createRedirectInterceptor = require_redirect_interceptor(); function onError(client, err) { if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { - assert4(client[kPendingIdx] === client[kRunningIdx]); + assert3(client[kPendingIdx] === client[kRunningIdx]); const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { - const request3 = requests[i]; - util3.errorRequest(client, request3, err); + const request2 = requests[i]; + util3.errorRequest(client, request2, err); } - assert4(client[kSize] === 0); + assert3(client[kSize] === 0); } } async function connect(client) { - assert4(!client[kConnecting]); - assert4(!client[kHTTPContext]); - let { host, hostname: hostname6, protocol, port } = client[kUrl]; - if (hostname6[0] === "[") { - const idx = hostname6.indexOf("]"); - assert4(idx !== -1); - const ip = hostname6.substring(1, idx); - assert4(net.isIP(ip)); - hostname6 = ip; + assert3(!client[kConnecting]); + assert3(!client[kHTTPContext]); + let { host, hostname: hostname5, protocol, port } = client[kUrl]; + if (hostname5[0] === "[") { + const idx = hostname5.indexOf("]"); + assert3(idx !== -1); + const ip = hostname5.substring(1, idx); + assert3(net.isIP(ip)); + hostname5 = ip; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname6, + hostname: hostname5, protocol, port, version: client[kHTTPContext]?.version, @@ -7779,7 +7779,7 @@ var require_client = __commonJS({ const socket = await new Promise((resolve, reject) => { client[kConnector]({ host, - hostname: hostname6, + hostname: hostname5, protocol, port, servername: client[kServerName], @@ -7793,14 +7793,14 @@ var require_client = __commonJS({ }); }); if (client.destroyed) { - util3.destroy(socket.on("error", noop6), new ClientDestroyedError()); + util3.destroy(socket.on("error", noop5), new ClientDestroyedError()); return; } - assert4(socket); + assert3(socket); try { client[kHTTPContext] = socket.alpnProtocol === "h2" ? await connectH2(client, socket) : await connectH1(client, socket); } catch (err) { - socket.destroy().on("error", noop6); + socket.destroy().on("error", noop5); throw err; } client[kConnecting] = false; @@ -7812,7 +7812,7 @@ var require_client = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname6, + hostname: hostname5, protocol, port, version: client[kHTTPContext]?.version, @@ -7833,7 +7833,7 @@ var require_client = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname6, + hostname: hostname5, protocol, port, version: client[kHTTPContext]?.version, @@ -7845,10 +7845,10 @@ var require_client = __commonJS({ }); } if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - assert4(client[kRunning] === 0); + assert3(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request3 = client[kQueue][client[kPendingIdx]++]; - util3.errorRequest(client, request3, err); + const request2 = client[kQueue][client[kPendingIdx]++]; + util3.errorRequest(client, request2, err); } } else { onError(client, err); @@ -7877,7 +7877,7 @@ var require_client = __commonJS({ function _resume(client, sync) { while (true) { if (client.destroyed) { - assert4(client[kPending] === 0); + assert3(client[kPending] === 0); return; } if (client[kClosedResolve] && !client[kSize]) { @@ -7905,12 +7905,12 @@ var require_client = __commonJS({ if (client[kRunning] >= (getPipelining(client) || 1)) { return; } - const request3 = client[kQueue][client[kPendingIdx]]; - if (client[kUrl].protocol === "https:" && client[kServerName] !== request3.servername) { + const request2 = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request2.servername) { if (client[kRunning] > 0) { return; } - client[kServerName] = request3.servername; + client[kServerName] = request2.servername; client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { client[kHTTPContext] = null; resume(client); @@ -7926,10 +7926,10 @@ var require_client = __commonJS({ if (client[kHTTPContext].destroyed) { return; } - if (client[kHTTPContext].busy(request3)) { + if (client[kHTTPContext].busy(request2)) { return; } - if (!request3.aborted && client[kHTTPContext].write(request3)) { + if (!request2.aborted && client[kHTTPContext].write(request2)) { client[kPendingIdx]++; } else { client[kQueue].splice(client[kPendingIdx], 1); @@ -8249,7 +8249,7 @@ var require_pool = __commonJS({ this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory2; - this.on("connectionError", (origin3, targets, error100) => { + this.on("connectionError", (origin3, targets, error99) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -8541,7 +8541,7 @@ var require_proxy_agent = __commonJS({ function defaultFactory(origin2, opts) { return new Pool(origin2, opts); } - var noop6 = () => { + var noop5 = () => { }; function defaultAgentFactory(origin2, opts) { if (opts.connections === 1) { @@ -8605,8 +8605,8 @@ var require_proxy_agent = __commonJS({ throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); } const { proxyTunnel = true } = opts; - const url5 = this.#getUrl(opts); - const { href, origin: origin2, port, protocol, username, password, hostname: proxyHostname } = url5; + const url4 = this.#getUrl(opts); + const { href, origin: origin2, port, protocol, username, password, hostname: proxyHostname } = url4; this[kProxy] = { uri: href, protocol }; this[kInterceptors] = opts.interceptors?.ProxyAgent && Array.isArray(opts.interceptors.ProxyAgent) ? opts.interceptors.ProxyAgent : []; this[kRequestTls] = opts.requestTls; @@ -8636,7 +8636,7 @@ var require_proxy_agent = __commonJS({ } return agentFactory(origin3, options); }; - this[kClient] = clientFactory(url5, { connect }); + this[kClient] = clientFactory(url4, { connect }); this[kAgent] = new Agent({ ...opts, factory: factory2, @@ -8658,7 +8658,7 @@ var require_proxy_agent = __commonJS({ servername: this[kProxyTls]?.servername || proxyHostname }); if (statusCode !== 200) { - socket.on("error", noop6).destroy(); + socket.on("error", noop5).destroy(); callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); } if (opts2.protocol !== "https:") { @@ -8782,8 +8782,8 @@ var require_env_http_proxy_agent = __commonJS({ this.#parseNoProxy(); } [kDispatch](opts, handler2) { - const url5 = new URL(opts.origin); - const agent = this.#getProxyAgentForUrl(url5); + const url4 = new URL(opts.origin); + const agent = this.#getProxyAgentForUrl(url4); return agent.dispatch(opts, handler2); } async [kClose]() { @@ -8804,11 +8804,11 @@ var require_env_http_proxy_agent = __commonJS({ await this[kHttpsProxyAgent].destroy(err); } } - #getProxyAgentForUrl(url5) { - let { protocol, host: hostname6, port } = url5; - hostname6 = hostname6.replace(/:\d*$/, "").toLowerCase(); + #getProxyAgentForUrl(url4) { + let { protocol, host: hostname5, port } = url4; + hostname5 = hostname5.replace(/:\d*$/, "").toLowerCase(); port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname6, port)) { + if (!this.#shouldProxy(hostname5, port)) { return this[kNoProxyAgent]; } if (protocol === "https:") { @@ -8816,7 +8816,7 @@ var require_env_http_proxy_agent = __commonJS({ } return this[kHttpProxyAgent]; } - #shouldProxy(hostname6, port) { + #shouldProxy(hostname5, port) { if (this.#noProxyChanged) { this.#parseNoProxy(); } @@ -8832,11 +8832,11 @@ var require_env_http_proxy_agent = __commonJS({ continue; } if (!/^[.*]/.test(entry.hostname)) { - if (hostname6 === entry.hostname) { + if (hostname5 === entry.hostname) { return false; } } else { - if (hostname6.endsWith(entry.hostname.replace(/^\*/, ""))) { + if (hostname5.endsWith(entry.hostname.replace(/^\*/, ""))) { return false; } } @@ -8879,7 +8879,7 @@ var require_env_http_proxy_agent = __commonJS({ var require_retry_handler = __commonJS({ "node_modules/undici/lib/handler/retry-handler.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { kRetryHandlerDefaultRetry } = require_symbols(); var { RequestRetryError } = require_errors(); var { @@ -9065,8 +9065,8 @@ var require_retry_handler = __commonJS({ return false; } const { start, size, end = size - 1 } = contentRange; - assert4(this.start === start, "content-range mismatch"); - assert4(this.end == null || this.end === end, "content-range mismatch"); + assert3(this.start === start, "content-range mismatch"); + assert3(this.end == null || this.end === end, "content-range mismatch"); this.resume = resume; return true; } @@ -9082,11 +9082,11 @@ var require_retry_handler = __commonJS({ ); } const { start, size, end = size - 1 } = range; - assert4( + assert3( start != null && Number.isFinite(start), "content-range mismatch" ); - assert4(end != null && Number.isFinite(end), "invalid content-length"); + assert3(end != null && Number.isFinite(end), "invalid content-length"); this.start = start; this.end = end; } @@ -9094,8 +9094,8 @@ var require_retry_handler = __commonJS({ const contentLength = headers["content-length"]; this.end = contentLength != null ? Number(contentLength) - 1 : null; } - assert4(Number.isFinite(this.start)); - assert4( + assert3(Number.isFinite(this.start)); + assert3( this.end == null || Number.isFinite(this.end), "invalid content-length" ); @@ -9212,7 +9212,7 @@ var require_retry_agent = __commonJS({ var require_readable = __commonJS({ "node_modules/undici/lib/api/readable.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { Readable: Readable2 } = __require("node:stream"); var { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require_errors(); var util3 = require_util(); @@ -9223,7 +9223,7 @@ var require_readable = __commonJS({ var kAbort = /* @__PURE__ */ Symbol("kAbort"); var kContentType = /* @__PURE__ */ Symbol("kContentType"); var kContentLength = /* @__PURE__ */ Symbol("kContentLength"); - var noop6 = () => { + var noop5 = () => { }; var BodyReadable = class extends Readable2 { constructor({ @@ -9325,7 +9325,7 @@ var require_readable = __commonJS({ this[kBody] = ReadableStreamFrom(this); if (this[kConsume]) { this[kBody].getReader(); - assert4(this[kBody].locked); + assert3(this[kBody].locked); } } return this[kBody]; @@ -9355,7 +9355,7 @@ var require_readable = __commonJS({ } else { resolve(null); } - }).on("error", noop6).on("data", function(chunk) { + }).on("error", noop5).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); @@ -9371,7 +9371,7 @@ var require_readable = __commonJS({ return util3.isDisturbed(self2) || isLocked(self2); } async function consume(stream4, type) { - assert4(!stream4[kConsume]); + assert3(!stream4[kConsume]); return new Promise((resolve, reject) => { if (isUnusable(stream4)) { const rState = stream4._readableState; @@ -9504,14 +9504,14 @@ var require_readable = __commonJS({ // node_modules/undici/lib/api/util.js var require_util3 = __commonJS({ "node_modules/undici/lib/api/util.js"(exports, module) { - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { ResponseStatusCodeError } = require_errors(); var { chunksDecode } = require_readable(); var CHUNK_LIMIT = 128 * 1024; async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert4(body); + assert3(body); let chunks = []; let length = 0; try { @@ -9566,7 +9566,7 @@ var require_util3 = __commonJS({ var require_api_request = __commonJS({ "node_modules/undici/lib/api/api-request.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { Readable: Readable2 } = require_readable(); var { InvalidArgumentError, RequestAbortedError } = require_errors(); var util3 = require_util(); @@ -9646,7 +9646,7 @@ var require_api_request = __commonJS({ abort(this.reason); return; } - assert4(this.callback); + assert3(this.callback); this.abort = abort; this.context = context3; } @@ -9725,10 +9725,10 @@ var require_api_request = __commonJS({ } } }; - function request3(opts, callback) { + function request2(opts, callback) { if (callback === void 0) { return new Promise((resolve, reject) => { - request3.call(this, opts, (err, data) => { + request2.call(this, opts, (err, data) => { return err ? reject(err) : resolve(data); }); }); @@ -9743,7 +9743,7 @@ var require_api_request = __commonJS({ queueMicrotask(() => callback(err, { opaque })); } } - module.exports = request3; + module.exports = request2; module.exports.RequestHandler = RequestHandler; } }); @@ -9803,7 +9803,7 @@ var require_abort_signal = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { finished, PassThrough } = __require("node:stream"); var { InvalidArgumentError, InvalidReturnValueError } = require_errors(); var util3 = require_util(); @@ -9862,7 +9862,7 @@ var require_api_stream = __commonJS({ abort(this.reason); return; } - assert4(this.callback); + assert3(this.callback); this.abort = abort; this.context = context3; } @@ -9989,7 +9989,7 @@ var require_api_pipeline = __commonJS({ var util3 = require_util(); var { AsyncResource } = __require("node:async_hooks"); var { addSignal, removeSignal } = require_abort_signal(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var kResume = /* @__PURE__ */ Symbol("resume"); var PipelineRequest = class extends Readable2 { constructor() { @@ -10093,8 +10093,8 @@ var require_api_pipeline = __commonJS({ abort(this.reason); return; } - assert4(!res, "pipeline cannot be retried"); - assert4(!ret.destroyed); + assert3(!res, "pipeline cannot be retried"); + assert3(!ret.destroyed); this.abort = abort; this.context = context3; } @@ -10180,7 +10180,7 @@ var require_api_upgrade = __commonJS({ var { AsyncResource } = __require("node:async_hooks"); var util3 = require_util(); var { addSignal, removeSignal } = require_abort_signal(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var UpgradeHandler = class extends AsyncResource { constructor(opts, callback) { if (!opts || typeof opts !== "object") { @@ -10206,7 +10206,7 @@ var require_api_upgrade = __commonJS({ abort(this.reason); return; } - assert4(this.callback); + assert3(this.callback); this.abort = abort; this.context = null; } @@ -10214,7 +10214,7 @@ var require_api_upgrade = __commonJS({ throw new SocketError("bad upgrade", null); } onUpgrade(statusCode, rawHeaders, socket) { - assert4(statusCode === 101); + assert3(statusCode === 101); const { callback, opaque, context: context3 } = this; removeSignal(this); this.callback = null; @@ -10268,7 +10268,7 @@ var require_api_upgrade = __commonJS({ var require_api_connect = __commonJS({ "node_modules/undici/lib/api/api-connect.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { AsyncResource } = __require("node:async_hooks"); var { InvalidArgumentError, SocketError } = require_errors(); var util3 = require_util(); @@ -10297,7 +10297,7 @@ var require_api_connect = __commonJS({ abort(this.reason); return; } - assert4(this.callback); + assert3(this.callback); this.abort = abort; this.context = context3; } @@ -10472,10 +10472,10 @@ var require_mock_utils = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone4 = headers.slice(); + const clone3 = headers.slice(); const entries = []; - for (let index = 0; index < clone4.length; index += 2) { - entries.push([clone4[index], clone4[index + 1]]); + for (let index = 0; index < clone3.length; index += 2) { + entries.push([clone3[index], clone3[index + 1]]); } return Object.fromEntries(entries); } @@ -10519,7 +10519,7 @@ var require_mock_utils = __commonJS({ const headersMatch = matchHeaders(mockDispatch2, headers); return pathMatch && methodMatch && bodyMatch && headersMatch; } - function getResponseData3(data) { + function getResponseData2(data) { if (Buffer.isBuffer(data)) { return data; } else if (data instanceof Uint8Array) { @@ -10616,13 +10616,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error100 }, delay, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error99 }, delay, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error100 !== null) { + if (error99 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error100); + handler2.onError(error99); return true; } if (typeof delay === "number" && delay > 0) { @@ -10639,7 +10639,7 @@ var require_mock_utils = __commonJS({ body.then((newData) => handleReply(mockDispatches, newData)); return; } - const responseData = getResponseData3(body); + const responseData = getResponseData2(body); const responseHeaders = generateKeyValues(headers); const responseTrailers = generateKeyValues(trailers); handler2.onConnect?.((err) => handler2.onError(err), null); @@ -10660,19 +10660,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error100) { - if (error100 instanceof MockNotMatchedError) { + } catch (error99) { + if (error99 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error100.message}: subsequent request to origin ${origin2} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error99.message}: subsequent request to origin ${origin2} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin2)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error100.message}: subsequent request to origin ${origin2} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error99.message}: subsequent request to origin ${origin2} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error100; + throw error99; } } } else { @@ -10681,10 +10681,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin2) { - const url5 = new URL(origin2); + const url4 = new URL(origin2); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url5.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url4.host))) { return true; } return false; @@ -10696,7 +10696,7 @@ var require_mock_utils = __commonJS({ } } module.exports = { - getResponseData: getResponseData3, + getResponseData: getResponseData2, getMockDispatch, addMockDispatch, deleteMockDispatch, @@ -10719,7 +10719,7 @@ var require_mock_utils = __commonJS({ var require_mock_interceptor = __commonJS({ "node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) { "use strict"; - var { getResponseData: getResponseData3, buildKey, addMockDispatch } = require_mock_utils(); + var { getResponseData: getResponseData2, buildKey, addMockDispatch } = require_mock_utils(); var { kDispatches, kDispatchKey, @@ -10791,7 +10791,7 @@ var require_mock_interceptor = __commonJS({ this[kContentLength] = false; } createMockScopeDispatchData({ statusCode, data, responseOptions }) { - const responseData = getResponseData3(data); + const responseData = getResponseData2(data); const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; @@ -10837,11 +10837,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error100) { - if (typeof error100 === "undefined") { + replyWithError(error99) { + if (typeof error99 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error100 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error99 }); return new MockScope(newMockDispatch); } /** @@ -11562,21 +11562,21 @@ var require_dns = __commonJS({ setRecords(origin2, addresses) { const timestamp = Date.now(); const records = { records: { 4: null, 6: null } }; - for (const record4 of addresses) { - record4.timestamp = timestamp; - if (typeof record4.ttl === "number") { - record4.ttl = Math.min(record4.ttl, this.#maxTTL); + for (const record3 of addresses) { + record3.timestamp = timestamp; + if (typeof record3.ttl === "number") { + record3.ttl = Math.min(record3.ttl, this.#maxTTL); } else { - record4.ttl = this.#maxTTL; + record3.ttl = this.#maxTTL; } - const familyRecords = records.records[record4.family] ?? { ips: [] }; - familyRecords.ips.push(record4); - records.records[record4.family] = familyRecords; + const familyRecords = records.records[record3.family] ?? { ips: [] }; + familyRecords.ips.push(record3); + records.records[record3.family] = familyRecords; } this.#records.set(origin2.hostname, records); } - getHandler(meta6, opts) { - return new DNSDispatchHandler(this, meta6, opts); + getHandler(meta5, opts) { + return new DNSDispatchHandler(this, meta5, opts); } }; var DNSDispatchHandler = class extends DecoratorHandler { @@ -11705,7 +11705,7 @@ var require_headers = __commonJS({ isValidHeaderValue } = require_util2(); var { webidl } = require_webidl(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var util3 = __require("node:util"); var kHeadersMap = /* @__PURE__ */ Symbol("headers map"); var kHeadersSortedMap = /* @__PURE__ */ Symbol("headers map sorted"); @@ -11719,10 +11719,10 @@ var require_headers = __commonJS({ while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } - function fill(headers, object4) { - if (Array.isArray(object4)) { - for (let i = 0; i < object4.length; ++i) { - const header = object4[i]; + function fill(headers, object3) { + if (Array.isArray(object3)) { + for (let i = 0; i < object3.length; ++i) { + const header = object3[i]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", @@ -11731,10 +11731,10 @@ var require_headers = __commonJS({ } appendHeader(headers, header[0], header[1]); } - } else if (typeof object4 === "object" && object4 !== null) { - const keys = Object.keys(object4); + } else if (typeof object3 === "object" && object3 !== null) { + const keys = Object.keys(object3); for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object4[keys[i]]); + appendHeader(headers, keys[i], object3[keys[i]]); } } else { throw webidl.errors.conversionFailed({ @@ -11887,24 +11887,24 @@ var require_headers = __commonJS({ // https://fetch.spec.whatwg.org/#convert-header-names-to-a-sorted-lowercase-set toSortedArray() { const size = this[kHeadersMap].size; - const array4 = new Array(size); + const array3 = new Array(size); if (size <= 32) { if (size === 0) { - return array4; + return array3; } const iterator3 = this[kHeadersMap][Symbol.iterator](); const firstValue = iterator3.next().value; - array4[0] = [firstValue[0], firstValue[1].value]; - assert4(firstValue[1].value !== null); + array3[0] = [firstValue[0], firstValue[1].value]; + assert3(firstValue[1].value !== null); for (let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value; i < size; ++i) { value = iterator3.next().value; - x = array4[i] = [value[0], value[1].value]; - assert4(x[1] !== null); + x = array3[i] = [value[0], value[1].value]; + assert3(x[1] !== null); left = 0; right = i; while (left < right) { pivot = left + (right - left >> 1); - if (array4[pivot][0] <= x[0]) { + if (array3[pivot][0] <= x[0]) { left = pivot + 1; } else { right = pivot; @@ -11913,22 +11913,22 @@ var require_headers = __commonJS({ if (i !== pivot) { j = i; while (j > left) { - array4[j] = array4[--j]; + array3[j] = array3[--j]; } - array4[left] = x; + array3[left] = x; } } if (!iterator3.next().done) { throw new TypeError("Unreachable"); } - return array4; + return array3; } else { let i = 0; for (const { 0: name, 1: { value } } of this[kHeadersMap]) { - array4[i++] = [name, value]; - assert4(value !== null); + array3[i++] = [name, value]; + assert3(value !== null); } - return array4.sort(compareHeaderName); + return array3.sort(compareHeaderName); } } }; @@ -12165,7 +12165,7 @@ var require_response = __commonJS({ var { FormData: FormData3 } = require_formdata(); var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { types } = __require("node:util"); var textEncoder2 = new TextEncoder("utf-8"); var Response = class _Response { @@ -12189,15 +12189,15 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url5, status = 302) { + static redirect(url4, status = 302) { webidl.argumentLengthCheck(arguments, 1, "Response.redirect"); - url5 = webidl.converters.USVString(url5); + url4 = webidl.converters.USVString(url4); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url5, relevantRealm.settingsObject.baseUrl); + parsedURL = new URL(url4, relevantRealm.settingsObject.baseUrl); } catch (err) { - throw new TypeError(`Failed to parse URL from ${url5}`, { cause: err }); + throw new TypeError(`Failed to parse URL from ${url4}`, { cause: err }); } if (!redirectStatusSet.has(status)) { throw new RangeError(`Invalid status code ${status}`); @@ -12238,11 +12238,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url5 = urlList[urlList.length - 1] ?? null; - if (url5 === null) { + const url4 = urlList[urlList.length - 1] ?? null; + if (url4 === null) { return ""; } - return URLSerializer(url5, true); + return URLSerializer(url4, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -12388,7 +12388,7 @@ var require_response = __commonJS({ return p in state ? state[p] : target[p]; }, set(target, p, value) { - assert4(!(p in state)); + assert3(!(p in state)); target[p] = value; return true; } @@ -12422,11 +12422,11 @@ var require_response = __commonJS({ body: null }); } else { - assert4(false); + assert3(false); } } function makeAppropriateNetworkError(fetchParams, err = null) { - assert4(isCancelled(fetchParams)); + assert3(isCancelled(fetchParams)); return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); } function initializeResponse(response, init, body) { @@ -12607,7 +12607,7 @@ var require_request2 = __commonJS({ var { webidl } = require_webidl(); var { URLSerializer } = require_data_url(); var { kConstruct } = require_symbols(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("node:events"); var kAbortController = /* @__PURE__ */ Symbol("abortController"); var requestFinalizer = new FinalizationRegistry2(({ signal, abort }) => { @@ -12650,7 +12650,7 @@ var require_request2 = __commonJS({ webidl.argumentLengthCheck(arguments, 1, prefix); input = webidl.converters.RequestInfo(input, prefix, "input"); init = webidl.converters.RequestInit(init, prefix, "init"); - let request3 = null; + let request2 = null; let fallbackMode = null; const baseUrl2 = environmentSettingsObject.settingsObject.baseUrl; let signal = null; @@ -12667,18 +12667,18 @@ var require_request2 = __commonJS({ "Request cannot be constructed from a URL that includes credentials: " + input ); } - request3 = makeRequest({ urlList: [parsedURL] }); + request2 = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { this[kDispatcher] = init.dispatcher || input[kDispatcher]; - assert4(input instanceof _Request); - request3 = input[kState]; + assert3(input instanceof _Request); + request2 = input[kState]; signal = input[kSignal]; } const origin2 = environmentSettingsObject.settingsObject.origin; let window2 = "client"; - if (request3.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request3.window, origin2)) { - window2 = request3.window; + if (request2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin2)) { + window2 = request2.window; } if (init.window != null) { throw new TypeError(`'window' option '${window2}' must be null`); @@ -12686,66 +12686,66 @@ var require_request2 = __commonJS({ if ("window" in init) { window2 = "no-window"; } - request3 = makeRequest({ + request2 = makeRequest({ // URL request’s URL. // undici implementation note: this is set as the first item in request's urlList in makeRequest // method request’s method. - method: request3.method, + method: request2.method, // header list A copy of request’s header list. // undici implementation note: headersList is cloned in makeRequest - headersList: request3.headersList, + headersList: request2.headersList, // unsafe-request flag Set. - unsafeRequest: request3.unsafeRequest, + unsafeRequest: request2.unsafeRequest, // client This’s relevant settings object. client: environmentSettingsObject.settingsObject, // window window. window: window2, // priority request’s priority. - priority: request3.priority, + priority: request2.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests // being handled by a service worker. In this scenario a request can have an origin that is different // from the current client. - origin: request3.origin, + origin: request2.origin, // referrer request’s referrer. - referrer: request3.referrer, + referrer: request2.referrer, // referrer policy request’s referrer policy. - referrerPolicy: request3.referrerPolicy, + referrerPolicy: request2.referrerPolicy, // mode request’s mode. - mode: request3.mode, + mode: request2.mode, // credentials mode request’s credentials mode. - credentials: request3.credentials, + credentials: request2.credentials, // cache mode request’s cache mode. - cache: request3.cache, + cache: request2.cache, // redirect mode request’s redirect mode. - redirect: request3.redirect, + redirect: request2.redirect, // integrity metadata request’s integrity metadata. - integrity: request3.integrity, + integrity: request2.integrity, // keepalive request’s keepalive. - keepalive: request3.keepalive, + keepalive: request2.keepalive, // reload-navigation flag request’s reload-navigation flag. - reloadNavigation: request3.reloadNavigation, + reloadNavigation: request2.reloadNavigation, // history-navigation flag request’s history-navigation flag. - historyNavigation: request3.historyNavigation, + historyNavigation: request2.historyNavigation, // URL list A clone of request’s URL list. - urlList: [...request3.urlList] + urlList: [...request2.urlList] }); const initHasKey = Object.keys(init).length !== 0; if (initHasKey) { - if (request3.mode === "navigate") { - request3.mode = "same-origin"; + if (request2.mode === "navigate") { + request2.mode = "same-origin"; } - request3.reloadNavigation = false; - request3.historyNavigation = false; - request3.origin = "client"; - request3.referrer = "client"; - request3.referrerPolicy = ""; - request3.url = request3.urlList[request3.urlList.length - 1]; - request3.urlList = [request3.url]; + request2.reloadNavigation = false; + request2.historyNavigation = false; + request2.origin = "client"; + request2.referrer = "client"; + request2.referrerPolicy = ""; + request2.url = request2.urlList[request2.urlList.length - 1]; + request2.urlList = [request2.url]; } if (init.referrer !== void 0) { const referrer = init.referrer; if (referrer === "") { - request3.referrer = "no-referrer"; + request2.referrer = "no-referrer"; } else { let parsedReferrer; try { @@ -12754,14 +12754,14 @@ var require_request2 = __commonJS({ throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); } if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin2 && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) { - request3.referrer = "client"; + request2.referrer = "client"; } else { - request3.referrer = parsedReferrer; + request2.referrer = parsedReferrer; } } } if (init.referrerPolicy !== void 0) { - request3.referrerPolicy = init.referrerPolicy; + request2.referrerPolicy = init.referrerPolicy; } let mode; if (init.mode !== void 0) { @@ -12776,33 +12776,33 @@ var require_request2 = __commonJS({ }); } if (mode != null) { - request3.mode = mode; + request2.mode = mode; } if (init.credentials !== void 0) { - request3.credentials = init.credentials; + request2.credentials = init.credentials; } if (init.cache !== void 0) { - request3.cache = init.cache; + request2.cache = init.cache; } - if (request3.cache === "only-if-cached" && request3.mode !== "same-origin") { + if (request2.cache === "only-if-cached" && request2.mode !== "same-origin") { throw new TypeError( "'only-if-cached' can be set only with 'same-origin' mode" ); } if (init.redirect !== void 0) { - request3.redirect = init.redirect; + request2.redirect = init.redirect; } if (init.integrity != null) { - request3.integrity = String(init.integrity); + request2.integrity = String(init.integrity); } if (init.keepalive !== void 0) { - request3.keepalive = Boolean(init.keepalive); + request2.keepalive = Boolean(init.keepalive); } if (init.method !== void 0) { let method = init.method; const mayBeNormalized = normalizedMethodRecords[method]; if (mayBeNormalized !== void 0) { - request3.method = mayBeNormalized; + request2.method = mayBeNormalized; } else { if (!isValidHTTPToken(method)) { throw new TypeError(`'${method}' is not a valid HTTP method.`); @@ -12812,9 +12812,9 @@ var require_request2 = __commonJS({ throw new TypeError(`'${method}' HTTP method is unsupported.`); } method = normalizedMethodRecordsBase[upperCase] ?? method; - request3.method = method; + request2.method = method; } - if (!patchMethodWarning && request3.method === "patch") { + if (!patchMethodWarning && request2.method === "patch") { process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.", { code: "UNDICI-FETCH-patch" }); @@ -12824,7 +12824,7 @@ var require_request2 = __commonJS({ if (init.signal !== void 0) { signal = init.signal; } - this[kState] = request3; + this[kState] = request2; const ac = new AbortController(); this[kSignal] = ac.signal; if (signal != null) { @@ -12852,12 +12852,12 @@ var require_request2 = __commonJS({ } } this[kHeaders] = new Headers2(kConstruct); - setHeadersList(this[kHeaders], request3.headersList); + setHeadersList(this[kHeaders], request2.headersList); setHeadersGuard(this[kHeaders], "request"); if (mode === "no-cors") { - if (!corsSafeListedMethodsSet.has(request3.method)) { + if (!corsSafeListedMethodsSet.has(request2.method)) { throw new TypeError( - `'${request3.method} is unsupported in no-cors mode.` + `'${request2.method} is unsupported in no-cors mode.` ); } setHeadersGuard(this[kHeaders], "request-no-cors"); @@ -12876,14 +12876,14 @@ var require_request2 = __commonJS({ } } const inputBody = input instanceof _Request ? input[kState].body : null; - if ((init.body != null || inputBody != null) && (request3.method === "GET" || request3.method === "HEAD")) { + if ((init.body != null || inputBody != null) && (request2.method === "GET" || request2.method === "HEAD")) { throw new TypeError("Request with GET/HEAD method cannot have body."); } let initBody = null; if (init.body != null) { const [extractedBody, contentType] = extractBody( init.body, - request3.keepalive + request2.keepalive ); initBody = extractedBody; if (contentType && !getHeadersList(this[kHeaders]).contains("content-type", true)) { @@ -12895,12 +12895,12 @@ var require_request2 = __commonJS({ if (initBody != null && init.duplex == null) { throw new TypeError("RequestInit: duplex option is required when sending a body."); } - if (request3.mode !== "same-origin" && request3.mode !== "cors") { + if (request2.mode !== "same-origin" && request2.mode !== "cors") { throw new TypeError( 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' ); } - request3.useCORSPreflightFlag = true; + request2.useCORSPreflightFlag = true; } let finalBody = inputOrInitBody; if (initBody == null && inputBody != null) { @@ -13129,21 +13129,21 @@ var require_request2 = __commonJS({ headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList() }; } - function cloneRequest(request3) { - const newRequest = makeRequest({ ...request3, body: null }); - if (request3.body != null) { - newRequest.body = cloneBody(newRequest, request3.body); + function cloneRequest(request2) { + const newRequest = makeRequest({ ...request2, body: null }); + if (request2.body != null) { + newRequest.body = cloneBody(newRequest, request2.body); } return newRequest; } function fromInnerRequest(innerRequest, signal, guard) { - const request3 = new Request(kConstruct); - request3[kState] = innerRequest; - request3[kSignal] = signal; - request3[kHeaders] = new Headers2(kConstruct); - setHeadersList(request3[kHeaders], innerRequest.headersList); - setHeadersGuard(request3[kHeaders], guard); - return request3; + const request2 = new Request(kConstruct); + request2[kState] = innerRequest; + request2[kSignal] = signal; + request2[kHeaders] = new Headers2(kConstruct); + setHeadersList(request2[kHeaders], innerRequest.headersList); + setHeadersGuard(request2[kHeaders], guard); + return request2; } Object.defineProperties(Request.prototype, { method: kEnumerableProperty, @@ -13323,7 +13323,7 @@ var require_fetch = __commonJS({ extractMimeType } = require_util2(); var { kState, kDispatcher } = require_symbols2(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { safelyExtractBody, extractBody } = require_body(); var { redirectStatusSet, @@ -13359,17 +13359,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error100) { + abort(error99) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error100) { - error100 = new DOMException("The operation was aborted.", "AbortError"); + if (!error99) { + error99 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error100; - this.connection?.destroy(error100); - this.emit("terminated", error100); + this.serializedAbortReason = error99; + this.connection?.destroy(error99); + this.emit("terminated", error99); } }; function handleFetchDone(response) { @@ -13385,14 +13385,14 @@ var require_fetch = __commonJS({ p.reject(e); return p.promise; } - const request3 = requestObject[kState]; + const request2 = requestObject[kState]; if (requestObject.signal.aborted) { - abortFetch(p, request3, null, requestObject.signal.reason); + abortFetch(p, request2, null, requestObject.signal.reason); return p.promise; } - const globalObject = request3.client.globalObject; + const globalObject = request2.client.globalObject; if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { - request3.serviceWorkers = "none"; + request2.serviceWorkers = "none"; } let responseObject = null; let locallyAborted = false; @@ -13401,10 +13401,10 @@ var require_fetch = __commonJS({ requestObject.signal, () => { locallyAborted = true; - assert4(controller != null); + assert3(controller != null); controller.abort(requestObject.signal.reason); const realResponse = responseObject?.deref(); - abortFetch(p, request3, realResponse, requestObject.signal.reason); + abortFetch(p, request2, realResponse, requestObject.signal.reason); } ); const processResponse = (response) => { @@ -13412,7 +13412,7 @@ var require_fetch = __commonJS({ return; } if (response.aborted) { - abortFetch(p, request3, responseObject, controller.serializedAbortReason); + abortFetch(p, request2, responseObject, controller.serializedAbortReason); return; } if (response.type === "error") { @@ -13424,7 +13424,7 @@ var require_fetch = __commonJS({ p = null; }; controller = fetching({ - request: request3, + request: request2, processResponseEndOfBody: handleFetchDone, processResponse, dispatcher: requestObject[kDispatcher] @@ -13465,12 +13465,12 @@ var require_fetch = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request3, responseObject, error100) { + function abortFetch(p, request2, responseObject, error99) { if (p) { - p.reject(error100); + p.reject(error99); } - if (request3.body != null && isReadable(request3.body?.stream)) { - request3.body.stream.cancel(error100).catch((err) => { + if (request2.body != null && isReadable(request2.body?.stream)) { + request2.body.stream.cancel(error99).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13482,7 +13482,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error100).catch((err) => { + response.body.stream.cancel(error99).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13491,7 +13491,7 @@ var require_fetch = __commonJS({ } } function fetching({ - request: request3, + request: request2, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, @@ -13501,12 +13501,12 @@ var require_fetch = __commonJS({ dispatcher = getGlobalDispatcher() // undici }) { - assert4(dispatcher); + assert3(dispatcher); let taskDestination = null; let crossOriginIsolatedCapability = false; - if (request3.client != null) { - taskDestination = request3.client.globalObject; - crossOriginIsolatedCapability = request3.client.crossOriginIsolatedCapability; + if (request2.client != null) { + taskDestination = request2.client.globalObject; + crossOriginIsolatedCapability = request2.client.crossOriginIsolatedCapability; } const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); const timingInfo = createOpaqueTimingInfo({ @@ -13514,7 +13514,7 @@ var require_fetch = __commonJS({ }); const fetchParams = { controller: new Fetch(dispatcher), - request: request3, + request: request2, timingInfo, processRequestBodyChunkLength, processRequestEndOfBody, @@ -13524,32 +13524,32 @@ var require_fetch = __commonJS({ taskDestination, crossOriginIsolatedCapability }; - assert4(!request3.body || request3.body.stream); - if (request3.window === "client") { - request3.window = request3.client?.globalObject?.constructor?.name === "Window" ? request3.client : "no-window"; + assert3(!request2.body || request2.body.stream); + if (request2.window === "client") { + request2.window = request2.client?.globalObject?.constructor?.name === "Window" ? request2.client : "no-window"; } - if (request3.origin === "client") { - request3.origin = request3.client.origin; + if (request2.origin === "client") { + request2.origin = request2.client.origin; } - if (request3.policyContainer === "client") { - if (request3.client != null) { - request3.policyContainer = clonePolicyContainer( - request3.client.policyContainer + if (request2.policyContainer === "client") { + if (request2.client != null) { + request2.policyContainer = clonePolicyContainer( + request2.client.policyContainer ); } else { - request3.policyContainer = makePolicyContainer(); + request2.policyContainer = makePolicyContainer(); } } - if (!request3.headersList.contains("accept", true)) { + if (!request2.headersList.contains("accept", true)) { const value = "*/*"; - request3.headersList.append("accept", value, true); + request2.headersList.append("accept", value, true); } - if (!request3.headersList.contains("accept-language", true)) { - request3.headersList.append("accept-language", "*", true); + if (!request2.headersList.contains("accept-language", true)) { + request2.headersList.append("accept-language", "*", true); } - if (request3.priority === null) { + if (request2.priority === null) { } - if (subresourceSet.has(request3.destination)) { + if (subresourceSet.has(request2.destination)) { } mainFetch(fetchParams).catch((err) => { fetchParams.controller.terminate(err); @@ -13557,50 +13557,50 @@ var require_fetch = __commonJS({ return fetchParams.controller; } async function mainFetch(fetchParams, recursive = false) { - const request3 = fetchParams.request; + const request2 = fetchParams.request; let response = null; - if (request3.localURLsOnly && !urlIsLocal(requestCurrentURL(request3))) { + if (request2.localURLsOnly && !urlIsLocal(requestCurrentURL(request2))) { response = makeNetworkError("local URLs only"); } - tryUpgradeRequestToAPotentiallyTrustworthyURL(request3); - if (requestBadPort(request3) === "blocked") { + tryUpgradeRequestToAPotentiallyTrustworthyURL(request2); + if (requestBadPort(request2) === "blocked") { response = makeNetworkError("bad port"); } - if (request3.referrerPolicy === "") { - request3.referrerPolicy = request3.policyContainer.referrerPolicy; + if (request2.referrerPolicy === "") { + request2.referrerPolicy = request2.policyContainer.referrerPolicy; } - if (request3.referrer !== "no-referrer") { - request3.referrer = determineRequestsReferrer(request3); + if (request2.referrer !== "no-referrer") { + request2.referrer = determineRequestsReferrer(request2); } if (response === null) { response = await (async () => { - const currentURL = requestCurrentURL(request3); + const currentURL = requestCurrentURL(request2); if ( // - request’s current URL’s origin is same origin with request’s origin, // and request’s response tainting is "basic" - sameOrigin(currentURL, request3.url) && request3.responseTainting === "basic" || // request’s current URL’s scheme is "data" + sameOrigin(currentURL, request2.url) && request2.responseTainting === "basic" || // request’s current URL’s scheme is "data" currentURL.protocol === "data:" || // - request’s mode is "navigate" or "websocket" - (request3.mode === "navigate" || request3.mode === "websocket") + (request2.mode === "navigate" || request2.mode === "websocket") ) { - request3.responseTainting = "basic"; + request2.responseTainting = "basic"; return await schemeFetch(fetchParams); } - if (request3.mode === "same-origin") { + if (request2.mode === "same-origin") { return makeNetworkError('request mode cannot be "same-origin"'); } - if (request3.mode === "no-cors") { - if (request3.redirect !== "follow") { + if (request2.mode === "no-cors") { + if (request2.redirect !== "follow") { return makeNetworkError( 'redirect mode cannot be "follow" for "no-cors" request' ); } - request3.responseTainting = "opaque"; + request2.responseTainting = "opaque"; return await schemeFetch(fetchParams); } - if (!urlIsHttpHttpsScheme(requestCurrentURL(request3))) { + if (!urlIsHttpHttpsScheme(requestCurrentURL(request2))) { return makeNetworkError("URL scheme must be a HTTP(S) scheme"); } - request3.responseTainting = "cors"; + request2.responseTainting = "cors"; return await httpFetch(fetchParams); })(); } @@ -13608,40 +13608,40 @@ var require_fetch = __commonJS({ return response; } if (response.status !== 0 && !response.internalResponse) { - if (request3.responseTainting === "cors") { + if (request2.responseTainting === "cors") { } - if (request3.responseTainting === "basic") { + if (request2.responseTainting === "basic") { response = filterResponse(response, "basic"); - } else if (request3.responseTainting === "cors") { + } else if (request2.responseTainting === "cors") { response = filterResponse(response, "cors"); - } else if (request3.responseTainting === "opaque") { + } else if (request2.responseTainting === "opaque") { response = filterResponse(response, "opaque"); } else { - assert4(false); + assert3(false); } } let internalResponse = response.status === 0 ? response : response.internalResponse; if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request3.urlList); + internalResponse.urlList.push(...request2.urlList); } - if (!request3.timingAllowFailed) { + if (!request2.timingAllowFailed) { response.timingAllowPassed = true; } - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request3.headers.contains("range", true)) { + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request2.headers.contains("range", true)) { response = internalResponse = makeNetworkError(); } - if (response.status !== 0 && (request3.method === "HEAD" || request3.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + if (response.status !== 0 && (request2.method === "HEAD" || request2.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { internalResponse.body = null; fetchParams.controller.dump = true; } - if (request3.integrity) { + if (request2.integrity) { const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); - if (request3.responseTainting === "opaque" || response.body == null) { + if (request2.responseTainting === "opaque" || response.body == null) { processBodyError(response.error); return; } const processBody = (bytes) => { - if (!bytesMatch(bytes, request3.integrity)) { + if (!bytesMatch(bytes, request2.integrity)) { processBodyError("integrity mismatch"); return; } @@ -13657,8 +13657,8 @@ var require_fetch = __commonJS({ if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { return Promise.resolve(makeAppropriateNetworkError(fetchParams)); } - const { request: request3 } = fetchParams; - const { protocol: scheme } = requestCurrentURL(request3); + const { request: request2 } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request2); switch (scheme) { case "about:": { return Promise.resolve(makeNetworkError("about scheme is not supported")); @@ -13667,19 +13667,19 @@ var require_fetch = __commonJS({ if (!resolveObjectURL) { resolveObjectURL = __require("node:buffer").resolveObjectURL; } - const blobURLEntry = requestCurrentURL(request3); + const blobURLEntry = requestCurrentURL(request2); if (blobURLEntry.search.length !== 0) { return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); } const blob = resolveObjectURL(blobURLEntry.toString()); - if (request3.method !== "GET" || !isBlobLike(blob)) { + if (request2.method !== "GET" || !isBlobLike(blob)) { return Promise.resolve(makeNetworkError("invalid method")); } const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); const type = blob.type; - if (!request3.headersList.contains("range", true)) { + if (!request2.headersList.contains("range", true)) { const bodyWithType = extractBody(blob); response.statusText = "OK"; response.body = bodyWithType[0]; @@ -13687,7 +13687,7 @@ var require_fetch = __commonJS({ response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; - const rangeHeader = request3.headersList.get("range", true); + const rangeHeader = request2.headersList.get("range", true); const rangeValue = simpleRangeHeaderValue(rangeHeader, true); if (rangeValue === "failure") { return Promise.resolve(makeNetworkError("failed to fetch the data URL")); @@ -13718,7 +13718,7 @@ var require_fetch = __commonJS({ return Promise.resolve(response); } case "data:": { - const currentURL = requestCurrentURL(request3); + const currentURL = requestCurrentURL(request2); const dataURLStruct = dataURLProcessor(currentURL); if (dataURLStruct === "failure") { return Promise.resolve(makeNetworkError("failed to fetch the data URL")); @@ -13807,57 +13807,57 @@ var require_fetch = __commonJS({ } } async function httpFetch(fetchParams) { - const request3 = fetchParams.request; + const request2 = fetchParams.request; let response = null; let actualResponse = null; const timingInfo = fetchParams.timingInfo; - if (request3.serviceWorkers === "all") { + if (request2.serviceWorkers === "all") { } if (response === null) { - if (request3.redirect === "follow") { - request3.serviceWorkers = "none"; + if (request2.redirect === "follow") { + request2.serviceWorkers = "none"; } actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request3.responseTainting === "cors" && corsCheck(request3, response) === "failure") { + if (request2.responseTainting === "cors" && corsCheck(request2, response) === "failure") { return makeNetworkError("cors failure"); } - if (TAOCheck(request3, response) === "failure") { - request3.timingAllowFailed = true; + if (TAOCheck(request2, response) === "failure") { + request2.timingAllowFailed = true; } } - if ((request3.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( - request3.origin, - request3.client, - request3.destination, + if ((request2.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( + request2.origin, + request2.client, + request2.destination, actualResponse ) === "blocked") { return makeNetworkError("blocked"); } if (redirectStatusSet.has(actualResponse.status)) { - if (request3.redirect !== "manual") { + if (request2.redirect !== "manual") { fetchParams.controller.connection.destroy(void 0, false); } - if (request3.redirect === "error") { + if (request2.redirect === "error") { response = makeNetworkError("unexpected redirect"); - } else if (request3.redirect === "manual") { + } else if (request2.redirect === "manual") { response = actualResponse; - } else if (request3.redirect === "follow") { + } else if (request2.redirect === "follow") { response = await httpRedirectFetch(fetchParams, response); } else { - assert4(false); + assert3(false); } } response.timingInfo = timingInfo; return response; } function httpRedirectFetch(fetchParams, response) { - const request3 = fetchParams.request; + const request2 = fetchParams.request; const actualResponse = response.internalResponse ? response.internalResponse : response; let locationURL; try { locationURL = responseLocationURL( actualResponse, - requestCurrentURL(request3).hash + requestCurrentURL(request2).hash ); if (locationURL == null) { return response; @@ -13868,63 +13868,63 @@ var require_fetch = __commonJS({ if (!urlIsHttpHttpsScheme(locationURL)) { return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); } - if (request3.redirectCount === 20) { + if (request2.redirectCount === 20) { return Promise.resolve(makeNetworkError("redirect count exceeded")); } - request3.redirectCount += 1; - if (request3.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request3, locationURL)) { + request2.redirectCount += 1; + if (request2.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request2, locationURL)) { return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')); } - if (request3.responseTainting === "cors" && (locationURL.username || locationURL.password)) { + if (request2.responseTainting === "cors" && (locationURL.username || locationURL.password)) { return Promise.resolve(makeNetworkError( 'URL cannot contain credentials for request mode "cors"' )); } - if (actualResponse.status !== 303 && request3.body != null && request3.body.source == null) { + if (actualResponse.status !== 303 && request2.body != null && request2.body.source == null) { return Promise.resolve(makeNetworkError()); } - if ([301, 302].includes(actualResponse.status) && request3.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request3.method)) { - request3.method = "GET"; - request3.body = null; + if ([301, 302].includes(actualResponse.status) && request2.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request2.method)) { + request2.method = "GET"; + request2.body = null; for (const headerName of requestBodyHeader) { - request3.headersList.delete(headerName); + request2.headersList.delete(headerName); } } - if (!sameOrigin(requestCurrentURL(request3), locationURL)) { - request3.headersList.delete("authorization", true); - request3.headersList.delete("proxy-authorization", true); - request3.headersList.delete("cookie", true); - request3.headersList.delete("host", true); + if (!sameOrigin(requestCurrentURL(request2), locationURL)) { + request2.headersList.delete("authorization", true); + request2.headersList.delete("proxy-authorization", true); + request2.headersList.delete("cookie", true); + request2.headersList.delete("host", true); } - if (request3.body != null) { - assert4(request3.body.source != null); - request3.body = safelyExtractBody(request3.body.source)[0]; + if (request2.body != null) { + assert3(request2.body.source != null); + request2.body = safelyExtractBody(request2.body.source)[0]; } const timingInfo = fetchParams.timingInfo; timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); if (timingInfo.redirectStartTime === 0) { timingInfo.redirectStartTime = timingInfo.startTime; } - request3.urlList.push(locationURL); - setRequestReferrerPolicyOnRedirect(request3, actualResponse); + request2.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request2, actualResponse); return mainFetch(fetchParams, true); } async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { - const request3 = fetchParams.request; + const request2 = fetchParams.request; let httpFetchParams = null; let httpRequest = null; let response = null; const httpCache = null; const revalidatingFlag = false; - if (request3.window === "no-window" && request3.redirect === "error") { + if (request2.window === "no-window" && request2.redirect === "error") { httpFetchParams = fetchParams; - httpRequest = request3; + httpRequest = request2; } else { - httpRequest = cloneRequest(request3); + httpRequest = cloneRequest(request2); httpFetchParams = { ...fetchParams }; httpFetchParams.request = httpRequest; } - const includeCredentials = request3.credentials === "include" || request3.credentials === "same-origin" && request3.responseTainting === "basic"; + const includeCredentials = request2.credentials === "include" || request2.credentials === "same-origin" && request2.responseTainting === "basic"; const contentLength = httpRequest.body ? httpRequest.body.length : null; let contentLengthHeaderValue = null; if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { @@ -14001,7 +14001,7 @@ var require_fetch = __commonJS({ } response.requestIncludesCredentials = includeCredentials; if (response.status === 407) { - if (request3.window === "no-window") { + if (request2.window === "no-window") { return makeNetworkError(); } if (isCancelled(fetchParams)) { @@ -14013,7 +14013,7 @@ var require_fetch = __commonJS({ // response’s status is 421 response.status === 421 && // isNewConnectionFetch is false !isNewConnectionFetch && // request’s body is null, or request’s body is non-null and request’s body’s source is non-null - (request3.body == null || request3.body.source != null) + (request2.body == null || request2.body.source != null) ) { if (isCancelled(fetchParams)) { return makeAppropriateNetworkError(fetchParams); @@ -14030,7 +14030,7 @@ var require_fetch = __commonJS({ return response; } async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { - assert4(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + assert3(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); fetchParams.controller.connection = { abort: null, destroyed: false, @@ -14043,21 +14043,21 @@ var require_fetch = __commonJS({ } } }; - const request3 = fetchParams.request; + const request2 = fetchParams.request; let response = null; const timingInfo = fetchParams.timingInfo; const httpCache = null; if (httpCache == null) { - request3.cache = "no-store"; + request2.cache = "no-store"; } const newConnection = forceNewConnection ? "yes" : "no"; - if (request3.mode === "websocket") { + if (request2.mode === "websocket") { } else { } let requestBody = null; - if (request3.body == null && fetchParams.processRequestEndOfBody) { + if (request2.body == null && fetchParams.processRequestEndOfBody) { queueMicrotask(() => fetchParams.processRequestEndOfBody()); - } else if (request3.body != null) { + } else if (request2.body != null) { const processBodyChunk = async function* (bytes) { if (isCancelled(fetchParams)) { return; @@ -14085,7 +14085,7 @@ var require_fetch = __commonJS({ }; requestBody = (async function* () { try { - for await (const bytes of request3.body.stream) { + for await (const bytes of request2.body.stream) { yield* processBodyChunk(bytes); } processEndOfBody(); @@ -14195,17 +14195,17 @@ var require_fetch = __commonJS({ } return response; function dispatch({ body }) { - const url5 = requestCurrentURL(request3); + const url4 = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; return new Promise((resolve, reject) => agent.dispatch( { - path: url5.pathname + url5.search, - origin: url5.origin, - method: request3.method, - body: agent.isMockActive ? request3.body && (request3.body.source || request3.body.stream) : body, - headers: request3.headersList.entries, + path: url4.pathname + url4.search, + origin: url4.origin, + method: request2.method, + body: agent.isMockActive ? request2.body && (request2.body.source || request2.body.stream) : body, + headers: request2.headersList.entries, maxRedirections: 0, - upgrade: request3.mode === "websocket" ? "websocket" : void 0 + upgrade: request2.mode === "websocket" ? "websocket" : void 0 }, { body: null, @@ -14236,8 +14236,8 @@ var require_fetch = __commonJS({ location = headersList.get("location", true); this.body = new Readable2({ read: resume }); const decoders = []; - const willFollow = location && request3.redirect === "follow" && redirectStatusSet.has(status); - if (request3.method !== "HEAD" && request3.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + const willFollow = location && request2.redirect === "follow" && redirectStatusSet.has(status); + if (request2.method !== "HEAD" && request2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { const contentEncoding = headersList.get("content-encoding", true); const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; const maxContentEncodings = 5; @@ -14303,13 +14303,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error100) { + onError(error99) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error100); - fetchParams.controller.terminate(error100); - reject(error100); + this.body?.destroy(error99); + fetchParams.controller.terminate(error99); + reject(error99); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -14772,8 +14772,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error100) { - fr[kError] = error100; + } catch (error99) { + fr[kError] = error99; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14782,13 +14782,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error100) { + } catch (error99) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error100; + fr[kError] = error99; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -14836,7 +14836,7 @@ var require_util4 = __commonJS({ if (encoding === "failure") { encoding = "UTF-8"; } - return decode6(bytes, encoding); + return decode5(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -14853,7 +14853,7 @@ var require_util4 = __commonJS({ } } } - function decode6(ioQueue, encoding) { + function decode5(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -15167,7 +15167,7 @@ var require_symbols4 = __commonJS({ var require_util5 = __commonJS({ "node_modules/undici/lib/web/cache/util.js"(exports, module) { "use strict"; - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { URLSerializer } = require_data_url(); var { isValidHeaderName: isValidHeaderName2 } = require_util2(); function urlEquals(A, B, excludeFragment = false) { @@ -15176,7 +15176,7 @@ var require_util5 = __commonJS({ return serializedA === serializedB; } function getFieldValues(header) { - assert4(header !== null); + assert3(header !== null); const values = []; for (let value of header.split(",")) { value = value.trim(); @@ -15206,7 +15206,7 @@ var require_cache = __commonJS({ var { kState } = require_symbols2(); var { fetching } = require_fetch(); var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util2(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var Cache = class _Cache { /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list @@ -15220,31 +15220,31 @@ var require_cache = __commonJS({ webidl.util.markAsUncloneable(this); this.#relevantRequestResponseList = arguments[1]; } - async match(request3, options = {}) { + async match(request2, options = {}) { webidl.brandCheck(this, _Cache); const prefix = "Cache.match"; webidl.argumentLengthCheck(arguments, 1, prefix); - request3 = webidl.converters.RequestInfo(request3, prefix, "request"); + request2 = webidl.converters.RequestInfo(request2, prefix, "request"); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); - const p = this.#internalMatchAll(request3, options, 1); + const p = this.#internalMatchAll(request2, options, 1); if (p.length === 0) { return; } return p[0]; } - async matchAll(request3 = void 0, options = {}) { + async matchAll(request2 = void 0, options = {}) { webidl.brandCheck(this, _Cache); const prefix = "Cache.matchAll"; - if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3, prefix, "request"); + if (request2 !== void 0) request2 = webidl.converters.RequestInfo(request2, prefix, "request"); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); - return this.#internalMatchAll(request3, options); + return this.#internalMatchAll(request2, options); } - async add(request3) { + async add(request2) { webidl.brandCheck(this, _Cache); const prefix = "Cache.add"; webidl.argumentLengthCheck(arguments, 1, prefix); - request3 = webidl.converters.RequestInfo(request3, prefix, "request"); - const requests = [request3]; + request2 = webidl.converters.RequestInfo(request2, prefix, "request"); + const requests = [request2]; const responseArrayPromise = this.addAll(requests); return await responseArrayPromise; } @@ -15254,19 +15254,19 @@ var require_cache = __commonJS({ webidl.argumentLengthCheck(arguments, 1, prefix); const responsePromises = []; const requestList = []; - for (let request3 of requests) { - if (request3 === void 0) { + for (let request2 of requests) { + if (request2 === void 0) { throw webidl.errors.conversionFailed({ prefix, argument: "Argument 1", types: ["undefined is not allowed"] }); } - request3 = webidl.converters.RequestInfo(request3); - if (typeof request3 === "string") { + request2 = webidl.converters.RequestInfo(request2); + if (typeof request2 === "string") { continue; } - const r = request3[kState]; + const r = request2[kState]; if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { throw webidl.errors.exception({ header: prefix, @@ -15275,8 +15275,8 @@ var require_cache = __commonJS({ } } const fetchControllers = []; - for (const request3 of requests) { - const r = new Request(request3)[kState]; + for (const request2 of requests) { + const r = new Request(request2)[kState]; if (!urlIsHttpHttpsScheme(r.url)) { throw webidl.errors.exception({ header: prefix, @@ -15353,17 +15353,17 @@ var require_cache = __commonJS({ }); return cacheJobPromise.promise; } - async put(request3, response) { + async put(request2, response) { webidl.brandCheck(this, _Cache); const prefix = "Cache.put"; webidl.argumentLengthCheck(arguments, 2, prefix); - request3 = webidl.converters.RequestInfo(request3, prefix, "request"); + request2 = webidl.converters.RequestInfo(request2, prefix, "request"); response = webidl.converters.Response(response, prefix, "response"); let innerRequest = null; - if (request3 instanceof Request) { - innerRequest = request3[kState]; + if (request2 instanceof Request) { + innerRequest = request2[kState]; } else { - innerRequest = new Request(request3)[kState]; + innerRequest = new Request(request2)[kState]; } if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { throw webidl.errors.exception({ @@ -15434,21 +15434,21 @@ var require_cache = __commonJS({ }); return cacheJobPromise.promise; } - async delete(request3, options = {}) { + async delete(request2, options = {}) { webidl.brandCheck(this, _Cache); const prefix = "Cache.delete"; webidl.argumentLengthCheck(arguments, 1, prefix); - request3 = webidl.converters.RequestInfo(request3, prefix, "request"); + request2 = webidl.converters.RequestInfo(request2, prefix, "request"); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r = null; - if (request3 instanceof Request) { - r = request3[kState]; + if (request2 instanceof Request) { + r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return false; } } else { - assert4(typeof request3 === "string"); - r = new Request(request3)[kState]; + assert3(typeof request2 === "string"); + r = new Request(request2)[kState]; } const operations = []; const operation = { @@ -15480,25 +15480,25 @@ var require_cache = __commonJS({ * @param {import('../../types/cache').CacheQueryOptions} options * @returns {Promise} */ - async keys(request3 = void 0, options = {}) { + async keys(request2 = void 0, options = {}) { webidl.brandCheck(this, _Cache); const prefix = "Cache.keys"; - if (request3 !== void 0) request3 = webidl.converters.RequestInfo(request3, prefix, "request"); + if (request2 !== void 0) request2 = webidl.converters.RequestInfo(request2, prefix, "request"); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r = null; - if (request3 !== void 0) { - if (request3 instanceof Request) { - r = request3[kState]; + if (request2 !== void 0) { + if (request2 instanceof Request) { + r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } - } else if (typeof request3 === "string") { - r = new Request(request3)[kState]; + } else if (typeof request2 === "string") { + r = new Request(request2)[kState]; } } - const promise4 = createDeferredPromise(); + const promise3 = createDeferredPromise(); const requests = []; - if (request3 === void 0) { + if (request2 === void 0) { for (const requestResponse of this.#relevantRequestResponseList) { requests.push(requestResponse[0]); } @@ -15510,17 +15510,17 @@ var require_cache = __commonJS({ } queueMicrotask(() => { const requestList = []; - for (const request4 of requests) { + for (const request3 of requests) { const requestObject = fromInnerRequest( - request4, + request3, new AbortController().signal, "immutable" ); requestList.push(requestObject); } - promise4.resolve(Object.freeze(requestList)); + promise3.resolve(Object.freeze(requestList)); }); - return promise4.promise; + return promise3.promise; } /** * @see https://w3c.github.io/ServiceWorker/#batch-cache-operations-algorithm @@ -15557,7 +15557,7 @@ var require_cache = __commonJS({ } for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert4(idx !== -1); + assert3(idx !== -1); cache.splice(idx, 1); } } else if (operation.type === "put") { @@ -15589,7 +15589,7 @@ var require_cache = __commonJS({ requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); - assert4(idx !== -1); + assert3(idx !== -1); cache.splice(idx, 1); } cache.push([operation.request, operation.response]); @@ -15630,9 +15630,9 @@ var require_cache = __commonJS({ * @param {import('../../types/cache').CacheQueryOptions | undefined} options * @returns {boolean} */ - #requestMatchesCachedItem(requestQuery, request3, response = null, options) { + #requestMatchesCachedItem(requestQuery, request2, response = null, options) { const queryURL = new URL(requestQuery.url); - const cachedURL = new URL(request3.url); + const cachedURL = new URL(request2.url); if (options?.ignoreSearch) { cachedURL.search = ""; queryURL.search = ""; @@ -15648,7 +15648,7 @@ var require_cache = __commonJS({ if (fieldValue === "*") { return false; } - const requestValue = request3.headersList.get(fieldValue); + const requestValue = request2.headersList.get(fieldValue); const queryValue = requestQuery.headersList.get(fieldValue); if (requestValue !== queryValue) { return false; @@ -15656,20 +15656,20 @@ var require_cache = __commonJS({ } return true; } - #internalMatchAll(request3, options, maxResponses = Infinity) { + #internalMatchAll(request2, options, maxResponses = Infinity) { let r = null; - if (request3 !== void 0) { - if (request3 instanceof Request) { - r = request3[kState]; + if (request2 !== void 0) { + if (request2 instanceof Request) { + r = request2[kState]; if (r.method !== "GET" && !options.ignoreMethod) { return []; } - } else if (typeof request3 === "string") { - r = new Request(request3)[kState]; + } else if (typeof request2 === "string") { + r = new Request(request2)[kState]; } } const responses = []; - if (request3 === void 0) { + if (request2 === void 0) { for (const requestResponse of this.#relevantRequestResponseList) { responses.push(requestResponse[1]); } @@ -15758,21 +15758,21 @@ var require_cachestorage = __commonJS({ } webidl.util.markAsUncloneable(this); } - async match(request3, options = {}) { + async match(request2, options = {}) { webidl.brandCheck(this, _CacheStorage); webidl.argumentLengthCheck(arguments, 1, "CacheStorage.match"); - request3 = webidl.converters.RequestInfo(request3); + request2 = webidl.converters.RequestInfo(request2); options = webidl.converters.MultiCacheQueryOptions(options); if (options.cacheName != null) { if (this.#caches.has(options.cacheName)) { const cacheList = this.#caches.get(options.cacheName); const cache = new Cache(kConstruct, cacheList); - return await cache.match(request3, options); + return await cache.match(request2, options); } } else { for (const cacheList of this.#caches.values()) { const cache = new Cache(kConstruct, cacheList); - const response = await cache.match(request3, options); + const response = await cache.match(request2, options); if (response !== void 0) { return response; } @@ -15932,8 +15932,8 @@ var require_util6 = __commonJS({ } } } - function validateCookieDomain(domain4) { - if (domain4.startsWith("-") || domain4.endsWith(".") || domain4.endsWith("-")) { + function validateCookieDomain(domain3) { + if (domain3.startsWith("-") || domain3.endsWith(".") || domain3.endsWith("-")) { throw new Error("Invalid cookie domain"); } } @@ -15961,11 +15961,11 @@ var require_util6 = __commonJS({ "Dec" ]; var IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); - function toIMFDate(date10) { - if (typeof date10 === "number") { - date10 = new Date(date10); + function toIMFDate(date9) { + if (typeof date9 === "number") { + date9 = new Date(date9); } - return `${IMFDays[date10.getUTCDay()]}, ${IMFPaddedNumbers[date10.getUTCDate()]} ${IMFMonths[date10.getUTCMonth()]} ${date10.getUTCFullYear()} ${IMFPaddedNumbers[date10.getUTCHours()]}:${IMFPaddedNumbers[date10.getUTCMinutes()]}:${IMFPaddedNumbers[date10.getUTCSeconds()]} GMT`; + return `${IMFDays[date9.getUTCDay()]}, ${IMFPaddedNumbers[date9.getUTCDate()]} ${IMFMonths[date9.getUTCMonth()]} ${date9.getUTCFullYear()} ${IMFPaddedNumbers[date9.getUTCHours()]}:${IMFPaddedNumbers[date9.getUTCMinutes()]}:${IMFPaddedNumbers[date9.getUTCSeconds()]} GMT`; } function validateCookieMaxAge(maxAge) { if (maxAge < 0) { @@ -16038,7 +16038,7 @@ var require_parse = __commonJS({ var { maxNameValuePairSize, maxAttributeValueSize } = require_constants4(); var { isCTLExcludingHtab } = require_util6(); var { collectASequenceOfCodePointsFast } = require_data_url(); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); function parseSetCookie(header) { if (isCTLExcludingHtab(header)) { return null; @@ -16080,7 +16080,7 @@ var require_parse = __commonJS({ if (unparsedAttributes.length === 0) { return cookieAttributeList; } - assert4(unparsedAttributes[0] === ";"); + assert3(unparsedAttributes[0] === ";"); unparsedAttributes = unparsedAttributes.slice(1); let cookieAv = ""; if (unparsedAttributes.includes(";")) { @@ -16827,7 +16827,7 @@ var require_frame = __commonJS({ } catch { crypto3 = { // not full compatibility, but minimum. - randomFillSync: function randomFillSync(buffer2, _offset, _size4) { + randomFillSync: function randomFillSync(buffer2, _offset, _size3) { for (let i = 0; i < buffer2.length; ++i) { buffer2[i] = Math.random() * 255 | 0; } @@ -16915,10 +16915,10 @@ var require_connection = __commonJS({ crypto3 = __require("node:crypto"); } catch { } - function establishWebSocketConnection(url5, protocols, client, ws, onEstablish, options) { - const requestURL = url5; - requestURL.protocol = url5.protocol === "ws:" ? "http:" : "https:"; - const request3 = makeRequest({ + function establishWebSocketConnection(url4, protocols, client, ws, onEstablish, options) { + const requestURL = url4; + requestURL.protocol = url4.protocol === "ws:" ? "http:" : "https:"; + const request2 = makeRequest({ urlList: [requestURL], client, serviceWorkers: "none", @@ -16930,18 +16930,18 @@ var require_connection = __commonJS({ }); if (options.headers) { const headersList = getHeadersList(new Headers2(options.headers)); - request3.headersList = headersList; + request2.headersList = headersList; } const keyValue = crypto3.randomBytes(16).toString("base64"); - request3.headersList.append("sec-websocket-key", keyValue); - request3.headersList.append("sec-websocket-version", "13"); + request2.headersList.append("sec-websocket-key", keyValue); + request2.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { - request3.headersList.append("sec-websocket-protocol", protocol); + request2.headersList.append("sec-websocket-protocol", protocol); } const permessageDeflate = "permessage-deflate; client_max_window_bits"; - request3.headersList.append("sec-websocket-extensions", permessageDeflate); + request2.headersList.append("sec-websocket-extensions", permessageDeflate); const controller = fetching({ - request: request3, + request: request2, useParallelQueue: true, dispatcher: options.dispatcher, processResponse(response) { @@ -16978,7 +16978,7 @@ var require_connection = __commonJS({ } const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); if (secProtocol !== null) { - const requestProtocols = getDecodeSplit("sec-websocket-protocol", request3.headersList); + const requestProtocols = getDecodeSplit("sec-websocket-protocol", request2.headersList); if (!requestProtocols.includes(secProtocol)) { failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); return; @@ -17060,11 +17060,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error100) { + function onSocketError(error99) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error100); + channels.socketError.publish(error99); } this.destroy(); } @@ -17161,7 +17161,7 @@ var require_receiver = __commonJS({ "node_modules/undici/lib/web/websocket/receiver.js"(exports, module) { "use strict"; var { Writable } = __require("node:stream"); - var assert4 = __require("node:assert"); + var assert3 = __require("node:assert"); var { parserStates, opcodes, states, emptyBuffer, sentCloseFrameState } = require_constants5(); var { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols5(); var { channels } = require_diagnostics(); @@ -17346,9 +17346,9 @@ var require_receiver = __commonJS({ this.#extensions.get("permessage-deflate").decompress( body, this.#info.fin, - (error100, data) => { - if (error100) { - failWebsocketConnection(this.ws, error100.message); + (error99, data) => { + if (error99) { + failWebsocketConnection(this.ws, error99.message); return; } this.writeFragments(data); @@ -17426,7 +17426,7 @@ var require_receiver = __commonJS({ return output; } parseCloseBody(data) { - assert4(data.length !== 1); + assert3(data.length !== 1); let code; if (data.length >= 2) { code = data.readUInt16BE(0); @@ -17640,18 +17640,18 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url5, protocols = []) { + constructor(url4, protocols = []) { super(); webidl.util.markAsUncloneable(this); const prefix = "WebSocket constructor"; webidl.argumentLengthCheck(arguments, 1, prefix); const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols, prefix, "options"); - url5 = webidl.converters.USVString(url5, prefix, "url"); + url4 = webidl.converters.USVString(url4, prefix, "url"); protocols = options.protocols; const baseURL = environmentSettingsObject.settingsObject.baseUrl; let urlRecord; try { - urlRecord = new URL(url5, baseURL); + urlRecord = new URL(url4, baseURL); } catch (e) { throw new DOMException(e, "SyntaxError"); } @@ -18281,7 +18281,7 @@ var require_eventsource = __commonJS({ * @param {EventSourceInit} [eventSourceInitDict] * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface */ - constructor(url5, eventSourceInitDict = {}) { + constructor(url4, eventSourceInitDict = {}) { super(); webidl.util.markAsUncloneable(this); const prefix = "EventSource constructor"; @@ -18292,7 +18292,7 @@ var require_eventsource = __commonJS({ code: "UNDICI-ES" }); } - url5 = webidl.converters.USVString(url5, prefix, "url"); + url4 = webidl.converters.USVString(url4, prefix, "url"); eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, "eventSourceInitDict"); this.#dispatcher = eventSourceInitDict.dispatcher; this.#state = { @@ -18302,7 +18302,7 @@ var require_eventsource = __commonJS({ const settings = environmentSettingsObject; let urlRecord; try { - urlRecord = new URL(url5, settings.settingsObject.baseUrl); + urlRecord = new URL(url4, settings.settingsObject.baseUrl); this.#state.origin = urlRecord.origin; } catch (e) { throw new DOMException(e, "SyntaxError"); @@ -18402,8 +18402,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error100) => { - if (error100?.aborted === false) { + (error99) => { + if (error99?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -18586,12 +18586,12 @@ var require_undici = __commonJS({ headerNameToString: util3.headerNameToString }; function makeDispatcher(fn) { - return (url5, opts, handler2) => { + return (url4, opts, handler2) => { if (typeof opts === "function") { handler2 = opts; opts = null; } - if (!url5 || typeof url5 !== "string" && typeof url5 !== "object" && !(url5 instanceof URL)) { + if (!url4 || typeof url4 !== "string" && typeof url4 !== "object" && !(url4 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -18605,12 +18605,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path = `/${path}`; } - url5 = new URL(util3.parseOrigin(url5).origin + path); + url4 = new URL(util3.parseOrigin(url4).origin + path); } else { if (!opts) { - opts = typeof url5 === "object" ? url5 : {}; + opts = typeof url4 === "object" ? url4 : {}; } - url5 = util3.parseURL(url5); + url4 = util3.parseURL(url4); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -18618,8 +18618,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url5.origin, - path: url5.search ? `${url5.pathname}${url5.search}` : url5.pathname, + origin: url4.origin, + path: url4.search ? `${url4.pathname}${url4.search}` : url4.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler2); }; @@ -27620,17 +27620,17 @@ var require_iterate = __commonJS({ module.exports = iterate; function iterate(list, iterator3, state, callback) { var key = state["keyedList"] ? state["keyedList"][state.index] : state.index; - state.jobs[key] = runJob(iterator3, key, list[key], function(error100, output) { + state.jobs[key] = runJob(iterator3, key, list[key], function(error99, output) { if (!(key in state.jobs)) { return; } delete state.jobs[key]; - if (error100) { + if (error99) { abort(state); } else { state.results[key] = output; } - callback(error100, state.results); + callback(error99, state.results); }); } function runJob(iterator3, key, item, callback) { @@ -27694,9 +27694,9 @@ var require_parallel = __commonJS({ function parallel(list, iterator3, callback) { var state = initState(list); while (state.index < (state["keyedList"] || list).length) { - iterate(list, iterator3, state, function(error100, result) { - if (error100) { - callback(error100, result); + iterate(list, iterator3, state, function(error99, result) { + if (error99) { + callback(error99, result); return; } if (Object.keys(state.jobs).length === 0) { @@ -27722,9 +27722,9 @@ var require_serialOrdered = __commonJS({ module.exports.descending = descending; function serialOrdered(list, iterator3, sortMethod, callback) { var state = initState(list, sortMethod); - iterate(list, iterator3, state, function iteratorHandler(error100, result) { - if (error100) { - callback(error100, result); + iterate(list, iterator3, state, function iteratorHandler(error99, result) { + if (error99) { + callback(error99, result); return; } state.index++; @@ -27894,11 +27894,11 @@ var require_sign = __commonJS({ "node_modules/math-intrinsics/sign.js"(exports, module) { "use strict"; var $isNaN = require_isNaN(); - module.exports = function sign(number8) { - if ($isNaN(number8) || number8 === 0) { - return number8; + module.exports = function sign(number7) { + if ($isNaN(number7) || number7 === 0) { + return number7; } - return number8 < 0 ? -1 : 1; + return number7 < 0 ? -1 : 1; }; } }); @@ -28232,12 +28232,12 @@ var require_get_proto = __commonJS({ var require_async_function = __commonJS({ "node_modules/async-function/index.js"(exports, module) { "use strict"; - var cached4 = ( + var cached3 = ( /** @type {import('.').AsyncFunctionConstructor} */ async function() { }.constructor ); - module.exports = () => cached4; + module.exports = () => cached3; } }); @@ -28245,12 +28245,12 @@ var require_async_function = __commonJS({ var require_generator_function = __commonJS({ "node_modules/generator-function/index.js"(exports, module) { "use strict"; - var cached4 = ( + var cached3 = ( /** @type {GeneratorFunctionConstructor} */ function* () { }.constructor ); - module.exports = () => cached4; + module.exports = () => cached3; } }); @@ -28258,12 +28258,12 @@ var require_generator_function = __commonJS({ var require_async_generator_function = __commonJS({ "node_modules/async-generator-function/index.js"(exports, module) { "use strict"; - var cached4 = ( + var cached3 = ( /** @type {import('.').AsyncGeneratorFunctionConstructor} */ async function* () { }.constructor ); - module.exports = () => cached4; + module.exports = () => cached3; } }); @@ -28504,17 +28504,17 @@ var require_get_intrinsic = __commonJS({ var $exec = bind3.call($call, RegExp.prototype.exec); var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; - var stringToPath = function stringToPath2(string8) { - var first = $strSlice(string8, 0, 1); - var last = $strSlice(string8, -1); + var stringToPath = function stringToPath2(string7) { + var first = $strSlice(string7, 0, 1); + var last = $strSlice(string7, -1); if (first === "%" && last !== "%") { throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); } else if (last === "%" && first !== "%") { throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); } var result = []; - $replace(string8, rePropName, function(match2, number8, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number8 || match2; + $replace(string7, rePropName, function(match2, number7, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number7 || match2; }); return result; }; @@ -28626,22 +28626,22 @@ var require_es_set_tostringtag = __commonJS({ var hasOwn = require_hasown(); var $TypeError = require_type(); var toStringTag2 = hasToStringTag ? Symbol.toStringTag : null; - module.exports = function setToStringTag(object4, value) { + module.exports = function setToStringTag(object3, value) { var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") { throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans"); } - if (toStringTag2 && (overrideIfSet || !hasOwn(object4, toStringTag2))) { + if (toStringTag2 && (overrideIfSet || !hasOwn(object3, toStringTag2))) { if ($defineProperty) { - $defineProperty(object4, toStringTag2, { + $defineProperty(object3, toStringTag2, { configurable: !nonConfigurable, enumerable: false, value, writable: false }); } else { - object4[toStringTag2] = value; + object3[toStringTag2] = value; } } }; @@ -28670,7 +28670,7 @@ var require_form_data = __commonJS({ var path = __require("path"); var http3 = __require("http"); var https2 = __require("https"); - var parseUrl3 = __require("url").parse; + var parseUrl2 = __require("url").parse; var fs3 = __require("fs"); var Stream = __require("stream").Stream; var crypto3 = __require("crypto"); @@ -28919,11 +28919,11 @@ var require_form_data = __commonJS({ }); }; FormData3.prototype.submit = function(params, cb) { - var request3; + var request2; var options; var defaults3 = { method: "post" }; if (typeof params === "string") { - params = parseUrl3(params); + params = parseUrl2(params); options = populate({ port: params.port, path: params.pathname, @@ -28938,9 +28938,9 @@ var require_form_data = __commonJS({ } options.headers = this.getHeaders(params.headers); if (options.protocol === "https:") { - request3 = https2.request(options); + request2 = https2.request(options); } else { - request3 = http3.request(options); + request2 = http3.request(options); } this.getLength(function(err, length) { if (err && err !== "Unknown stream") { @@ -28948,22 +28948,22 @@ var require_form_data = __commonJS({ return; } if (length) { - request3.setHeader("Content-Length", length); + request2.setHeader("Content-Length", length); } - this.pipe(request3); + this.pipe(request2); if (cb) { var onResponse; - var callback = function(error100, responce) { - request3.removeListener("error", callback); - request3.removeListener("response", onResponse); - return cb.call(this, error100, responce); + var callback = function(error99, responce) { + request2.removeListener("error", callback); + request2.removeListener("response", onResponse); + return cb.call(this, error99, responce); }; onResponse = callback.bind(this, null); - request3.on("error", callback); - request3.on("response", onResponse); + request2.on("error", callback); + request2.on("response", onResponse); } }.bind(this)); - return request3; + return request2; }; FormData3.prototype._error = function(err) { if (!this.error) { @@ -28984,7 +28984,7 @@ var require_form_data = __commonJS({ var require_proxy_from_env = __commonJS({ "node_modules/proxy-from-env/index.js"(exports) { "use strict"; - var parseUrl3 = __require("url").parse; + var parseUrl2 = __require("url").parse; var DEFAULT_PORTS = { ftp: 21, gopher: 70, @@ -28996,18 +28996,18 @@ var require_proxy_from_env = __commonJS({ var stringEndsWith = String.prototype.endsWith || function(s) { return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1; }; - function getProxyForUrl(url5) { - var parsedUrl = typeof url5 === "string" ? parseUrl3(url5) : url5 || {}; + function getProxyForUrl(url4) { + var parsedUrl = typeof url4 === "string" ? parseUrl2(url4) : url4 || {}; var proto = parsedUrl.protocol; - var hostname6 = parsedUrl.host; + var hostname5 = parsedUrl.host; var port = parsedUrl.port; - if (typeof hostname6 !== "string" || !hostname6 || typeof proto !== "string") { + if (typeof hostname5 !== "string" || !hostname5 || typeof proto !== "string") { return ""; } proto = proto.split(":", 1)[0]; - hostname6 = hostname6.replace(/:\d*$/, ""); + hostname5 = hostname5.replace(/:\d*$/, ""); port = parseInt(port) || DEFAULT_PORTS[proto] || 0; - if (!shouldProxy(hostname6, port)) { + if (!shouldProxy(hostname5, port)) { return ""; } var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy"); @@ -29016,7 +29016,7 @@ var require_proxy_from_env = __commonJS({ } return proxy; } - function shouldProxy(hostname6, port) { + function shouldProxy(hostname5, port) { var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase(); if (!NO_PROXY) { return true; @@ -29035,12 +29035,12 @@ var require_proxy_from_env = __commonJS({ return true; } if (!/^[.*]/.test(parsedProxyHostname)) { - return hostname6 !== parsedProxyHostname; + return hostname5 !== parsedProxyHostname; } if (parsedProxyHostname.charAt(0) === "*") { parsedProxyHostname = parsedProxyHostname.slice(1); } - return !stringEndsWith.call(hostname6, parsedProxyHostname); + return !stringEndsWith.call(hostname5, parsedProxyHostname); }); } function getEnv(key) { @@ -29058,7 +29058,7 @@ var require_debug = __commonJS({ if (!debug2) { try { debug2 = __require("debug")("follow-redirects"); - } catch (error100) { + } catch (error99) { } if (typeof debug2 !== "function") { debug2 = function() { @@ -29073,12 +29073,12 @@ var require_debug = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports, module) { - var url5 = __require("url"); - var URL3 = url5.URL; + var url4 = __require("url"); + var URL3 = url4.URL; var http3 = __require("http"); var https2 = __require("https"); var Writable = __require("stream").Writable; - var assert4 = __require("assert"); + var assert3 = __require("assert"); var debug2 = require_debug(); (function detectUnsupportedEnvironment() { var looksLikeNode = typeof process !== "undefined"; @@ -29090,9 +29090,9 @@ var require_follow_redirects = __commonJS({ })(); var useNativeURL = false; try { - assert4(new URL3("")); - } catch (error100) { - useNativeURL = error100.code === "ERR_INVALID_URL"; + assert3(new URL3("")); + } catch (error99) { + useNativeURL = error99.code === "ERR_INVALID_URL"; } var sensitiveHeaders = [ "Authorization", @@ -29141,7 +29141,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop6; + var destroy = Writable.prototype.destroy || noop5; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -29163,7 +29163,7 @@ var require_follow_redirects = __commonJS({ self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause })); } }; - this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex4).join("|") + ")$", "i"); + this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex3).join("|") + ")$", "i"); this._performRequest(); } RedirectableRequest.prototype = Object.create(Writable.prototype); @@ -29172,9 +29172,9 @@ var require_follow_redirects = __commonJS({ this._currentRequest.abort(); this.emit("abort"); }; - RedirectableRequest.prototype.destroy = function(error100) { - destroyRequest(this._currentRequest, error100); - destroy.call(this, error100); + RedirectableRequest.prototype.destroy = function(error99) { + destroyRequest(this._currentRequest, error99); + destroy.call(this, error99); return this; }; RedirectableRequest.prototype.write = function(data, encoding, callback) { @@ -29330,12 +29330,12 @@ var require_follow_redirects = __commonJS({ var scheme = protocol.slice(0, -1); this._options.agent = this._options.agents[scheme]; } - var request3 = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse); - request3._redirectable = this; + var request2 = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse); + request2._redirectable = this; for (var event of events) { - request3.on(event, eventHandlers[event]); + request2.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url5.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url4.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -29344,17 +29344,17 @@ var require_follow_redirects = __commonJS({ var i = 0; var self2 = this; var buffers = this._requestBodyBuffers; - (function writeNext(error100) { - if (request3 === self2._currentRequest) { - if (error100) { - self2.emit("error", error100); + (function writeNext(error99) { + if (request2 === self2._currentRequest) { + if (error99) { + self2.emit("error", error99); } else if (i < buffers.length) { var buffer = buffers[i++]; - if (!request3.finished) { - request3.write(buffer.data, buffer.encoding, writeNext); + if (!request2.finished) { + request2.write(buffer.data, buffer.encoding, writeNext); } } else if (self2._ended) { - request3.end(); + request2.end(); } } })(); @@ -29401,9 +29401,9 @@ var require_follow_redirects = __commonJS({ removeMatchingHeaders(/^content-/i, this._options.headers); } var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); - var currentUrlParts = parseUrl3(this._currentUrl); + var currentUrlParts = parseUrl2(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url5.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url4.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug2("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -29436,11 +29436,11 @@ var require_follow_redirects = __commonJS({ var protocol = scheme + ":"; var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; var wrappedProtocol = exports2[scheme] = Object.create(nativeProtocol); - function request3(input, options, callback) { + function request2(input, options, callback) { if (isURL(input)) { input = spreadUrlObject(input); } else if (isString2(input)) { - input = spreadUrlObject(parseUrl3(input)); + input = spreadUrlObject(parseUrl2(input)); } else { callback = options; options = validateUrl(input); @@ -29458,7 +29458,7 @@ var require_follow_redirects = __commonJS({ if (!isString2(options.host) && !isString2(options.hostname)) { options.hostname = "::1"; } - assert4.equal(options.protocol, protocol, "protocol mismatch"); + assert3.equal(options.protocol, protocol, "protocol mismatch"); debug2("options", options); return new RedirectableRequest(options, callback); } @@ -29468,20 +29468,20 @@ var require_follow_redirects = __commonJS({ return wrappedRequest; } Object.defineProperties(wrappedProtocol, { - request: { value: request3, configurable: true, enumerable: true, writable: true }, + request: { value: request2, configurable: true, enumerable: true, writable: true }, get: { value: get, configurable: true, enumerable: true, writable: true } }); }); return exports2; } - function noop6() { + function noop5() { } - function parseUrl3(input) { + function parseUrl2(input) { var parsed; if (useNativeURL) { parsed = new URL3(input); } else { - parsed = validateUrl(url5.parse(input)); + parsed = validateUrl(url4.parse(input)); if (!isString2(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -29489,7 +29489,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative, base) { - return useNativeURL ? new URL3(relative, base) : parseUrl3(url5.resolve(base, relative)); + return useNativeURL ? new URL3(relative, base) : parseUrl2(url4.resolve(base, relative)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -29546,17 +29546,17 @@ var require_follow_redirects = __commonJS({ }); return CustomError; } - function destroyRequest(request3, error100) { + function destroyRequest(request2, error99) { for (var event of events) { - request3.removeListener(event, eventHandlers[event]); + request2.removeListener(event, eventHandlers[event]); } - request3.on("error", noop6); - request3.destroy(error100); + request2.on("error", noop5); + request2.destroy(error99); } - function isSubdomain(subdomain, domain4) { - assert4(isString2(subdomain) && isString2(domain4)); - var dot = subdomain.length - domain4.length - 1; - return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain4); + function isSubdomain(subdomain, domain3) { + assert3(isString2(subdomain) && isString2(domain3)); + var dot = subdomain.length - domain3.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain3); } function isArray2(value) { return value instanceof Array; @@ -29573,7 +29573,7 @@ var require_follow_redirects = __commonJS({ function isURL(value) { return URL3 && value instanceof URL3; } - function escapeRegex4(regex2) { + function escapeRegex3(regex2) { return regex2.replace(/[\]\\/()*+?.$]/g, "\\$&"); } module.exports = wrap({ http: http3, https: https2 }); @@ -29603,7 +29603,7 @@ var require_proxy = __commonJS({ if (proxyVar) { try { return new DecodedURL(proxyVar); - } catch (_a5) { + } catch (_a4) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) return new DecodedURL(`http://${proxyVar}`); } @@ -29647,8 +29647,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url5, base) { - super(url5, base); + constructor(url4, base) { + super(url4, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -29843,7 +29843,7 @@ var require_lib = __commonJS({ return parsedUrl.protocol === "https:"; } var HttpClient3 = class { - constructor(userAgent3, handlers, requestOptions) { + constructor(userAgent2, handlers, requestOptions) { this._ignoreSslError = false; this._allowRedirects = true; this._allowRedirectDowngrade = false; @@ -29852,7 +29852,7 @@ var require_lib = __commonJS({ this._maxRetries = 1; this._keepAlive = false; this._disposed = false; - this.userAgent = this._getUserAgentWithOrchestrationId(userAgent3); + this.userAgent = this._getUserAgentWithOrchestrationId(userAgent2); this.handlers = handlers || []; this.requestOptions = requestOptions; if (requestOptions) { @@ -30145,9 +30145,9 @@ var require_lib = __commonJS({ } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys3(this.requestOptions.headers), lowercaseKeys3(headers || {})); + return Object.assign({}, lowercaseKeys2(this.requestOptions.headers), lowercaseKeys2(headers || {})); } - return lowercaseKeys3(headers || {}); + return lowercaseKeys2(headers || {}); } /** * Gets an existing header value or returns a default. @@ -30156,10 +30156,10 @@ var require_lib = __commonJS({ * For headers that must always be a single string (like Content-Type), use the * specialized _getExistingOrDefaultContentTypeHeader method instead. */ - _getExistingOrDefaultHeader(additionalHeaders, header, _default6) { + _getExistingOrDefaultHeader(additionalHeaders, header, _default5) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys3(this.requestOptions.headers)[header]; + const headerValue = lowercaseKeys2(this.requestOptions.headers)[header]; if (headerValue) { clientHeader = typeof headerValue === "number" ? headerValue.toString() : headerValue; } @@ -30171,7 +30171,7 @@ var require_lib = __commonJS({ if (clientHeader !== void 0) { return clientHeader; } - return _default6; + return _default5; } /** * Specialized version of _getExistingOrDefaultHeader for Content-Type header. @@ -30180,10 +30180,10 @@ var require_lib = __commonJS({ * This was split from _getExistingOrDefaultHeader to provide stricter typing for callers * that assign the result to places expecting a string (e.g., additionalHeaders[Headers.ContentType]). */ - _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default6) { + _getExistingOrDefaultContentTypeHeader(additionalHeaders, _default5) { let clientHeader; if (this.requestOptions && this.requestOptions.headers) { - const headerValue = lowercaseKeys3(this.requestOptions.headers)[Headers2.ContentType]; + const headerValue = lowercaseKeys2(this.requestOptions.headers)[Headers2.ContentType]; if (headerValue) { if (typeof headerValue === "number") { clientHeader = String(headerValue); @@ -30207,7 +30207,7 @@ var require_lib = __commonJS({ if (clientHeader !== void 0) { return clientHeader; } - return _default6; + return _default5; } _getAgent(parsedUrl) { let agent; @@ -30277,8 +30277,8 @@ var require_lib = __commonJS({ } return proxyAgent; } - _getUserAgentWithOrchestrationId(userAgent3) { - const baseUserAgent = userAgent3 || "actions/http-client"; + _getUserAgentWithOrchestrationId(userAgent2) { + const baseUserAgent = userAgent2 || "actions/http-client"; const orchId = process.env["ACTIONS_ORCHESTRATION_ID"]; if (orchId) { const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, "_"); @@ -30349,7 +30349,7 @@ var require_lib = __commonJS({ } }; exports.HttpClient = HttpClient3; - var lowercaseKeys3 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); + var lowercaseKeys2 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); } }); @@ -30359,7 +30359,7 @@ var require_dist = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.format = format2; - exports.parse = parse8; + exports.parse = parse7; var TEXT_REGEXP = /^[\u0009\u0020-\u007e\u0080-\u00ff]*$/; var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; var QUOTE_REGEXP = /[\\"]/g; @@ -30386,7 +30386,7 @@ var require_dist = __commonJS({ } return result; } - function parse8(header, options) { + function parse7(header, options) { const len = header.length; let index = skipOWS(header, 0, len); const valueStart = index; @@ -30664,8 +30664,8 @@ var require_light = __commonJS({ } else { return returned; } - } catch (error100) { - e2 = error100; + } catch (error99) { + e2 = error99; { this.trigger("error", e2); } @@ -30675,8 +30675,8 @@ var require_light = __commonJS({ return (await Promise.all(promises3)).find(function(x) { return x != null; }); - } catch (error100) { - e = error100; + } catch (error99) { + e = error99; { this.trigger("error", e); } @@ -30788,10 +30788,10 @@ var require_light = __commonJS({ _randomIndex() { return Math.random().toString(36).slice(2); } - doDrop({ error: error100, message: message2 = "This job has been dropped by Bottleneck" } = {}) { + doDrop({ error: error99, message: message2 = "This job has been dropped by Bottleneck" } = {}) { if (this._states.remove(this.options.id)) { if (this.rejectOnDrop) { - this._reject(error100 != null ? error100 : new BottleneckError$1(message2)); + this._reject(error99 != null ? error99 : new BottleneckError$1(message2)); } this.Events.trigger("dropped", { args: this.args, options: this.options, task: this.task, promise: this.promise }); return true; @@ -30825,7 +30825,7 @@ var require_light = __commonJS({ return this.Events.trigger("scheduled", { args: this.args, options: this.options }); } async doExecute(chained, clearGlobalState, run2, free) { - var error100, eventInfo, passed; + var error99, eventInfo, passed; if (this.retryCount === 0) { this._assertStatus("RUNNING"); this._states.next(this.options.id); @@ -30843,24 +30843,24 @@ var require_light = __commonJS({ return this._resolve(passed); } } catch (error1) { - error100 = error1; - return this._onFailure(error100, eventInfo, clearGlobalState, run2, free); + error99 = error1; + return this._onFailure(error99, eventInfo, clearGlobalState, run2, free); } } doExpire(clearGlobalState, run2, free) { - var error100, eventInfo; + var error99, eventInfo; if (this._states.jobStatus(this.options.id === "RUNNING")) { this._states.next(this.options.id); } this._assertStatus("EXECUTING"); eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; - error100 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error100, eventInfo, clearGlobalState, run2, free); + error99 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error99, eventInfo, clearGlobalState, run2, free); } - async _onFailure(error100, eventInfo, clearGlobalState, run2, free) { + async _onFailure(error99, eventInfo, clearGlobalState, run2, free) { var retry, retryAfter; if (clearGlobalState()) { - retry = await this.Events.trigger("failed", error100, eventInfo); + retry = await this.Events.trigger("failed", error99, eventInfo); if (retry != null) { retryAfter = ~~retry; this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); @@ -30870,7 +30870,7 @@ var require_light = __commonJS({ this.doDone(eventInfo); await free(this.options, eventInfo); this._assertStatus("DONE"); - return this._reject(error100); + return this._reject(error99); } } } @@ -30964,9 +30964,9 @@ var require_light = __commonJS({ await this.yieldLoop(); return this._done; } - async __groupCheck__(time6) { + async __groupCheck__(time5) { await this.yieldLoop(); - return this._nextRequest + this.timeout < time6; + return this._nextRequest + this.timeout < time5; } computeCapacity() { var maxConcurrent, reservoir; @@ -31149,7 +31149,7 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error100, reject, resolve, returned, task; + var args, cb, error99, reject, resolve, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; ({ task, args, resolve, reject } = this._queue.shift()); @@ -31160,9 +31160,9 @@ var require_light = __commonJS({ return resolve(returned); }; } catch (error1) { - error100 = error1; + error99 = error1; return function() { - return reject(error100); + return reject(error99); }; } })(); @@ -31172,24 +31172,24 @@ var require_light = __commonJS({ } } schedule(task, ...args) { - var promise4, reject, resolve; + var promise3, reject, resolve; resolve = reject = null; - promise4 = new this.Promise(function(_resolve, _reject) { + promise3 = new this.Promise(function(_resolve, _reject) { resolve = _resolve; return reject = _reject; }); this._queue.push({ task, args, resolve, reject }); this._tryToRun(); - return promise4; + return promise3; } }; var Sync_1 = Sync; - var version4 = "2.19.5"; + var version3 = "2.19.5"; var version$1 = { - version: version4 + version: version3 }; var version$2 = /* @__PURE__ */ Object.freeze({ - version: version4, + version: version3, default: version$1 }); var require$$2 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); @@ -31284,20 +31284,20 @@ var require_light = __commonJS({ var base; clearInterval(this.interval); return typeof (base = this.interval = setInterval(async () => { - var e, k, ref, results, time6, v; - time6 = Date.now(); + var e, k, ref, results, time5, v; + time5 = Date.now(); ref = this.instances; results = []; for (k in ref) { v = ref[k]; try { - if (await v._store.__groupCheck__(time6)) { + if (await v._store.__groupCheck__(time5)) { results.push(this.deleteKey(k)); } else { results.push(void 0); } - } catch (error100) { - e = error100; + } catch (error99) { + e = error99; results.push(v.Events.trigger("error", e)); } } @@ -31531,10 +31531,10 @@ var require_light = __commonJS({ } this.Events.trigger("debug", `Draining ${options.id}`, { args, options }); index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({ success: success4, wait, reservoir }) => { + return this._store.__register__(index, options.weight, options.expiration).then(({ success: success3, wait, reservoir }) => { var empty; - this.Events.trigger("debug", `Drained ${options.id}`, { success: success4, args, options }); - if (success4) { + this.Events.trigger("debug", `Drained ${options.id}`, { success: success3, args, options }); + if (success3) { queue.shift(); empty = this.empty(); if (empty) { @@ -31630,14 +31630,14 @@ var require_light = __commonJS({ return done; } async _addToQueue(job) { - var args, blocked, error100, options, reachedHWM, shifted, strategy; + var args, blocked, error99, options, reachedHWM, shifted, strategy; ({ args, options } = job); try { ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options.weight)); } catch (error1) { - error100 = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error: error100 }); - job.doDrop({ error: error100 }); + error99 = error1; + this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error: error99 }); + job.doDrop({ error: error99 }); return false; } if (blocked) { @@ -31803,13319 +31803,13487 @@ var require_light = __commonJS({ } }); -// node_modules/@actions/core/lib/command.js -import * as os from "os"; - -// node_modules/@actions/core/lib/utils.js -function toCommandValue(input) { - if (input === null || input === void 0) { - return ""; - } else if (typeof input === "string" || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} - -// node_modules/@actions/core/lib/command.js -function issueCommand(command, properties, message2) { - const cmd = new Command(command, properties, message2); - process.stdout.write(cmd.toString() + os.EOL); -} -var CMD_STRING = "::"; -var Command = class { - constructor(command, properties, message2) { - if (!command) { - command = "missing.command"; +// node_modules/issue-metadata/dist/index.js +var require_dist2 = __commonJS({ + "node_modules/issue-metadata/dist/index.js"(exports, module) { + "use strict"; + var __create2 = Object.create; + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __getProtoOf2 = Object.getPrototypeOf; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __commonJS2 = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + }; + var __export2 = (target, all3) => { + for (var name in all3) + __defProp2(target, name, { get: all3[name], enumerable: true }); + }; + var __copyProps2 = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames2(from)) + if (!__hasOwnProp2.call(to, key) && key !== except) + __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); + } + return to; + }; + var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, + mod + )); + var __toCommonJS = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod); + var require_fast_content_type_parse = __commonJS2({ + "node_modules/fast-content-type-parse/index.js"(exports2, module2) { + "use strict"; + var NullObject = function NullObject2() { + }; + NullObject.prototype = /* @__PURE__ */ Object.create(null); + var paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu; + var quotedPairRE = /\\([\v\u0020-\u00ff])/gu; + var mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u; + var defaultContentType = { type: "", parameters: new NullObject() }; + Object.freeze(defaultContentType.parameters); + Object.freeze(defaultContentType); + function parse22(header) { + if (typeof header !== "string") { + throw new TypeError("argument header is required and must be a string"); + } + let index = header.indexOf(";"); + const type = index !== -1 ? header.slice(0, index).trim() : header.trim(); + if (mediaTypeRE.test(type) === false) { + throw new TypeError("invalid media type"); + } + const result = { + type: type.toLowerCase(), + parameters: new NullObject() + }; + if (index === -1) { + return result; + } + let key; + let match2; + let value; + paramRE.lastIndex = index; + while (match2 = paramRE.exec(header)) { + if (match2.index !== index) { + throw new TypeError("invalid parameter format"); + } + index += match2[0].length; + key = match2[1].toLowerCase(); + value = match2[2]; + if (value[0] === '"') { + value = value.slice(1, value.length - 1); + quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); + } + result.parameters[key] = value; + } + if (index !== header.length) { + throw new TypeError("invalid parameter format"); + } + return result; + } + function safeParse22(header) { + if (typeof header !== "string") { + return defaultContentType; + } + let index = header.indexOf(";"); + const type = index !== -1 ? header.slice(0, index).trim() : header.trim(); + if (mediaTypeRE.test(type) === false) { + return defaultContentType; + } + const result = { + type: type.toLowerCase(), + parameters: new NullObject() + }; + if (index === -1) { + return result; + } + let key; + let match2; + let value; + paramRE.lastIndex = index; + while (match2 = paramRE.exec(header)) { + if (match2.index !== index) { + return defaultContentType; + } + index += match2[0].length; + key = match2[1].toLowerCase(); + value = match2[2]; + if (value[0] === '"') { + value = value.slice(1, value.length - 1); + quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); + } + result.parameters[key] = value; + } + if (index !== header.length) { + return defaultContentType; + } + return result; + } + module2.exports.default = { parse: parse22, safeParse: safeParse22 }; + module2.exports.parse = parse22; + module2.exports.safeParse = safeParse22; + module2.exports.defaultContentType = defaultContentType; + } + }); + var index_exports = {}; + __export2(index_exports, { + default: () => MetadataController2 + }); + module.exports = __toCommonJS(index_exports); + function getUserAgent2() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + if (typeof process === "object" && process.version !== void 0) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + return ""; } - this.command = command; - this.properties = properties; - this.message = message2; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; + var VERSION10 = "0.0.0-development"; + var userAgent2 = `octokit-endpoint.js/${VERSION10} ${getUserAgent2()}`; + var DEFAULTS2 = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent2 + }, + mediaType: { + format: "" + } + }; + function lowercaseKeys2(object3) { + if (!object3) { + return {}; + } + return Object.keys(object3).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object3[key]; + return newObj; + }, {}); + } + function isPlainObject6(value) { + if (typeof value !== "object" || value === null) return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); + } + function mergeDeep2(defaults3, options) { + const result = Object.assign({}, defaults3); + Object.keys(options).forEach((key) => { + if (isPlainObject6(options[key])) { + if (!(key in defaults3)) Object.assign(result, { [key]: options[key] }); + else result[key] = mergeDeep2(defaults3[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; + } + function removeUndefinedProperties2(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; + } + } + return obj; + } + function merge5(defaults3, route, options) { + if (typeof route === "string") { + let [method, url4] = route.split(" "); + options = Object.assign(url4 ? { method, url: url4 } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys2(options.headers); + removeUndefinedProperties2(options); + removeUndefinedProperties2(options.headers); + const mergedOptions = mergeDeep2(defaults3 || {}, options); + if (options.url === "/graphql") { + if (defaults3 && defaults3.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults3.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; + } + function addQueryParameters2(url4, parameters) { + const separator = /\?/.test(url4) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url4; + } + return url4 + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); + } + var urlVariableRegex2 = /\{[^{}}]+\}/g; + function removeNonChars2(variableName) { + return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); + } + function omit4(object3, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object3)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object3[key]; + } + } + return result; + } + function encodeReserved2(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); + } + function encodeUnreserved2(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); + } + function encodeValue2(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value); + if (key) { + return encodeUnreserved2(key) + "=" + value; + } else { + return value; + } + } + function isDefined2(value) { + return value !== void 0 && value !== null; + } + function isKeyOperator2(operator) { + return operator === ";" || operator === "&" || operator === "?"; + } + function getValues2(context3, operator, key, modifier) { + var value = context3[key], result = []; + if (isDefined2(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue2(operator, value, isKeyOperator2(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined2).forEach(function(value2) { + result.push( + encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "") + ); + }); } else { - cmdStr += ","; + Object.keys(value).forEach(function(k) { + if (isDefined2(value[k])) { + result.push(encodeValue2(operator, value[k], k)); + } + }); } - cmdStr += `${key}=${escapeProperty(val)}`; + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined2).forEach(function(value2) { + tmp.push(encodeValue2(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined2(value[k])) { + tmp.push(encodeUnreserved2(k)); + tmp.push(encodeValue2(operator, value[k].toString())); + } + }); + } + if (isKeyOperator2(operator)) { + result.push(encodeUnreserved2(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined2(value)) { + result.push(encodeUnreserved2(key)); } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved2(key) + "="); + } else if (value === "") { + result.push(""); } } + return result; } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -}; -function escapeData(s) { - return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); -} -function escapeProperty(s) { - return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); -} - -// node_modules/@actions/core/lib/file-command.js -import * as crypto from "crypto"; -import * as fs from "fs"; -import * as os2 from "os"; -function issueFileCommand(command, message2) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${toCommandValue(message2)}${os2.EOL}`, { - encoding: "utf8" - }); -} -function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = toCommandValue(value); - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; -} - -// node_modules/@actions/core/lib/core.js -import * as os4 from "os"; - -// node_modules/@actions/http-client/lib/index.js -var tunnel = __toESM(require_tunnel2(), 1); -var import_undici = __toESM(require_undici(), 1); -var HttpCodes; -(function(HttpCodes2) { - HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; - HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; - HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; - HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; - HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; - HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; - HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; - HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; - HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; - HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; - HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes || (HttpCodes = {})); -var Headers; -(function(Headers2) { - Headers2["Accept"] = "accept"; - Headers2["ContentType"] = "content-type"; -})(Headers || (Headers = {})); -var MediaTypes; -(function(MediaTypes2) { - MediaTypes2["ApplicationJson"] = "application/json"; -})(MediaTypes || (MediaTypes = {})); -var HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -var HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; - -// node_modules/@actions/core/lib/summary.js -import { EOL as EOL3 } from "os"; -import { constants, promises } from "fs"; -var __awaiter = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + function parseUrl2(template) { + return { + expand: expand2.bind(null, template) + }; + } + function expand2(template, context3) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal3) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved2(literal3); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } + } + function parse7(options) { + let method = options.method.toUpperCase(); + let url4 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit4(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames2(url4); + url4 = parseUrl2(url4).expand(parameters); + if (!/^http/.test(url4)) { + url4 = options.baseUrl + url4; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit4(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format2) => format2.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url4.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/(? { + const format2 = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format2}`; + }).join(","); + } + } } + if (["GET", "HEAD"].includes(method)) { + url4 = addQueryParameters2(url4, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url: url4, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); } - function rejected(value) { + function endpointWithDefaults2(defaults3, route, options) { + return parse7(merge5(defaults3, route, options)); + } + function withDefaults4(oldDefaults, newDefaults) { + const DEFAULTS22 = merge5(oldDefaults, newDefaults); + const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22); + return Object.assign(endpoint22, { + DEFAULTS: DEFAULTS22, + defaults: withDefaults4.bind(null, DEFAULTS22), + merge: merge5.bind(null, DEFAULTS22), + parse: parse7 + }); + } + var endpoint2 = withDefaults4(null, DEFAULTS2); + var import_fast_content_type_parse = __toESM2(require_fast_content_type_parse(), 1); + var RequestError2 = class extends Error { + name; + /** + * http status code + */ + status; + /** + * Request options that lead to the error. + */ + request; + /** + * Response object if a response was received + */ + response; + constructor(message2, statusCode, options) { + super(message2); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + /(? [ + name, + String(value) + ]) + ); + let fetchResponse; try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + fetchResponse = await fetch3(requestOptions.url, { + method: requestOptions.method, + body, + redirect: requestOptions.request?.redirect, + headers: requestHeaders, + signal: requestOptions.request?.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }); + } catch (error99) { + let message2 = "Unknown Error"; + if (error99 instanceof Error) { + if (error99.name === "AbortError") { + error99.status = 500; + throw error99; + } + message2 = error99.message; + if (error99.name === "TypeError" && "cause" in error99) { + if (error99.cause instanceof Error) { + message2 = error99.cause.message; + } else if (typeof error99.cause === "string") { + message2 = error99.cause; + } + } + } + const requestError = new RequestError2(message2, 500, { + request: requestOptions + }); + requestError.cause = error99; + throw requestError; + } + const status = fetchResponse.status; + const url4 = fetchResponse.url; + const responseHeaders = {}; + for (const [key, value] of fetchResponse.headers) { + responseHeaders[key] = value; + } + const octokitResponse = { + url: url4, + status, + headers: responseHeaders, + data: "" + }; + if ("deprecation" in responseHeaders) { + const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return octokitResponse; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return octokitResponse; + } + throw new RequestError2(fetchResponse.statusText, status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status === 304) { + octokitResponse.data = await getResponseData2(fetchResponse); + throw new RequestError2("Not modified", status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status >= 400) { + octokitResponse.data = await getResponseData2(fetchResponse); + throw new RequestError2(toErrorMessage2(octokitResponse.data), status, { + response: octokitResponse, + request: requestOptions + }); } + octokitResponse.data = parseSuccessResponseBody ? await getResponseData2(fetchResponse) : fetchResponse.body; + return octokitResponse; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + async function getResponseData2(response) { + const contentType = response.headers.get("content-type"); + if (!contentType) { + return response.text().catch(() => ""); + } + const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType); + if (isJSONResponse2(mimetype)) { + let text = ""; + try { + text = await response.text(); + return JSON.parse(text); + } catch (err) { + return text; + } + } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { + return response.text().catch(() => ""); + } else { + return response.arrayBuffer().catch(() => new ArrayBuffer(0)); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var { access, appendFile, writeFile } = promises; -var SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; -var Summary = class { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; + function isJSONResponse2(mimetype) { + return mimetype.type === "application/json" || mimetype.type === "application/scim+json"; + } + function toErrorMessage2(data) { + if (typeof data === "string") { + return data; } - const pathFromEnv = process.env[SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + if (data instanceof ArrayBuffer) { + return "Unknown error"; } - try { - yield access(pathFromEnv, constants.R_OK | constants.W_OK); - } catch (_a5) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + if ("message" in data) { + const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; + return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) { - return `<${tag}${htmlAttrs}>`; + return `Unknown error: ${JSON.stringify(data)}`; } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(EOL3); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") { - return this.wrap("td", cell); + function withDefaults22(oldEndpoint, newDefaults) { + const endpoint22 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint22.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper2(endpoint22.parse(endpointOptions)); } - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag, data, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } -}; -var _summary = new Summary(); -var summary = _summary; - -// node_modules/@actions/core/lib/platform.js -import os3 from "os"; - -// node_modules/@actions/io/lib/io-util.js -import * as fs2 from "fs"; -var { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs2.promises; -var IS_WINDOWS = process.platform === "win32"; -var READONLY = fs2.constants.O_RDONLY; - -// node_modules/@actions/exec/lib/toolrunner.js -var IS_WINDOWS2 = process.platform === "win32"; - -// node_modules/@actions/core/lib/platform.js -var platform = os3.platform(); -var arch = os3.arch(); - -// node_modules/@actions/core/lib/core.js -var ExitCode; -(function(ExitCode2) { - ExitCode2[ExitCode2["Success"] = 0] = "Success"; - ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; -})(ExitCode || (ExitCode = {})); -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -function getBooleanInput(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -function setOutput(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return issueFileCommand("OUTPUT", prepareKeyValueMessage(name, value)); - } - process.stdout.write(os4.EOL); - issueCommand("set-output", { name }, toCommandValue(value)); -} -function setFailed(message2) { - process.exitCode = ExitCode.Failure; - error(message2); -} -function debug(message2) { - issueCommand("debug", {}, message2); -} -function error(message2, properties = {}) { - issueCommand("error", toCommandProperties(properties), message2 instanceof Error ? message2.toString() : message2); -} -function warning(message2, properties = {}) { - issueCommand("warning", toCommandProperties(properties), message2 instanceof Error ? message2.toString() : message2); -} -function notice(message2, properties = {}) { - issueCommand("notice", toCommandProperties(properties), message2 instanceof Error ? message2.toString() : message2); -} -function info(message2) { - process.stdout.write(message2 + os4.EOL); -} -function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return issueFileCommand("STATE", prepareKeyValueMessage(name, value)); - } - issueCommand("save-state", { name }, toCommandValue(value)); -} -function getState(name) { - return process.env[`STATE_${name}`] || ""; -} - -// node_modules/axios/lib/helpers/bind.js -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} - -// node_modules/axios/lib/utils.js -var { toString } = Object.prototype; -var { getPrototypeOf } = Object; -var { iterator, toStringTag } = Symbol; -var kindOf = /* @__PURE__ */ ((cache) => (thing) => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(/* @__PURE__ */ Object.create(null)); -var kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type; -}; -var typeOfTest = (type) => (thing) => typeof thing === type; -var { isArray } = Array; -var isUndefined = typeOfTest("undefined"); -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} -var isArrayBuffer = kindOfTest("ArrayBuffer"); -function isArrayBufferView(val) { - let result; - if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { - result = ArrayBuffer.isView(val); - } else { - result = val && val.buffer && isArrayBuffer(val.buffer); - } - return result; -} -var isString = typeOfTest("string"); -var isFunction = typeOfTest("function"); -var isNumber = typeOfTest("number"); -var isObject = (thing) => thing !== null && typeof thing === "object"; -var isBoolean = (thing) => thing === true || thing === false; -var isPlainObject = (val) => { - if (kindOf(val) !== "object") { - return false; - } - const prototype2 = getPrototypeOf(val); - return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val); -}; -var isEmptyObject = (val) => { - if (!isObject(val) || isBuffer(val)) { - return false; - } - try { - return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; - } catch (e) { - return false; - } -}; -var isDate = kindOfTest("Date"); -var isFile = kindOfTest("File"); -var isReactNativeBlob = (value) => { - return !!(value && typeof value.uri !== "undefined"); -}; -var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined"; -var isBlob = kindOfTest("Blob"); -var isFileList = kindOfTest("FileList"); -var isStream = (val) => isObject(val) && isFunction(val.pipe); -function getGlobal() { - if (typeof globalThis !== "undefined") return globalThis; - if (typeof self !== "undefined") return self; - if (typeof window !== "undefined") return window; - if (typeof global !== "undefined") return global; - return {}; -} -var G = getGlobal(); -var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0; -var isFormData = (thing) => { - let kind; - return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance - kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); -}; -var isURLSearchParams = kindOfTest("URLSearchParams"); -var [isReadableStream, isRequest, isResponse, isHeaders] = [ - "ReadableStream", - "Request", - "Response", - "Headers" -].map(kindOfTest); -var trim = (str) => { - return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); -}; -function forEach(obj, fn, { allOwnKeys = false } = {}) { - if (obj === null || typeof obj === "undefined") { - return; - } - let i; - let l; - if (typeof obj !== "object") { - obj = [obj]; - } - if (isArray(obj)) { - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - if (isBuffer(obj)) { - return; - } - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} -function findKey(obj, key) { - if (isBuffer(obj)) { - return null; - } - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} -var _global = (() => { - if (typeof globalThis !== "undefined") return globalThis; - return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; -})(); -var isContextDefined = (context3) => !isUndefined(context3) && context3 !== _global; -function merge() { - const { caseless, skipUndefined } = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - if (key === "__proto__" || key === "constructor" || key === "prototype") { - return; - } - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else if (!skipUndefined || !isUndefined(val)) { - result[targetKey] = val; - } - }; - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} -var extend = (a, b, thisArg, { allOwnKeys } = {}) => { - forEach( - b, - (val, key) => { - if (thisArg && isFunction(val)) { - Object.defineProperty(a, key, { - value: bind(val, thisArg), - writable: true, - enumerable: true, - configurable: true - }); - } else { - Object.defineProperty(a, key, { - value: val, - writable: true, - enumerable: true, - configurable: true + const request22 = (route2, parameters2) => { + return fetchWrapper2( + endpoint22.parse(endpoint22.merge(route2, parameters2)) + ); + }; + Object.assign(request22, { + endpoint: endpoint22, + defaults: withDefaults22.bind(null, endpoint22) }); - } - }, - { allOwnKeys } - ); - return a; -}; -var stripBOM = (content) => { - if (content.charCodeAt(0) === 65279) { - content = content.slice(1); - } - return content; -}; -var inherits = (constructor, superConstructor, props, descriptors) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors); - Object.defineProperty(constructor.prototype, "constructor", { - value: constructor, - writable: true, - enumerable: false, - configurable: true - }); - Object.defineProperty(constructor, "super", { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -}; -var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - destObj = destObj || {}; - if (sourceObj == null) return destObj; - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter2 !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); - return destObj; -}; -var endsWith = (str, searchString, position) => { - str = String(str); - if (position === void 0 || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -}; -var toArray = (thing) => { - if (!thing) return null; - if (isArray(thing)) return thing; - let i = thing.length; - if (!isNumber(i)) return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -}; -var isTypedArray = /* @__PURE__ */ ((TypedArray) => { - return (thing) => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); -var forEachEntry = (obj, fn) => { - const generator = obj && obj[iterator]; - const _iterator = generator.call(obj); - let result; - while ((result = _iterator.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -}; -var matchAll = (regExp, str) => { - let matches; - const arr = []; - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - return arr; -}; -var isHTMLForm = kindOfTest("HTMLFormElement"); -var toCamelCase = (str) => { - return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - }); -}; -var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); -var isRegExp = kindOfTest("RegExp"); -var reduceDescriptors = (obj, reducer) => { - const descriptors = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - forEach(descriptors, (descriptor, name) => { - let ret; - if ((ret = reducer(descriptor, name, obj)) !== false) { - reducedDescriptors[name] = ret || descriptor; + return endpointOptions.request.hook(request22, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint22, + defaults: withDefaults22.bind(null, endpoint22) + }); } - }); - Object.defineProperties(obj, reducedDescriptors); -}; -var freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name) => { - if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { - return false; + var request2 = withDefaults22(endpoint2, defaults_default3); + function parseMetadata(body, key, regexp) { + const match2 = body.match(regexp); + if (match2) { + const data = JSON.parse(match2[1]); + return key ? data && data[key] : data; + } } - const value = obj[name]; - if (!isFunction(value)) return; - descriptor.enumerable = false; - if ("writable" in descriptor) { - descriptor.writable = false; - return; + function getBodyAndMetadata(body, regexp) { + let metadata; + let issue4 = body.replace(regexp, (_, json3) => { + metadata = JSON.parse(json3); + return ""; + }); + if (!metadata) metadata = {}; + return { body: issue4, metadata }; } - if (!descriptor.set) { - descriptor.set = () => { - throw Error("Can not rewrite read-only method '" + name + "'"); - }; + function assignNewMetadata(metadata, key, value) { + if (typeof key === "object") { + Object.assign(metadata, key); + return metadata; + } + return { ...metadata, [key]: value ? value : "" }; } - }); -}; -var toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - const define2 = (arr) => { - arr.forEach((value) => { - obj[value] = true; - }); - }; - isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter)); - return obj; -}; -var noop = () => { -}; -var toFiniteNumber = (value, defaultValue) => { - return value != null && Number.isFinite(value = +value) ? value : defaultValue; -}; -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); -} -var toJSONObject = (obj) => { - const stack = new Array(10); - const visit = (source, i) => { - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; + var util3; + (function(util22) { + util22.assertEqual = (val) => val; + function assertIs3(_arg) { } - if (isBuffer(source)) { - return source; + util22.assertIs = assertIs3; + function assertNever3(_x) { + throw new Error(); } - if (!("toJSON" in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); + util22.assertNever = assertNever3; + util22.arrayToEnum = (items) => { + const obj = {}; + for (const item of items) { + obj[item] = item; + } + return obj; + }; + util22.getValidEnumValues = (obj) => { + const validKeys = util22.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); + const filtered = {}; + for (const k of validKeys) { + filtered[k] = obj[k]; + } + return util22.objectValues(filtered); + }; + util22.objectValues = (obj) => { + return util22.objectKeys(obj).map(function(e) { + return obj[e]; }); - stack[i] = void 0; - return target; + }; + util22.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object3) => { + const keys = []; + for (const key in object3) { + if (Object.prototype.hasOwnProperty.call(object3, key)) { + keys.push(key); + } + } + return keys; + }; + util22.find = (arr, checker) => { + for (const item of arr) { + if (checker(item)) + return item; + } + return void 0; + }; + util22.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val; + function joinValues3(array3, separator = " | ") { + return array3.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator); } - } - return source; - }; - return visit(obj, 0); -}; -var isAsyncFn = kindOfTest("AsyncFunction"); -var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); -var _setImmediate = ((setImmediateSupported, postMessageSupported) => { - if (setImmediateSupported) { - return setImmediate; - } - return postMessageSupported ? ((token, callbacks) => { - _global.addEventListener( - "message", - ({ source, data }) => { - if (source === _global && data === token) { - callbacks.length && callbacks.shift()(); + util22.joinValues = joinValues3; + util22.jsonStringifyReplacer = (_, value) => { + if (typeof value === "bigint") { + return value.toString(); } - }, - false - ); - return (cb) => { - callbacks.push(cb); - _global.postMessage(token, "*"); + return value; + }; + })(util3 || (util3 = {})); + var objectUtil; + (function(objectUtil2) { + objectUtil2.mergeShapes = (first, second) => { + return { + ...first, + ...second + // second overwrites first + }; + }; + })(objectUtil || (objectUtil = {})); + var ZodParsedType = util3.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" + ]); + var getParsedType3 = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return ZodParsedType.undefined; + case "string": + return ZodParsedType.string; + case "number": + return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number; + case "boolean": + return ZodParsedType.boolean; + case "function": + return ZodParsedType.function; + case "bigint": + return ZodParsedType.bigint; + case "symbol": + return ZodParsedType.symbol; + case "object": + if (Array.isArray(data)) { + return ZodParsedType.array; + } + if (data === null) { + return ZodParsedType.null; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return ZodParsedType.promise; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return ZodParsedType.map; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return ZodParsedType.set; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return ZodParsedType.date; + } + return ZodParsedType.object; + default: + return ZodParsedType.unknown; + } }; - })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); -})(typeof setImmediate === "function", isFunction(_global.postMessage)); -var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; -var isIterable = (thing) => thing != null && isFunction(thing[iterator]); -var utils_default = { - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isEmptyObject, - isReadableStream, - isRequest, - isResponse, - isHeaders, - isUndefined, - isDate, - isFile, - isReactNativeBlob, - isReactNative, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, - // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - isSpecCompliantForm, - toJSONObject, - isAsyncFn, - isThenable, - setImmediate: _setImmediate, - asap, - isIterable -}; - -// node_modules/axios/lib/core/AxiosError.js -var AxiosError = class _AxiosError extends Error { - static from(error100, code, config4, request3, response, customProps) { - const axiosError = new _AxiosError(error100.message, code || error100.code, config4, request3, response); - axiosError.cause = error100; - axiosError.name = error100.name; - if (error100.status != null && axiosError.status == null) { - axiosError.status = error100.status; + var ZodIssueCode3 = util3.arrayToEnum([ + "invalid_type", + "invalid_literal", + "custom", + "invalid_union", + "invalid_union_discriminator", + "invalid_enum_value", + "unrecognized_keys", + "invalid_arguments", + "invalid_return_type", + "invalid_date", + "invalid_string", + "too_small", + "too_big", + "invalid_intersection_types", + "not_multiple_of", + "not_finite" + ]); + var quotelessJson = (obj) => { + const json3 = JSON.stringify(obj, null, 2); + return json3.replace(/"([^"]+)":/g, "$1:"); + }; + var ZodError3 = class _ZodError extends Error { + get errors() { + return this.issues; + } + constructor(issues) { + super(); + this.issues = []; + this.addIssue = (sub) => { + this.issues = [...this.issues, sub]; + }; + this.addIssues = (subs = []) => { + this.issues = [...this.issues, ...subs]; + }; + const actualProto = new.target.prototype; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(this, actualProto); + } else { + this.__proto__ = actualProto; + } + this.name = "ZodError"; + this.issues = issues; + } + format(_mapper) { + const mapper = _mapper || function(issue4) { + return issue4.message; + }; + const fieldErrors = { _errors: [] }; + const processError = (error99) => { + for (const issue4 of error99.issues) { + if (issue4.code === "invalid_union") { + issue4.unionErrors.map(processError); + } else if (issue4.code === "invalid_return_type") { + processError(issue4.returnTypeError); + } else if (issue4.code === "invalid_arguments") { + processError(issue4.argumentsError); + } else if (issue4.path.length === 0) { + fieldErrors._errors.push(mapper(issue4)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue4.path.length) { + const el = issue4.path[i]; + const terminal = i === issue4.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue4)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(this); + return fieldErrors; + } + static assert(value) { + if (!(value instanceof _ZodError)) { + throw new Error(`Not a ZodError: ${value}`); + } + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, util3.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(mapper = (issue4) => issue4.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of this.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; + } + get formErrors() { + return this.flatten(); + } + }; + ZodError3.create = (issues) => { + const error99 = new ZodError3(issues); + return error99; + }; + var errorMap = (issue4, _ctx) => { + let message2; + switch (issue4.code) { + case ZodIssueCode3.invalid_type: + if (issue4.received === ZodParsedType.undefined) { + message2 = "Required"; + } else { + message2 = `Expected ${issue4.expected}, received ${issue4.received}`; + } + break; + case ZodIssueCode3.invalid_literal: + message2 = `Invalid literal value, expected ${JSON.stringify(issue4.expected, util3.jsonStringifyReplacer)}`; + break; + case ZodIssueCode3.unrecognized_keys: + message2 = `Unrecognized key(s) in object: ${util3.joinValues(issue4.keys, ", ")}`; + break; + case ZodIssueCode3.invalid_union: + message2 = `Invalid input`; + break; + case ZodIssueCode3.invalid_union_discriminator: + message2 = `Invalid discriminator value. Expected ${util3.joinValues(issue4.options)}`; + break; + case ZodIssueCode3.invalid_enum_value: + message2 = `Invalid enum value. Expected ${util3.joinValues(issue4.options)}, received '${issue4.received}'`; + break; + case ZodIssueCode3.invalid_arguments: + message2 = `Invalid function arguments`; + break; + case ZodIssueCode3.invalid_return_type: + message2 = `Invalid function return type`; + break; + case ZodIssueCode3.invalid_date: + message2 = `Invalid date`; + break; + case ZodIssueCode3.invalid_string: + if (typeof issue4.validation === "object") { + if ("includes" in issue4.validation) { + message2 = `Invalid input: must include "${issue4.validation.includes}"`; + if (typeof issue4.validation.position === "number") { + message2 = `${message2} at one or more positions greater than or equal to ${issue4.validation.position}`; + } + } else if ("startsWith" in issue4.validation) { + message2 = `Invalid input: must start with "${issue4.validation.startsWith}"`; + } else if ("endsWith" in issue4.validation) { + message2 = `Invalid input: must end with "${issue4.validation.endsWith}"`; + } else { + util3.assertNever(issue4.validation); + } + } else if (issue4.validation !== "regex") { + message2 = `Invalid ${issue4.validation}`; + } else { + message2 = "Invalid"; + } + break; + case ZodIssueCode3.too_small: + if (issue4.type === "array") + message2 = `Array must contain ${issue4.exact ? "exactly" : issue4.inclusive ? `at least` : `more than`} ${issue4.minimum} element(s)`; + else if (issue4.type === "string") + message2 = `String must contain ${issue4.exact ? "exactly" : issue4.inclusive ? `at least` : `over`} ${issue4.minimum} character(s)`; + else if (issue4.type === "number") + message2 = `Number must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${issue4.minimum}`; + else if (issue4.type === "date") + message2 = `Date must be ${issue4.exact ? `exactly equal to ` : issue4.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue4.minimum))}`; + else + message2 = "Invalid input"; + break; + case ZodIssueCode3.too_big: + if (issue4.type === "array") + message2 = `Array must contain ${issue4.exact ? `exactly` : issue4.inclusive ? `at most` : `less than`} ${issue4.maximum} element(s)`; + else if (issue4.type === "string") + message2 = `String must contain ${issue4.exact ? `exactly` : issue4.inclusive ? `at most` : `under`} ${issue4.maximum} character(s)`; + else if (issue4.type === "number") + message2 = `Number must be ${issue4.exact ? `exactly` : issue4.inclusive ? `less than or equal to` : `less than`} ${issue4.maximum}`; + else if (issue4.type === "bigint") + message2 = `BigInt must be ${issue4.exact ? `exactly` : issue4.inclusive ? `less than or equal to` : `less than`} ${issue4.maximum}`; + else if (issue4.type === "date") + message2 = `Date must be ${issue4.exact ? `exactly` : issue4.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue4.maximum))}`; + else + message2 = "Invalid input"; + break; + case ZodIssueCode3.custom: + message2 = `Invalid input`; + break; + case ZodIssueCode3.invalid_intersection_types: + message2 = `Intersection results could not be merged`; + break; + case ZodIssueCode3.not_multiple_of: + message2 = `Number must be a multiple of ${issue4.multipleOf}`; + break; + case ZodIssueCode3.not_finite: + message2 = "Number must be finite"; + break; + default: + message2 = _ctx.defaultError; + util3.assertNever(issue4); + } + return { message: message2 }; + }; + var overrideErrorMap = errorMap; + function setErrorMap3(map3) { + overrideErrorMap = map3; + } + function getErrorMap3() { + return overrideErrorMap; + } + var makeIssue = (params) => { + const { data, path, errorMaps, issueData } = params; + const fullPath = [...path, ...issueData.path || []]; + const fullIssue = { + ...issueData, + path: fullPath + }; + if (issueData.message !== void 0) { + return { + ...issueData, + path: fullPath, + message: issueData.message + }; + } + let errorMessage = ""; + const maps = errorMaps.filter((m) => !!m).slice().reverse(); + for (const map3 of maps) { + errorMessage = map3(fullIssue, { data, defaultError: errorMessage }).message; + } + return { + ...issueData, + path: fullPath, + message: errorMessage + }; + }; + var EMPTY_PATH = []; + function addIssueToContext(ctx, issueData) { + const overrideMap = getErrorMap3(); + const issue4 = makeIssue({ + issueData, + data: ctx.data, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + // contextual error map is first priority + ctx.schemaErrorMap, + // then schema-bound map if available + overrideMap, + // then global override map + overrideMap === errorMap ? void 0 : errorMap + // then global default map + ].filter((x) => !!x) + }); + ctx.common.issues.push(issue4); } - customProps && Object.assign(axiosError, customProps); - return axiosError; - } - /** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [config] The config. - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * - * @returns {Error} The created error. - */ - constructor(message2, code, config4, request3, response) { - super(message2); - Object.defineProperty(this, "message", { - value: message2, - enumerable: true, - writable: true, - configurable: true + var ParseStatus = class _ParseStatus { + constructor() { + this.value = "valid"; + } + dirty() { + if (this.value === "valid") + this.value = "dirty"; + } + abort() { + if (this.value !== "aborted") + this.value = "aborted"; + } + static mergeArray(status, results) { + const arrayValue = []; + for (const s of results) { + if (s.status === "aborted") + return INVALID; + if (s.status === "dirty") + status.dirty(); + arrayValue.push(s.value); + } + return { status: status.value, value: arrayValue }; + } + static async mergeObjectAsync(status, pairs) { + const syncPairs = []; + for (const pair of pairs) { + const key = await pair.key; + const value = await pair.value; + syncPairs.push({ + key, + value + }); + } + return _ParseStatus.mergeObjectSync(status, syncPairs); + } + static mergeObjectSync(status, pairs) { + const finalObject = {}; + for (const pair of pairs) { + const { key, value } = pair; + if (key.status === "aborted") + return INVALID; + if (value.status === "aborted") + return INVALID; + if (key.status === "dirty") + status.dirty(); + if (value.status === "dirty") + status.dirty(); + if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) { + finalObject[key.value] = value.value; + } + } + return { status: status.value, value: finalObject }; + } + }; + var INVALID = Object.freeze({ + status: "aborted" }); - this.name = "AxiosError"; - this.isAxiosError = true; - code && (this.code = code); - config4 && (this.config = config4); - request3 && (this.request = request3); - if (response) { - this.response = response; - this.status = response.status; - } - } - toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: utils_default.toJSONObject(this.config), - code: this.code, - status: this.status + var DIRTY = (value) => ({ status: "dirty", value }); + var OK = (value) => ({ status: "valid", value }); + var isAborted = (x) => x.status === "aborted"; + var isDirty = (x) => x.status === "dirty"; + var isValid2 = (x) => x.status === "valid"; + var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise; + function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + } + function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; + } + var errorUtil; + (function(errorUtil2) { + errorUtil2.errToObj = (message2) => typeof message2 === "string" ? { message: message2 } : message2 || {}; + errorUtil2.toString = (message2) => typeof message2 === "string" ? message2 : message2 === null || message2 === void 0 ? void 0 : message2.message; + })(errorUtil || (errorUtil = {})); + var _ZodEnum_cache; + var _ZodNativeEnum_cache; + var ParseInputLazyPath = class { + constructor(parent, value, path, key) { + this._cachedPath = []; + this.parent = parent; + this.data = value; + this._path = path; + this._key = key; + } + get path() { + if (!this._cachedPath.length) { + if (this._key instanceof Array) { + this._cachedPath.push(...this._path, ...this._key); + } else { + this._cachedPath.push(...this._path, this._key); + } + } + return this._cachedPath; + } }; - } -}; -AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; -AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; -AxiosError.ECONNABORTED = "ECONNABORTED"; -AxiosError.ETIMEDOUT = "ETIMEDOUT"; -AxiosError.ERR_NETWORK = "ERR_NETWORK"; -AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; -AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; -AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; -AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; -AxiosError.ERR_CANCELED = "ERR_CANCELED"; -AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; -AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; -var AxiosError_default = AxiosError; - -// node_modules/axios/lib/platform/node/classes/FormData.js -var import_form_data = __toESM(require_form_data(), 1); -var FormData_default = import_form_data.default; - -// node_modules/axios/lib/helpers/toFormData.js -function isVisitable(thing) { - return utils_default.isPlainObject(thing) || utils_default.isArray(thing); -} -function removeBrackets(key) { - return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; -} -function renderKey(path, key, dots) { - if (!path) return key; - return path.concat(key).map(function each(token, i) { - token = removeBrackets(token); - return !dots && i ? "[" + token + "]" : token; - }).join(dots ? "." : ""); -} -function isFlatArray(arr) { - return utils_default.isArray(arr) && !arr.some(isVisitable); -} -var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) { - return /^is[A-Z]/.test(prop); -}); -function toFormData(obj, formData, options) { - if (!utils_default.isObject(obj)) { - throw new TypeError("target must be an object"); - } - formData = formData || new (FormData_default || FormData)(); - options = utils_default.toFlatObject( - options, - { - metaTokens: true, - dots: false, - indexes: false - }, - false, - function defined(option, source) { - return !utils_default.isUndefined(source[option]); - } - ); - const metaTokens = options.metaTokens; - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; - const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); - if (!utils_default.isFunction(visitor)) { - throw new TypeError("visitor must be a function"); - } - function convertValue(value) { - if (value === null) return ""; - if (utils_default.isDate(value)) { - return value.toISOString(); - } - if (utils_default.isBoolean(value)) { - return value.toString(); - } - if (!useBlob && utils_default.isBlob(value)) { - throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); - } - if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { - return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); - } - return value; - } - function defaultVisitor(value, key, path) { - let arr = value; - if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { - formData.append(renderKey(path, key, dots), convertValue(value)); + var handleResult = (ctx, result) => { + if (isValid2(result)) { + return { success: true, data: result.value }; + } else { + if (!ctx.common.issues.length) { + throw new Error("Validation failed but no issues detected."); + } + return { + success: false, + get error() { + if (this._error) + return this._error; + const error99 = new ZodError3(ctx.common.issues); + this._error = error99; + return this._error; + } + }; + } + }; + function processCreateParams(params) { + if (!params) + return {}; + const { errorMap: errorMap2, invalid_type_error, required_error, description } = params; + if (errorMap2 && (invalid_type_error || required_error)) { + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + } + if (errorMap2) + return { errorMap: errorMap2, description }; + const customMap = (iss, ctx) => { + var _a4, _b; + const { message: message2 } = params; + if (iss.code === "invalid_enum_value") { + return { message: message2 !== null && message2 !== void 0 ? message2 : ctx.defaultError }; + } + if (typeof ctx.data === "undefined") { + return { message: (_a4 = message2 !== null && message2 !== void 0 ? message2 : required_error) !== null && _a4 !== void 0 ? _a4 : ctx.defaultError }; + } + if (iss.code !== "invalid_type") + return { message: ctx.defaultError }; + return { message: (_b = message2 !== null && message2 !== void 0 ? message2 : invalid_type_error) !== null && _b !== void 0 ? _b : ctx.defaultError }; + }; + return { errorMap: customMap, description }; + } + var ZodType3 = class { + get description() { + return this._def.description; + } + _getType(input) { + return getParsedType3(input.data); + } + _getOrReturnCtx(input, ctx) { + return ctx || { + common: input.parent.common, + data: input.data, + parsedType: getParsedType3(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + }; + } + _processInputParams(input) { + return { + status: new ParseStatus(), + ctx: { + common: input.parent.common, + data: input.data, + parsedType: getParsedType3(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + } + }; + } + _parseSync(input) { + const result = this._parse(input); + if (isAsync(result)) { + throw new Error("Synchronous parse encountered promise."); + } + return result; + } + _parseAsync(input) { + const result = this._parse(input); + return Promise.resolve(result); + } + parse(data, params) { + const result = this.safeParse(data, params); + if (result.success) + return result.data; + throw result.error; + } + safeParse(data, params) { + var _a4; + const ctx = { + common: { + issues: [], + async: (_a4 = params === null || params === void 0 ? void 0 : params.async) !== null && _a4 !== void 0 ? _a4 : false, + contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap + }, + path: (params === null || params === void 0 ? void 0 : params.path) || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType3(data) + }; + const result = this._parseSync({ data, path: ctx.path, parent: ctx }); + return handleResult(ctx, result); + } + "~validate"(data) { + var _a4, _b; + const ctx = { + common: { + issues: [], + async: !!this["~standard"].async + }, + path: [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType3(data) + }; + if (!this["~standard"].async) { + try { + const result = this._parseSync({ data, path: [], parent: ctx }); + return isValid2(result) ? { + value: result.value + } : { + issues: ctx.common.issues + }; + } catch (err) { + if ((_b = (_a4 = err === null || err === void 0 ? void 0 : err.message) === null || _a4 === void 0 ? void 0 : _a4.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) { + this["~standard"].async = true; + } + ctx.common = { + issues: [], + async: true + }; + } + } + return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid2(result) ? { + value: result.value + } : { + issues: ctx.common.issues + }); + } + async parseAsync(data, params) { + const result = await this.safeParseAsync(data, params); + if (result.success) + return result.data; + throw result.error; + } + async safeParseAsync(data, params) { + const ctx = { + common: { + issues: [], + contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap, + async: true + }, + path: (params === null || params === void 0 ? void 0 : params.path) || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType3(data) + }; + const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); + const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); + return handleResult(ctx, result); + } + refine(check3, message2) { + const getIssueProperties = (val) => { + if (typeof message2 === "string" || typeof message2 === "undefined") { + return { message: message2 }; + } else if (typeof message2 === "function") { + return message2(val); + } else { + return message2; + } + }; + return this._refinement((val, ctx) => { + const result = check3(val); + const setError = () => ctx.addIssue({ + code: ZodIssueCode3.custom, + ...getIssueProperties(val) + }); + if (typeof Promise !== "undefined" && result instanceof Promise) { + return result.then((data) => { + if (!data) { + setError(); + return false; + } else { + return true; + } + }); + } + if (!result) { + setError(); + return false; + } else { + return true; + } + }); + } + refinement(check3, refinementData) { + return this._refinement((val, ctx) => { + if (!check3(val)) { + ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); + return false; + } else { + return true; + } + }); + } + _refinement(refinement) { + return new ZodEffects({ + schema: this, + typeName: ZodFirstPartyTypeKind3.ZodEffects, + effect: { type: "refinement", refinement } + }); + } + superRefine(refinement) { + return this._refinement(refinement); + } + constructor(def) { + this.spa = this.safeParseAsync; + this._def = def; + this.parse = this.parse.bind(this); + this.safeParse = this.safeParse.bind(this); + this.parseAsync = this.parseAsync.bind(this); + this.safeParseAsync = this.safeParseAsync.bind(this); + this.spa = this.spa.bind(this); + this.refine = this.refine.bind(this); + this.refinement = this.refinement.bind(this); + this.superRefine = this.superRefine.bind(this); + this.optional = this.optional.bind(this); + this.nullable = this.nullable.bind(this); + this.nullish = this.nullish.bind(this); + this.array = this.array.bind(this); + this.promise = this.promise.bind(this); + this.or = this.or.bind(this); + this.and = this.and.bind(this); + this.transform = this.transform.bind(this); + this.brand = this.brand.bind(this); + this.default = this.default.bind(this); + this.catch = this.catch.bind(this); + this.describe = this.describe.bind(this); + this.pipe = this.pipe.bind(this); + this.readonly = this.readonly.bind(this); + this.isNullable = this.isNullable.bind(this); + this.isOptional = this.isOptional.bind(this); + this["~standard"] = { + version: 1, + vendor: "zod", + validate: (data) => this["~validate"](data) + }; + } + optional() { + return ZodOptional3.create(this, this._def); + } + nullable() { + return ZodNullable3.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return ZodArray3.create(this); + } + promise() { + return ZodPromise3.create(this, this._def); + } + or(option) { + return ZodUnion3.create([this, option], this._def); + } + and(incoming) { + return ZodIntersection3.create(this, incoming, this._def); + } + transform(transform3) { + return new ZodEffects({ + ...processCreateParams(this._def), + schema: this, + typeName: ZodFirstPartyTypeKind3.ZodEffects, + effect: { type: "transform", transform: transform3 } + }); + } + default(def) { + const defaultValueFunc = typeof def === "function" ? def : () => def; + return new ZodDefault3({ + ...processCreateParams(this._def), + innerType: this, + defaultValue: defaultValueFunc, + typeName: ZodFirstPartyTypeKind3.ZodDefault + }); + } + brand() { + return new ZodBranded({ + typeName: ZodFirstPartyTypeKind3.ZodBranded, + type: this, + ...processCreateParams(this._def) + }); + } + catch(def) { + const catchValueFunc = typeof def === "function" ? def : () => def; + return new ZodCatch3({ + ...processCreateParams(this._def), + innerType: this, + catchValue: catchValueFunc, + typeName: ZodFirstPartyTypeKind3.ZodCatch + }); + } + describe(description) { + const This = this.constructor; + return new This({ + ...this._def, + description + }); + } + pipe(target) { + return ZodPipeline.create(this, target); + } + readonly() { + return ZodReadonly3.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } + }; + var cuidRegex = /^c[^\s-]{8,}$/i; + var cuid2Regex = /^[0-9a-z]+$/; + var ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i; + var uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i; + var nanoidRegex = /^[a-z0-9_-]{21}$/i; + var jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; + var durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; + var emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; + var _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; + var emojiRegex; + var ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; + var ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/; + var ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/; + var ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; + var base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; + var base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; + var dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`; + var dateRegex = new RegExp(`^${dateRegexSource}$`); + function timeRegexSource(args) { + let regex2 = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`; + if (args.precision) { + regex2 = `${regex2}\\.\\d{${args.precision}}`; + } else if (args.precision == null) { + regex2 = `${regex2}(\\.\\d+)?`; + } + return regex2; + } + function timeRegex(args) { + return new RegExp(`^${timeRegexSource(args)}$`); + } + function datetimeRegex(args) { + let regex2 = `${dateRegexSource}T${timeRegexSource(args)}`; + const opts = []; + opts.push(args.local ? `Z?` : `Z`); + if (args.offset) + opts.push(`([+-]\\d{2}:?\\d{2})`); + regex2 = `${regex2}(${opts.join("|")})`; + return new RegExp(`^${regex2}$`); + } + function isValidIP(ip, version3) { + if ((version3 === "v4" || !version3) && ipv4Regex.test(ip)) { + return true; + } + if ((version3 === "v6" || !version3) && ipv6Regex.test(ip)) { + return true; + } return false; } - if (value && !path && typeof value === "object") { - if (utils_default.endsWith(key, "{}")) { - key = metaTokens ? key : key.slice(0, -2); - value = JSON.stringify(value); - } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { - key = removeBrackets(key); - arr.forEach(function each(el, index) { - !(utils_default.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", - convertValue(el) - ); - }); + function isValidJWT3(jwt3, alg) { + if (!jwtRegex.test(jwt3)) + return false; + try { + const [header] = jwt3.split("."); + const base645 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base645)); + if (typeof decoded !== "object" || decoded === null) + return false; + if (!decoded.typ || !decoded.alg) + return false; + if (alg && decoded.alg !== alg) + return false; + return true; + } catch (_a4) { return false; } } - if (isVisitable(value)) { - return true; - } - formData.append(renderKey(path, key, dots), convertValue(value)); - return false; - } - const stack = []; - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - function build(value, path) { - if (utils_default.isUndefined(value)) return; - if (stack.indexOf(value) !== -1) { - throw Error("Circular reference detected in " + path.join(".")); - } - stack.push(value); - utils_default.forEach(value, function each(el, key) { - const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers); - if (result === true) { - build(el, path ? path.concat(key) : [key]); + function isValidCidr(ip, version3) { + if ((version3 === "v4" || !version3) && ipv4CidrRegex.test(ip)) { + return true; } - }); - stack.pop(); - } - if (!utils_default.isObject(obj)) { - throw new TypeError("data must be an object"); - } - build(obj); - return formData; -} -var toFormData_default = toFormData; - -// node_modules/axios/lib/helpers/AxiosURLSearchParams.js -function encode(str) { - const charMap = { - "!": "%21", - "'": "%27", - "(": "%28", - ")": "%29", - "~": "%7E", - "%20": "+", - "%00": "\0" - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match2) { - return charMap[match2]; - }); -} -function AxiosURLSearchParams(params, options) { - this._pairs = []; - params && toFormData_default(params, this, options); -} -var prototype = AxiosURLSearchParams.prototype; -prototype.append = function append(name, value) { - this._pairs.push([name, value]); -}; -prototype.toString = function toString2(encoder) { - const _encode4 = encoder ? function(value) { - return encoder.call(this, value, encode); - } : encode; - return this._pairs.map(function each(pair) { - return _encode4(pair[0]) + "=" + _encode4(pair[1]); - }, "").join("&"); -}; -var AxiosURLSearchParams_default = AxiosURLSearchParams; - -// node_modules/axios/lib/helpers/buildURL.js -function encode2(val) { - return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); -} -function buildURL(url5, params, options) { - if (!params) { - return url5; - } - const _encode4 = options && options.encode || encode2; - const _options = utils_default.isFunction(options) ? { - serialize: options - } : options; - const serializeFn = _options && _options.serialize; - let serializedParams; - if (serializeFn) { - serializedParams = serializeFn(params, _options); - } else { - serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode4); - } - if (serializedParams) { - const hashmarkIndex = url5.indexOf("#"); - if (hashmarkIndex !== -1) { - url5 = url5.slice(0, hashmarkIndex); + if ((version3 === "v6" || !version3) && ipv6CidrRegex.test(ip)) { + return true; + } + return false; } - url5 += (url5.indexOf("?") === -1 ? "?" : "&") + serializedParams; - } - return url5; -} - -// node_modules/axios/lib/core/InterceptorManager.js -var InterceptorManager = class { - constructor() { - this.handlers = []; - } - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * @param {Object} options The options for the interceptor, synchronous and runWhen - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {void} - */ - eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - } - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - utils_default.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); + var ZodString3 = class _ZodString3 extends ZodType3 { + _parse(input) { + if (this._def.coerce) { + input.data = String(input.data); + } + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.string) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.string, + received: ctx2.parsedType + }); + return INVALID; + } + const status = new ParseStatus(); + let ctx = void 0; + for (const check3 of this._def.checks) { + if (check3.kind === "min") { + if (input.data.length < check3.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + minimum: check3.value, + type: "string", + inclusive: true, + exact: false, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "max") { + if (input.data.length > check3.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + maximum: check3.value, + type: "string", + inclusive: true, + exact: false, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "length") { + const tooBig = input.data.length > check3.value; + const tooSmall = input.data.length < check3.value; + if (tooBig || tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + if (tooBig) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + maximum: check3.value, + type: "string", + inclusive: true, + exact: true, + message: check3.message + }); + } else if (tooSmall) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + minimum: check3.value, + type: "string", + inclusive: true, + exact: true, + message: check3.message + }); + } + status.dirty(); + } + } else if (check3.kind === "email") { + if (!emailRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "email", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "emoji") { + if (!emojiRegex) { + emojiRegex = new RegExp(_emojiRegex, "u"); + } + if (!emojiRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "emoji", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "uuid") { + if (!uuidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "uuid", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "nanoid") { + if (!nanoidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "nanoid", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "cuid") { + if (!cuidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "cuid", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "cuid2") { + if (!cuid2Regex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "cuid2", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "ulid") { + if (!ulidRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "ulid", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "url") { + try { + new URL(input.data); + } catch (_a4) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "url", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "regex") { + check3.regex.lastIndex = 0; + const testResult = check3.regex.test(input.data); + if (!testResult) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "regex", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "trim") { + input.data = input.data.trim(); + } else if (check3.kind === "includes") { + if (!input.data.includes(check3.value, check3.position)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_string, + validation: { includes: check3.value, position: check3.position }, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "toLowerCase") { + input.data = input.data.toLowerCase(); + } else if (check3.kind === "toUpperCase") { + input.data = input.data.toUpperCase(); + } else if (check3.kind === "startsWith") { + if (!input.data.startsWith(check3.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_string, + validation: { startsWith: check3.value }, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "endsWith") { + if (!input.data.endsWith(check3.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_string, + validation: { endsWith: check3.value }, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "datetime") { + const regex2 = datetimeRegex(check3); + if (!regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_string, + validation: "datetime", + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "date") { + const regex2 = dateRegex; + if (!regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_string, + validation: "date", + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "time") { + const regex2 = timeRegex(check3); + if (!regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_string, + validation: "time", + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "duration") { + if (!durationRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "duration", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "ip") { + if (!isValidIP(input.data, check3.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "ip", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "jwt") { + if (!isValidJWT3(input.data, check3.alg)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "jwt", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "cidr") { + if (!isValidCidr(input.data, check3.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "cidr", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "base64") { + if (!base64Regex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "base64", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "base64url") { + if (!base64urlRegex.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + validation: "base64url", + code: ZodIssueCode3.invalid_string, + message: check3.message + }); + status.dirty(); + } + } else { + util3.assertNever(check3); + } + } + return { status: status.value, value: input.data }; } - }); - } -}; -var InterceptorManager_default = InterceptorManager; - -// node_modules/axios/lib/defaults/transitional.js -var transitional_default = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false, - legacyInterceptorReqResOrdering: true -}; - -// node_modules/axios/lib/platform/node/index.js -import crypto2 from "crypto"; - -// node_modules/axios/lib/platform/node/classes/URLSearchParams.js -import url from "url"; -var URLSearchParams_default = url.URLSearchParams; - -// node_modules/axios/lib/platform/node/index.js -var ALPHA = "abcdefghijklmnopqrstuvwxyz"; -var DIGIT = "0123456789"; -var ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; -var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ""; - const { length } = alphabet; - const randomValues = new Uint32Array(size); - crypto2.randomFillSync(randomValues); - for (let i = 0; i < size; i++) { - str += alphabet[randomValues[i] % length]; - } - return str; -}; -var node_default = { - isNode: true, - classes: { - URLSearchParams: URLSearchParams_default, - FormData: FormData_default, - Blob: typeof Blob !== "undefined" && Blob || null - }, - ALPHABET, - generateString, - protocols: ["http", "https", "file", "data"] -}; - -// node_modules/axios/lib/platform/common/utils.js -var utils_exports = {}; -__export(utils_exports, { - hasBrowserEnv: () => hasBrowserEnv, - hasStandardBrowserEnv: () => hasStandardBrowserEnv, - hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, - navigator: () => _navigator, - origin: () => origin -}); -var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; -var _navigator = typeof navigator === "object" && navigator || void 0; -var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); -var hasStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; -})(); -var origin = hasBrowserEnv && window.location.href || "http://localhost"; - -// node_modules/axios/lib/platform/index.js -var platform_default = { - ...utils_exports, - ...node_default -}; - -// node_modules/axios/lib/helpers/toURLEncodedForm.js -function toURLEncodedForm(data, options) { - return toFormData_default(data, new platform_default.classes.URLSearchParams(), { - visitor: function(value, key, path, helpers) { - if (platform_default.isNode && utils_default.isBuffer(value)) { - this.append(key, value.toString("base64")); - return false; + _regex(regex2, validation, message2) { + return this.refinement((data) => regex2.test(data), { + validation, + code: ZodIssueCode3.invalid_string, + ...errorUtil.errToObj(message2) + }); } - return helpers.defaultVisitor.apply(this, arguments); - }, - ...options - }); -} - -// node_modules/axios/lib/helpers/formDataToJSON.js -function parsePropPath(name) { - return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => { - return match2[0] === "[]" ? "" : match2[1] || match2[0]; - }); -} -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name = path[index++]; - if (name === "__proto__") return true; - const isNumericKey = Number.isFinite(+name); - const isLast = index >= path.length; - name = !name && utils_default.isArray(target) ? target.length : name; - if (isLast) { - if (utils_default.hasOwnProp(target, name)) { - target[name] = [target[name], value]; - } else { - target[name] = value; + _addCheck(check3) { + return new _ZodString3({ + ...this._def, + checks: [...this._def.checks, check3] + }); } - return !isNumericKey; - } - if (!target[name] || !utils_default.isObject(target[name])) { - target[name] = []; - } - const result = buildPath(path, value, target[name], index); - if (result && utils_default.isArray(target[name])) { - target[name] = arrayToObject(target[name]); - } - return !isNumericKey; - } - if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { - const obj = {}; - utils_default.forEachEntry(formData, (name, value) => { - buildPath(parsePropPath(name), value, obj, 0); - }); - return obj; - } - return null; -} -var formDataToJSON_default = formDataToJSON; - -// node_modules/axios/lib/defaults/index.js -function stringifySafely(rawValue, parser, encoder) { - if (utils_default.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils_default.trim(rawValue); - } catch (e) { - if (e.name !== "SyntaxError") { - throw e; + email(message2) { + return this._addCheck({ kind: "email", ...errorUtil.errToObj(message2) }); } - } - } - return (encoder || JSON.stringify)(rawValue); -} -var defaults = { - transitional: transitional_default, - adapter: ["xhr", "http", "fetch"], - transformRequest: [ - function transformRequest(data, headers) { - const contentType = headers.getContentType() || ""; - const hasJSONContentType = contentType.indexOf("application/json") > -1; - const isObjectPayload = utils_default.isObject(data); - if (isObjectPayload && utils_default.isHTMLForm(data)) { - data = new FormData(data); + url(message2) { + return this._addCheck({ kind: "url", ...errorUtil.errToObj(message2) }); } - const isFormData2 = utils_default.isFormData(data); - if (isFormData2) { - return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; + emoji(message2) { + return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message2) }); } - if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { - return data; + uuid(message2) { + return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message2) }); } - if (utils_default.isArrayBufferView(data)) { - return data.buffer; + nanoid(message2) { + return this._addCheck({ kind: "nanoid", ...errorUtil.errToObj(message2) }); } - if (utils_default.isURLSearchParams(data)) { - headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); - return data.toString(); + cuid(message2) { + return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message2) }); } - let isFileList2; - if (isObjectPayload) { - if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } - if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { - const _FormData = this.env && this.env.FormData; - return toFormData_default( - isFileList2 ? { "files[]": data } : data, - _FormData && new _FormData(), - this.formSerializer - ); - } + cuid2(message2) { + return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message2) }); } - if (isObjectPayload || hasJSONContentType) { - headers.setContentType("application/json", false); - return stringifySafely(data); + ulid(message2) { + return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message2) }); } - return data; - } - ], - transformResponse: [ - function transformResponse(data) { - const transitional2 = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; - const JSONRequested = this.responseType === "json"; - if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { - return data; + base64(message2) { + return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message2) }); } - if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { - const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - try { - return JSON.parse(data, this.parseReviver); - } catch (e) { - if (strictJSONParsing) { - if (e.name === "SyntaxError") { - throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } + base64url(message2) { + return this._addCheck({ + kind: "base64url", + ...errorUtil.errToObj(message2) + }); } - return data; - } - ], - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - xsrfCookieName: "XSRF-TOKEN", - xsrfHeaderName: "X-XSRF-TOKEN", - maxContentLength: -1, - maxBodyLength: -1, - env: { - FormData: platform_default.classes.FormData, - Blob: platform_default.classes.Blob - }, - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - headers: { - common: { - Accept: "application/json, text/plain, */*", - "Content-Type": void 0 - } - } -}; -utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { - defaults.headers[method] = {}; -}); -var defaults_default = defaults; - -// node_modules/axios/lib/helpers/parseHeaders.js -var ignoreDuplicateOf = utils_default.toObjectSet([ - "age", - "authorization", - "content-length", - "content-type", - "etag", - "expires", - "from", - "host", - "if-modified-since", - "if-unmodified-since", - "last-modified", - "location", - "max-forwards", - "proxy-authorization", - "referer", - "retry-after", - "user-agent" -]); -var parseHeaders_default = (rawHeaders) => { - const parsed = {}; - let key; - let val; - let i; - rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { - i = line.indexOf(":"); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - if (!key || parsed[key] && ignoreDuplicateOf[key]) { - return; - } - if (key === "set-cookie") { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; + jwt(options) { + return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) }); } - } else { - parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; - } - }); - return parsed; -}; - -// node_modules/axios/lib/core/AxiosHeaders.js -var $internals = /* @__PURE__ */ Symbol("internals"); -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); -} -function parseTokens(str) { - const tokens = /* @__PURE__ */ Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match2; - while (match2 = tokensRE.exec(str)) { - tokens[match2[1]] = match2[2]; - } - return tokens; -} -var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); -function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) { - if (utils_default.isFunction(filter2)) { - return filter2.call(this, value, header); - } - if (isHeaderNameFilter) { - value = header; - } - if (!utils_default.isString(value)) return; - if (utils_default.isString(filter2)) { - return value.indexOf(filter2) !== -1; - } - if (utils_default.isRegExp(filter2)) { - return filter2.test(value); - } -} -function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} -function buildAccessors(obj, header) { - const accessorName = utils_default.toCamelCase(" " + header); - ["get", "set", "has"].forEach((methodName) => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} -var AxiosHeaders = class { - constructor(headers) { - headers && this.set(headers); - } - set(header, valueOrRewrite, rewrite) { - const self2 = this; - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - if (!lHeader) { - throw new Error("header name must be a non-empty string"); + ip(options) { + return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) }); } - const key = utils_default.findKey(self2, lHeader); - if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { - self2[key || _header] = normalizeValue(_value); + cidr(options) { + return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) }); } - } - const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - if (utils_default.isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite); - } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders(parseHeaders_default(header), valueOrRewrite); - } else if (utils_default.isObject(header) && utils_default.isIterable(header)) { - let obj = {}, dest, key; - for (const entry of header) { - if (!utils_default.isArray(entry)) { - throw TypeError("Object iterator must return a key-value pair"); + datetime(options) { + var _a4, _b; + if (typeof options === "string") { + return this._addCheck({ + kind: "datetime", + precision: null, + offset: false, + local: false, + message: options + }); } - obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1]; + return this._addCheck({ + kind: "datetime", + precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision, + offset: (_a4 = options === null || options === void 0 ? void 0 : options.offset) !== null && _a4 !== void 0 ? _a4 : false, + local: (_b = options === null || options === void 0 ? void 0 : options.local) !== null && _b !== void 0 ? _b : false, + ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) + }); } - setHeaders(obj, valueOrRewrite); - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - return this; - } - get(header, parser) { - header = normalizeHeader(header); - if (header) { - const key = utils_default.findKey(this, header); - if (key) { - const value = this[key]; - if (!parser) { - return value; - } - if (parser === true) { - return parseTokens(value); - } - if (utils_default.isFunction(parser)) { - return parser.call(this, value, key); - } - if (utils_default.isRegExp(parser)) { - return parser.exec(value); + date(message2) { + return this._addCheck({ kind: "date", message: message2 }); + } + time(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "time", + precision: null, + message: options + }); } - throw new TypeError("parser must be boolean|regexp|function"); + return this._addCheck({ + kind: "time", + precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision, + ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) + }); } - } - } - has(header, matcher) { - header = normalizeHeader(header); - if (header) { - const key = utils_default.findKey(this, header); - return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - return false; - } - delete(header, matcher) { - const self2 = this; - let deleted = false; - function deleteHeader(_header) { - _header = normalizeHeader(_header); - if (_header) { - const key = utils_default.findKey(self2, _header); - if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { - delete self2[key]; - deleted = true; - } + duration(message2) { + return this._addCheck({ kind: "duration", ...errorUtil.errToObj(message2) }); } - } - if (utils_default.isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - return deleted; - } - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - while (i--) { - const key = keys[i]; - if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; + regex(regex2, message2) { + return this._addCheck({ + kind: "regex", + regex: regex2, + ...errorUtil.errToObj(message2) + }); } - } - return deleted; - } - normalize(format2) { - const self2 = this; - const headers = {}; - utils_default.forEach(this, (value, header) => { - const key = utils_default.findKey(headers, header); - if (key) { - self2[key] = normalizeValue(value); - delete self2[header]; - return; + includes(value, options) { + return this._addCheck({ + kind: "includes", + value, + position: options === null || options === void 0 ? void 0 : options.position, + ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message) + }); } - const normalized = format2 ? formatHeader(header) : String(header).trim(); - if (normalized !== header) { - delete self2[header]; + startsWith(value, message2) { + return this._addCheck({ + kind: "startsWith", + value, + ...errorUtil.errToObj(message2) + }); } - self2[normalized] = normalizeValue(value); - headers[normalized] = true; - }); - return this; - } - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - toJSON(asStrings) { - const obj = /* @__PURE__ */ Object.create(null); - utils_default.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); - }); - return obj; - } - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); - } - getSetCookie() { - return this.get("set-cookie") || []; - } - get [Symbol.toStringTag]() { - return "AxiosHeaders"; - } - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - static concat(first, ...targets) { - const computed = new this(first); - targets.forEach((target) => computed.set(target)); - return computed; - } - static accessor(header) { - const internals = this[$internals] = this[$internals] = { - accessors: {} - }; - const accessors = internals.accessors; - const prototype2 = this.prototype; - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - if (!accessors[lHeader]) { - buildAccessors(prototype2, _header); - accessors[lHeader] = true; + endsWith(value, message2) { + return this._addCheck({ + kind: "endsWith", + value, + ...errorUtil.errToObj(message2) + }); } - } - utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - return this; - } -}; -AxiosHeaders.accessor([ - "Content-Type", - "Content-Length", - "Accept", - "Accept-Encoding", - "User-Agent", - "Authorization" -]); -utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { - let mapped = key[0].toUpperCase() + key.slice(1); - return { - get: () => value, - set(headerValue) { - this[mapped] = headerValue; - } - }; -}); -utils_default.freezeMethods(AxiosHeaders); -var AxiosHeaders_default = AxiosHeaders; - -// node_modules/axios/lib/core/transformData.js -function transformData(fns, response) { - const config4 = this || defaults_default; - const context3 = response || config4; - const headers = AxiosHeaders_default.from(context3.headers); - let data = context3.data; - utils_default.forEach(fns, function transform4(fn) { - data = fn.call(config4, data, headers.normalize(), response ? response.status : void 0); - }); - headers.normalize(); - return data; -} - -// node_modules/axios/lib/cancel/isCancel.js -function isCancel(value) { - return !!(value && value.__CANCEL__); -} - -// node_modules/axios/lib/cancel/CanceledError.js -var CanceledError = class extends AxiosError_default { - /** - * A `CanceledError` is an object that is thrown when an operation is canceled. - * - * @param {string=} message The message. - * @param {Object=} config The config. - * @param {Object=} request The request. - * - * @returns {CanceledError} The created error. - */ - constructor(message2, config4, request3) { - super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config4, request3); - this.name = "CanceledError"; - this.__CANCEL__ = true; - } -}; -var CanceledError_default = CanceledError; - -// node_modules/axios/lib/core/settle.js -function settle(resolve, reject, response) { - const validateStatus2 = response.config.validateStatus; - if (!response.status || !validateStatus2 || validateStatus2(response.status)) { - resolve(response); - } else { - reject( - new AxiosError_default( - "Request failed with status code " + response.status, - [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - ) - ); - } -} - -// node_modules/axios/lib/helpers/isAbsoluteURL.js -function isAbsoluteURL(url5) { - if (typeof url5 !== "string") { - return false; - } - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url5); -} - -// node_modules/axios/lib/helpers/combineURLs.js -function combineURLs(baseURL, relativeURL) { - return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; -} - -// node_modules/axios/lib/core/buildFullPath.js -function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { - let isRelativeUrl = !isAbsoluteURL(requestedURL); - if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -} - -// node_modules/axios/lib/adapters/http.js -var import_proxy_from_env = __toESM(require_proxy_from_env(), 1); -var import_follow_redirects = __toESM(require_follow_redirects(), 1); -import http from "http"; -import https from "https"; -import http2 from "http2"; -import util2 from "util"; -import zlib from "zlib"; - -// node_modules/axios/lib/env/data.js -var VERSION = "1.13.6"; - -// node_modules/axios/lib/helpers/parseProtocol.js -function parseProtocol(url5) { - const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url5); - return match2 && match2[1] || ""; -} - -// node_modules/axios/lib/helpers/fromDataURI.js -var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; -function fromDataURI(uri, asBlob, options) { - const _Blob = options && options.Blob || platform_default.classes.Blob; - const protocol = parseProtocol(uri); - if (asBlob === void 0 && _Blob) { - asBlob = true; - } - if (protocol === "data") { - uri = protocol.length ? uri.slice(protocol.length + 1) : uri; - const match2 = DATA_URL_PATTERN.exec(uri); - if (!match2) { - throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL); - } - const mime = match2[1]; - const isBase64 = match2[2]; - const body = match2[3]; - const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8"); - if (asBlob) { - if (!_Blob) { - throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT); + min(minLength, message2) { + return this._addCheck({ + kind: "min", + value: minLength, + ...errorUtil.errToObj(message2) + }); } - return new _Blob([buffer], { type: mime }); - } - return buffer; - } - throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT); -} - -// node_modules/axios/lib/adapters/http.js -import stream3 from "stream"; - -// node_modules/axios/lib/helpers/AxiosTransformStream.js -import stream from "stream"; -var kInternals = /* @__PURE__ */ Symbol("internals"); -var AxiosTransformStream = class extends stream.Transform { - constructor(options) { - options = utils_default.toFlatObject( - options, - { - maxRate: 0, - chunkSize: 64 * 1024, - minChunkSize: 100, - timeWindow: 500, - ticksRate: 2, - samplesCount: 15 - }, - null, - (prop, source) => { - return !utils_default.isUndefined(source[prop]); + max(maxLength, message2) { + return this._addCheck({ + kind: "max", + value: maxLength, + ...errorUtil.errToObj(message2) + }); + } + length(len, message2) { + return this._addCheck({ + kind: "length", + value: len, + ...errorUtil.errToObj(message2) + }); + } + /** + * Equivalent to `.min(1)` + */ + nonempty(message2) { + return this.min(1, errorUtil.errToObj(message2)); + } + trim() { + return new _ZodString3({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }); + } + toLowerCase() { + return new _ZodString3({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }); + } + toUpperCase() { + return new _ZodString3({ + ...this._def, + checks: [...this._def.checks, { kind: "toUpperCase" }] + }); + } + get isDatetime() { + return !!this._def.checks.find((ch) => ch.kind === "datetime"); + } + get isDate() { + return !!this._def.checks.find((ch) => ch.kind === "date"); + } + get isTime() { + return !!this._def.checks.find((ch) => ch.kind === "time"); + } + get isDuration() { + return !!this._def.checks.find((ch) => ch.kind === "duration"); + } + get isEmail() { + return !!this._def.checks.find((ch) => ch.kind === "email"); + } + get isURL() { + return !!this._def.checks.find((ch) => ch.kind === "url"); + } + get isEmoji() { + return !!this._def.checks.find((ch) => ch.kind === "emoji"); + } + get isUUID() { + return !!this._def.checks.find((ch) => ch.kind === "uuid"); + } + get isNANOID() { + return !!this._def.checks.find((ch) => ch.kind === "nanoid"); + } + get isCUID() { + return !!this._def.checks.find((ch) => ch.kind === "cuid"); + } + get isCUID2() { + return !!this._def.checks.find((ch) => ch.kind === "cuid2"); + } + get isULID() { + return !!this._def.checks.find((ch) => ch.kind === "ulid"); + } + get isIP() { + return !!this._def.checks.find((ch) => ch.kind === "ip"); + } + get isCIDR() { + return !!this._def.checks.find((ch) => ch.kind === "cidr"); + } + get isBase64() { + return !!this._def.checks.find((ch) => ch.kind === "base64"); + } + get isBase64url() { + return !!this._def.checks.find((ch) => ch.kind === "base64url"); + } + get minLength() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxLength() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; } - ); - super({ - readableHighWaterMark: options.chunkSize - }); - const internals = this[kInternals] = { - timeWindow: options.timeWindow, - chunkSize: options.chunkSize, - maxRate: options.maxRate, - minChunkSize: options.minChunkSize, - bytesSeen: 0, - isCaptured: false, - notifiedBytesLoaded: 0, - ts: Date.now(), - bytes: 0, - onReadCallback: null }; - this.on("newListener", (event) => { - if (event === "progress") { - if (!internals.isCaptured) { - internals.isCaptured = true; + ZodString3.create = (params) => { + var _a4; + return new ZodString3({ + checks: [], + typeName: ZodFirstPartyTypeKind3.ZodString, + coerce: (_a4 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a4 !== void 0 ? _a4 : false, + ...processCreateParams(params) + }); + }; + function floatSafeRemainder3(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepDecCount = (step.toString().split(".")[1] || "").length; + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / Math.pow(10, decCount); + } + var ZodNumber3 = class _ZodNumber extends ZodType3 { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + this.step = this.multipleOf; + } + _parse(input) { + if (this._def.coerce) { + input.data = Number(input.data); + } + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.number) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.number, + received: ctx2.parsedType + }); + return INVALID; + } + let ctx = void 0; + const status = new ParseStatus(); + for (const check3 of this._def.checks) { + if (check3.kind === "int") { + if (!util3.isInteger(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: "integer", + received: "float", + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "min") { + const tooSmall = check3.inclusive ? input.data < check3.value : input.data <= check3.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + minimum: check3.value, + type: "number", + inclusive: check3.inclusive, + exact: false, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "max") { + const tooBig = check3.inclusive ? input.data > check3.value : input.data >= check3.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + maximum: check3.value, + type: "number", + inclusive: check3.inclusive, + exact: false, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "multipleOf") { + if (floatSafeRemainder3(input.data, check3.value) !== 0) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.not_multiple_of, + multipleOf: check3.value, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "finite") { + if (!Number.isFinite(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.not_finite, + message: check3.message + }); + status.dirty(); + } + } else { + util3.assertNever(check3); + } } + return { status: status.value, value: input.data }; } - }); - } - _read(size) { - const internals = this[kInternals]; - if (internals.onReadCallback) { - internals.onReadCallback(); - } - return super._read(size); - } - _transform(chunk, encoding, callback) { - const internals = this[kInternals]; - const maxRate = internals.maxRate; - const readableHighWaterMark = this.readableHighWaterMark; - const timeWindow = internals.timeWindow; - const divider = 1e3 / timeWindow; - const bytesThreshold = maxRate / divider; - const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; - const pushChunk = (_chunk, _callback) => { - const bytes = Buffer.byteLength(_chunk); - internals.bytesSeen += bytes; - internals.bytes += bytes; - internals.isCaptured && this.emit("progress", internals.bytesSeen); - if (this.push(_chunk)) { - process.nextTick(_callback); - } else { - internals.onReadCallback = () => { - internals.onReadCallback = null; - process.nextTick(_callback); - }; + gte(value, message2) { + return this.setLimit("min", value, true, errorUtil.toString(message2)); + } + gt(value, message2) { + return this.setLimit("min", value, false, errorUtil.toString(message2)); + } + lte(value, message2) { + return this.setLimit("max", value, true, errorUtil.toString(message2)); + } + lt(value, message2) { + return this.setLimit("max", value, false, errorUtil.toString(message2)); + } + setLimit(kind, value, inclusive, message2) { + return new _ZodNumber({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value, + inclusive, + message: errorUtil.toString(message2) + } + ] + }); + } + _addCheck(check3) { + return new _ZodNumber({ + ...this._def, + checks: [...this._def.checks, check3] + }); + } + int(message2) { + return this._addCheck({ + kind: "int", + message: errorUtil.toString(message2) + }); + } + positive(message2) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: false, + message: errorUtil.toString(message2) + }); + } + negative(message2) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: false, + message: errorUtil.toString(message2) + }); + } + nonpositive(message2) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: true, + message: errorUtil.toString(message2) + }); + } + nonnegative(message2) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: true, + message: errorUtil.toString(message2) + }); + } + multipleOf(value, message2) { + return this._addCheck({ + kind: "multipleOf", + value, + message: errorUtil.toString(message2) + }); + } + finite(message2) { + return this._addCheck({ + kind: "finite", + message: errorUtil.toString(message2) + }); + } + safe(message2) { + return this._addCheck({ + kind: "min", + inclusive: true, + value: Number.MIN_SAFE_INTEGER, + message: errorUtil.toString(message2) + })._addCheck({ + kind: "max", + inclusive: true, + value: Number.MAX_SAFE_INTEGER, + message: errorUtil.toString(message2) + }); + } + get minValue() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min; + } + get maxValue() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max; + } + get isInt() { + return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util3.isInteger(ch.value)); + } + get isFinite() { + let max = null, min = null; + for (const ch of this._def.checks) { + if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") { + return true; + } else if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } else if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return Number.isFinite(min) && Number.isFinite(max); } }; - const transformChunk = (_chunk, _callback) => { - const chunkSize = Buffer.byteLength(_chunk); - let chunkRemainder = null; - let maxChunkSize = readableHighWaterMark; - let bytesLeft; - let passed = 0; - if (maxRate) { - const now = Date.now(); - if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { - internals.ts = now; - bytesLeft = bytesThreshold - internals.bytes; - internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; - passed = 0; + ZodNumber3.create = (params) => { + return new ZodNumber3({ + checks: [], + typeName: ZodFirstPartyTypeKind3.ZodNumber, + coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false, + ...processCreateParams(params) + }); + }; + var ZodBigInt3 = class _ZodBigInt extends ZodType3 { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + } + _parse(input) { + if (this._def.coerce) { + try { + input.data = BigInt(input.data); + } catch (_a4) { + return this._getInvalidInput(input); + } + } + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.bigint) { + return this._getInvalidInput(input); + } + let ctx = void 0; + const status = new ParseStatus(); + for (const check3 of this._def.checks) { + if (check3.kind === "min") { + const tooSmall = check3.inclusive ? input.data < check3.value : input.data <= check3.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + type: "bigint", + minimum: check3.value, + inclusive: check3.inclusive, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "max") { + const tooBig = check3.inclusive ? input.data > check3.value : input.data >= check3.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + type: "bigint", + maximum: check3.value, + inclusive: check3.inclusive, + message: check3.message + }); + status.dirty(); + } + } else if (check3.kind === "multipleOf") { + if (input.data % check3.value !== BigInt(0)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.not_multiple_of, + multipleOf: check3.value, + message: check3.message + }); + status.dirty(); + } + } else { + util3.assertNever(check3); + } } - bytesLeft = bytesThreshold - internals.bytes; + return { status: status.value, value: input.data }; } - if (maxRate) { - if (bytesLeft <= 0) { - return setTimeout(() => { - _callback(null, _chunk); - }, timeWindow - passed); + _getInvalidInput(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.bigint, + received: ctx.parsedType + }); + return INVALID; + } + gte(value, message2) { + return this.setLimit("min", value, true, errorUtil.toString(message2)); + } + gt(value, message2) { + return this.setLimit("min", value, false, errorUtil.toString(message2)); + } + lte(value, message2) { + return this.setLimit("max", value, true, errorUtil.toString(message2)); + } + lt(value, message2) { + return this.setLimit("max", value, false, errorUtil.toString(message2)); + } + setLimit(kind, value, inclusive, message2) { + return new _ZodBigInt({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value, + inclusive, + message: errorUtil.toString(message2) + } + ] + }); + } + _addCheck(check3) { + return new _ZodBigInt({ + ...this._def, + checks: [...this._def.checks, check3] + }); + } + positive(message2) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: false, + message: errorUtil.toString(message2) + }); + } + negative(message2) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: false, + message: errorUtil.toString(message2) + }); + } + nonpositive(message2) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: true, + message: errorUtil.toString(message2) + }); + } + nonnegative(message2) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: true, + message: errorUtil.toString(message2) + }); + } + multipleOf(value, message2) { + return this._addCheck({ + kind: "multipleOf", + value, + message: errorUtil.toString(message2) + }); + } + get minValue() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } } - if (bytesLeft < maxChunkSize) { - maxChunkSize = bytesLeft; + return min; + } + get maxValue() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } } + return max; } - if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { - chunkRemainder = _chunk.subarray(maxChunkSize); - _chunk = _chunk.subarray(0, maxChunkSize); + }; + ZodBigInt3.create = (params) => { + var _a4; + return new ZodBigInt3({ + checks: [], + typeName: ZodFirstPartyTypeKind3.ZodBigInt, + coerce: (_a4 = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a4 !== void 0 ? _a4 : false, + ...processCreateParams(params) + }); + }; + var ZodBoolean3 = class extends ZodType3 { + _parse(input) { + if (this._def.coerce) { + input.data = Boolean(input.data); + } + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.boolean) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.boolean, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); } - pushChunk( - _chunk, - chunkRemainder ? () => { - process.nextTick(_callback, null, chunkRemainder); - } : _callback - ); }; - transformChunk(chunk, function transformNextChunk(err, _chunk) { - if (err) { - return callback(err); + ZodBoolean3.create = (params) => { + return new ZodBoolean3({ + typeName: ZodFirstPartyTypeKind3.ZodBoolean, + coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false, + ...processCreateParams(params) + }); + }; + var ZodDate3 = class _ZodDate extends ZodType3 { + _parse(input) { + if (this._def.coerce) { + input.data = new Date(input.data); + } + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.date) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.date, + received: ctx2.parsedType + }); + return INVALID; + } + if (isNaN(input.data.getTime())) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode3.invalid_date + }); + return INVALID; + } + const status = new ParseStatus(); + let ctx = void 0; + for (const check3 of this._def.checks) { + if (check3.kind === "min") { + if (input.data.getTime() < check3.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + message: check3.message, + inclusive: true, + exact: false, + minimum: check3.value, + type: "date" + }); + status.dirty(); + } + } else if (check3.kind === "max") { + if (input.data.getTime() > check3.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + message: check3.message, + inclusive: true, + exact: false, + maximum: check3.value, + type: "date" + }); + status.dirty(); + } + } else { + util3.assertNever(check3); + } + } + return { + status: status.value, + value: new Date(input.data.getTime()) + }; } - if (_chunk) { - transformChunk(_chunk, transformNextChunk); - } else { - callback(null); + _addCheck(check3) { + return new _ZodDate({ + ...this._def, + checks: [...this._def.checks, check3] + }); } - }); - } -}; -var AxiosTransformStream_default = AxiosTransformStream; - -// node_modules/axios/lib/adapters/http.js -import { EventEmitter } from "events"; - -// node_modules/axios/lib/helpers/formDataToStream.js -import util from "util"; -import { Readable } from "stream"; - -// node_modules/axios/lib/helpers/readBlob.js -var { asyncIterator } = Symbol; -var readBlob = async function* (blob) { - if (blob.stream) { - yield* blob.stream(); - } else if (blob.arrayBuffer) { - yield await blob.arrayBuffer(); - } else if (blob[asyncIterator]) { - yield* blob[asyncIterator](); - } else { - yield blob; - } -}; -var readBlob_default = readBlob; - -// node_modules/axios/lib/helpers/formDataToStream.js -var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_"; -var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder(); -var CRLF = "\r\n"; -var CRLF_BYTES = textEncoder.encode(CRLF); -var CRLF_BYTES_COUNT = 2; -var FormDataPart = class { - constructor(name, value) { - const { escapeName } = this.constructor; - const isStringValue = utils_default.isString(value); - let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`; - if (isStringValue) { - value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); - } else { - headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`; - } - this.headers = textEncoder.encode(headers + CRLF); - this.contentLength = isStringValue ? value.byteLength : value.size; - this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; - this.name = name; - this.value = value; - } - async *encode() { - yield this.headers; - const { value } = this; - if (utils_default.isTypedArray(value)) { - yield value; - } else { - yield* readBlob_default(value); - } - yield CRLF_BYTES; - } - static escapeName(name) { - return String(name).replace( - /[\r\n"]/g, - (match2) => ({ - "\r": "%0D", - "\n": "%0A", - '"': "%22" - })[match2] - ); - } -}; -var formDataToStream = (form, headersHandler, options) => { - const { - tag = "form-data-boundary", - size = 25, - boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) - } = options || {}; - if (!utils_default.isFormData(form)) { - throw TypeError("FormData instance required"); - } - if (boundary.length < 1 || boundary.length > 70) { - throw Error("boundary must be 10-70 characters long"); - } - const boundaryBytes = textEncoder.encode("--" + boundary + CRLF); - const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF); - let contentLength = footerBytes.byteLength; - const parts = Array.from(form.entries()).map(([name, value]) => { - const part = new FormDataPart(name, value); - contentLength += part.size; - return part; - }); - contentLength += boundaryBytes.byteLength * parts.length; - contentLength = utils_default.toFiniteNumber(contentLength); - const computedHeaders = { - "Content-Type": `multipart/form-data; boundary=${boundary}` - }; - if (Number.isFinite(contentLength)) { - computedHeaders["Content-Length"] = contentLength; - } - headersHandler && headersHandler(computedHeaders); - return Readable.from( - (async function* () { - for (const part of parts) { - yield boundaryBytes; - yield* part.encode(); + min(minDate, message2) { + return this._addCheck({ + kind: "min", + value: minDate.getTime(), + message: errorUtil.toString(message2) + }); } - yield footerBytes; - })() - ); -}; -var formDataToStream_default = formDataToStream; - -// node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js -import stream2 from "stream"; -var ZlibHeaderTransformStream = class extends stream2.Transform { - __transform(chunk, encoding, callback) { - this.push(chunk); - callback(); - } - _transform(chunk, encoding, callback) { - if (chunk.length !== 0) { - this._transform = this.__transform; - if (chunk[0] !== 120) { - const header = Buffer.alloc(2); - header[0] = 120; - header[1] = 156; - this.push(header, encoding); + max(maxDate, message2) { + return this._addCheck({ + kind: "max", + value: maxDate.getTime(), + message: errorUtil.toString(message2) + }); } - } - this.__transform(chunk, encoding, callback); - } -}; -var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; - -// node_modules/axios/lib/helpers/callbackify.js -var callbackify = (fn, reducer) => { - return utils_default.isAsyncFn(fn) ? function(...args) { - const cb = args.pop(); - fn.apply(this, args).then((value) => { - try { - reducer ? cb(null, ...reducer(value)) : cb(null, value); - } catch (err) { - cb(err); + get minDate() { + let min = null; + for (const ch of this._def.checks) { + if (ch.kind === "min") { + if (min === null || ch.value > min) + min = ch.value; + } + } + return min != null ? new Date(min) : null; } - }, cb); - } : fn; -}; -var callbackify_default = callbackify; - -// node_modules/axios/lib/helpers/speedometer.js -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - min = min !== void 0 ? min : 1e3; - return function push(chunkLength) { - const now = Date.now(); - const startedAt = timestamps[tail]; - if (!firstSampleTS) { - firstSampleTS = now; - } - bytes[head] = chunkLength; - timestamps[head] = now; - let i = tail; - let bytesCount = 0; - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - head = (head + 1) % samplesCount; - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - if (now - firstSampleTS < min) { - return; - } - const passed = startedAt && now - startedAt; - return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; - }; -} -var speedometer_default = speedometer; - -// node_modules/axios/lib/helpers/throttle.js -function throttle(fn, freq) { - let timestamp = 0; - let threshold = 1e3 / freq; - let lastArgs; - let timer; - const invoke = (args, now = Date.now()) => { - timestamp = now; - lastArgs = null; - if (timer) { - clearTimeout(timer); - timer = null; - } - fn(...args); - }; - const throttled = (...args) => { - const now = Date.now(); - const passed = now - timestamp; - if (passed >= threshold) { - invoke(args, now); - } else { - lastArgs = args; - if (!timer) { - timer = setTimeout(() => { - timer = null; - invoke(lastArgs); - }, threshold - passed); + get maxDate() { + let max = null; + for (const ch of this._def.checks) { + if (ch.kind === "max") { + if (max === null || ch.value < max) + max = ch.value; + } + } + return max != null ? new Date(max) : null; } - } - }; - const flush = () => lastArgs && invoke(lastArgs); - return [throttled, flush]; -} -var throttle_default = throttle; - -// node_modules/axios/lib/helpers/progressEventReducer.js -var progressEventReducer = (listener, isDownloadStream, freq = 3) => { - let bytesNotified = 0; - const _speedometer = speedometer_default(50, 250); - return throttle_default((e) => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : void 0; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - bytesNotified = loaded; - const data = { - loaded, - total, - progress: total ? loaded / total : void 0, - bytes: progressBytes, - rate: rate ? rate : void 0, - estimated: rate && total && inRange ? (total - loaded) / rate : void 0, - event: e, - lengthComputable: total != null, - [isDownloadStream ? "download" : "upload"]: true }; - listener(data); - }, freq); -}; -var progressEventDecorator = (total, throttled) => { - const lengthComputable = total != null; - return [ - (loaded) => throttled[0]({ - lengthComputable, - total, - loaded - }), - throttled[1] - ]; -}; -var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args)); - -// node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js -function estimateDataURLDecodedBytes(url5) { - if (!url5 || typeof url5 !== "string") return 0; - if (!url5.startsWith("data:")) return 0; - const comma = url5.indexOf(","); - if (comma < 0) return 0; - const meta6 = url5.slice(5, comma); - const body = url5.slice(comma + 1); - const isBase64 = /;base64/i.test(meta6); - if (isBase64) { - let effectiveLen = body.length; - const len = body.length; - for (let i = 0; i < len; i++) { - if (body.charCodeAt(i) === 37 && i + 2 < len) { - const a = body.charCodeAt(i + 1); - const b = body.charCodeAt(i + 2); - const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102); - if (isHex) { - effectiveLen -= 2; - i += 2; + ZodDate3.create = (params) => { + return new ZodDate3({ + checks: [], + coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false, + typeName: ZodFirstPartyTypeKind3.ZodDate, + ...processCreateParams(params) + }); + }; + var ZodSymbol3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.symbol) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.symbol, + received: ctx.parsedType + }); + return INVALID; } + return OK(input.data); } - } - let pad = 0; - let idx = len - 1; - const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%' - body.charCodeAt(j - 1) === 51 && // '3' - (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); - if (idx >= 0) { - if (body.charCodeAt(idx) === 61) { - pad++; - idx--; - } else if (tailIsPct3D(idx)) { - pad++; - idx -= 3; - } - } - if (pad === 1 && idx >= 0) { - if (body.charCodeAt(idx) === 61) { - pad++; - } else if (tailIsPct3D(idx)) { - pad++; + }; + ZodSymbol3.create = (params) => { + return new ZodSymbol3({ + typeName: ZodFirstPartyTypeKind3.ZodSymbol, + ...processCreateParams(params) + }); + }; + var ZodUndefined3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.undefined, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); } - } - const groups2 = Math.floor(effectiveLen / 4); - const bytes = groups2 * 3 - (pad || 0); - return bytes > 0 ? bytes : 0; - } - return Buffer.byteLength(body, "utf8"); -} - -// node_modules/axios/lib/adapters/http.js -var zlibOptions = { - flush: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH -}; -var brotliOptions = { - flush: zlib.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH -}; -var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress); -var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default; -var isHttps = /https:?/; -var supportedProtocols = platform_default.protocols.map((protocol) => { - return protocol + ":"; -}); -var flushOnFinish = (stream4, [throttled, flush]) => { - stream4.on("end", flush).on("error", flush); - return throttled; -}; -var Http2Sessions = class { - constructor() { - this.sessions = /* @__PURE__ */ Object.create(null); - } - getSession(authority, options) { - options = Object.assign( - { - sessionTimeout: 1e3 - }, - options - ); - let authoritySessions = this.sessions[authority]; - if (authoritySessions) { - let len = authoritySessions.length; - for (let i = 0; i < len; i++) { - const [sessionHandle, sessionOptions] = authoritySessions[i]; - if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) { - return sessionHandle; + }; + ZodUndefined3.create = (params) => { + return new ZodUndefined3({ + typeName: ZodFirstPartyTypeKind3.ZodUndefined, + ...processCreateParams(params) + }); + }; + var ZodNull3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.null) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.null, + received: ctx.parsedType + }); + return INVALID; } + return OK(input.data); } - } - const session = http2.connect(authority, options); - let removed; - const removeSession = () => { - if (removed) { - return; + }; + ZodNull3.create = (params) => { + return new ZodNull3({ + typeName: ZodFirstPartyTypeKind3.ZodNull, + ...processCreateParams(params) + }); + }; + var ZodAny3 = class extends ZodType3 { + constructor() { + super(...arguments); + this._any = true; } - removed = true; - let entries = authoritySessions, len = entries.length, i = len; - while (i--) { - if (entries[i][0] === session) { - if (len === 1) { - delete this.sessions[authority]; - } else { - entries.splice(i, 1); - } - return; - } + _parse(input) { + return OK(input.data); } }; - const originalRequestFn = session.request; - const { sessionTimeout } = options; - if (sessionTimeout != null) { - let timer; - let streamsCount = 0; - session.request = function() { - const stream4 = originalRequestFn.apply(this, arguments); - streamsCount++; - if (timer) { - clearTimeout(timer); - timer = null; - } - stream4.once("close", () => { - if (!--streamsCount) { - timer = setTimeout(() => { - timer = null; - removeSession(); - }, sessionTimeout); - } + ZodAny3.create = (params) => { + return new ZodAny3({ + typeName: ZodFirstPartyTypeKind3.ZodAny, + ...processCreateParams(params) + }); + }; + var ZodUnknown3 = class extends ZodType3 { + constructor() { + super(...arguments); + this._unknown = true; + } + _parse(input) { + return OK(input.data); + } + }; + ZodUnknown3.create = (params) => { + return new ZodUnknown3({ + typeName: ZodFirstPartyTypeKind3.ZodUnknown, + ...processCreateParams(params) + }); + }; + var ZodNever3 = class extends ZodType3 { + _parse(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.never, + received: ctx.parsedType }); - return stream4; - }; - } - session.once("close", removeSession); - let entry = [session, options]; - authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry]; - return session; - } -}; -var http2Sessions = new Http2Sessions(); -function dispatchBeforeRedirect(options, responseDetails) { - if (options.beforeRedirects.proxy) { - options.beforeRedirects.proxy(options); - } - if (options.beforeRedirects.config) { - options.beforeRedirects.config(options, responseDetails); - } -} -function setProxy(options, configProxy, location) { - let proxy = configProxy; - if (!proxy && proxy !== false) { - const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location); - if (proxyUrl) { - proxy = new URL(proxyUrl); - } - } - if (proxy) { - if (proxy.username) { - proxy.auth = (proxy.username || "") + ":" + (proxy.password || ""); - } - if (proxy.auth) { - const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password); - if (validProxyAuth) { - proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || ""); - } else if (typeof proxy.auth === "object") { - throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy }); + return INVALID; } - const base646 = Buffer.from(proxy.auth, "utf8").toString("base64"); - options.headers["Proxy-Authorization"] = "Basic " + base646; - } - options.headers.host = options.hostname + (options.port ? ":" + options.port : ""); - const proxyHost = proxy.hostname || proxy.host; - options.hostname = proxyHost; - options.host = proxyHost; - options.port = proxy.port; - options.path = location; - if (proxy.protocol) { - options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`; - } - } - options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { - setProxy(redirectOptions, configProxy, redirectOptions.href); - }; -} -var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process"; -var wrapAsync = (asyncExecutor) => { - return new Promise((resolve, reject) => { - let onDone; - let isDone; - const done = (value, isRejected) => { - if (isDone) return; - isDone = true; - onDone && onDone(value, isRejected); }; - const _resolve = (value) => { - done(value); - resolve(value); + ZodNever3.create = (params) => { + return new ZodNever3({ + typeName: ZodFirstPartyTypeKind3.ZodNever, + ...processCreateParams(params) + }); }; - const _reject = (reason) => { - done(reason, true); - reject(reason); + var ZodVoid3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.void, + received: ctx.parsedType + }); + return INVALID; + } + return OK(input.data); + } }; - asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject); - }); -}; -var resolveFamily = ({ address, family }) => { - if (!utils_default.isString(address)) { - throw TypeError("address must be a string"); - } - return { - address, - family: family || (address.indexOf(".") < 0 ? 6 : 4) - }; -}; -var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family }); -var http2Transport = { - request(options, cb) { - const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80)); - const { http2Options, headers } = options; - const session = http2Sessions.getSession(authority, http2Options); - const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants; - const http2Headers = { - [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""), - [HTTP2_HEADER_METHOD]: options.method, - [HTTP2_HEADER_PATH]: options.path + ZodVoid3.create = (params) => { + return new ZodVoid3({ + typeName: ZodFirstPartyTypeKind3.ZodVoid, + ...processCreateParams(params) + }); }; - utils_default.forEach(headers, (header, name) => { - name.charAt(0) !== ":" && (http2Headers[name] = header); - }); - const req = session.request(http2Headers); - req.once("response", (responseHeaders) => { - const response = req; - responseHeaders = Object.assign({}, responseHeaders); - const status = responseHeaders[HTTP2_HEADER_STATUS]; - delete responseHeaders[HTTP2_HEADER_STATUS]; - response.headers = responseHeaders; - response.statusCode = +status; - cb(response); - }); - return req; - } -}; -var http_default = isHttpAdapterSupported && function httpAdapter(config4) { - return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { - let { data, lookup, family, httpVersion = 1, http2Options } = config4; - const { responseType, responseEncoding } = config4; - const method = config4.method.toUpperCase(); - let isDone; - let rejected = false; - let req; - httpVersion = +httpVersion; - if (Number.isNaN(httpVersion)) { - throw TypeError(`Invalid protocol version: '${config4.httpVersion}' is not a number`); - } - if (httpVersion !== 1 && httpVersion !== 2) { - throw TypeError(`Unsupported protocol version '${httpVersion}'`); - } - const isHttp2 = httpVersion === 2; - if (lookup) { - const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]); - lookup = (hostname6, opt, cb) => { - _lookup(hostname6, opt, (err, arg0, arg1) => { - if (err) { - return cb(err); - } - const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; - opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + var ZodArray3 = class _ZodArray extends ZodType3 { + _parse(input) { + const { ctx, status } = this._processInputParams(input); + const def = this._def; + if (ctx.parsedType !== ZodParsedType.array) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }); + return INVALID; + } + if (def.exactLength !== null) { + const tooBig = ctx.data.length > def.exactLength.value; + const tooSmall = ctx.data.length < def.exactLength.value; + if (tooBig || tooSmall) { + addIssueToContext(ctx, { + code: tooBig ? ZodIssueCode3.too_big : ZodIssueCode3.too_small, + minimum: tooSmall ? def.exactLength.value : void 0, + maximum: tooBig ? def.exactLength.value : void 0, + type: "array", + inclusive: true, + exact: true, + message: def.exactLength.message + }); + status.dirty(); + } + } + if (def.minLength !== null) { + if (ctx.data.length < def.minLength.value) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + minimum: def.minLength.value, + type: "array", + inclusive: true, + exact: false, + message: def.minLength.message + }); + status.dirty(); + } + } + if (def.maxLength !== null) { + if (ctx.data.length > def.maxLength.value) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + maximum: def.maxLength.value, + type: "array", + inclusive: true, + exact: false, + message: def.maxLength.message + }); + status.dirty(); + } + } + if (ctx.common.async) { + return Promise.all([...ctx.data].map((item, i) => { + return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i)); + })).then((result2) => { + return ParseStatus.mergeArray(status, result2); + }); + } + const result = [...ctx.data].map((item, i) => { + return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i)); }); - }; - } - const abortEmitter = new EventEmitter(); - function abort(reason) { - try { - abortEmitter.emit( - "abort", - !reason || reason.type ? new CanceledError_default(null, config4, req) : reason - ); - } catch (err) { - console.warn("emit error", err); - } - } - abortEmitter.once("abort", reject); - const onFinished = () => { - if (config4.cancelToken) { - config4.cancelToken.unsubscribe(abort); - } - if (config4.signal) { - config4.signal.removeEventListener("abort", abort); - } - abortEmitter.removeAllListeners(); - }; - if (config4.cancelToken || config4.signal) { - config4.cancelToken && config4.cancelToken.subscribe(abort); - if (config4.signal) { - config4.signal.aborted ? abort() : config4.signal.addEventListener("abort", abort); + return ParseStatus.mergeArray(status, result); } - } - onDone((response, isRejected) => { - isDone = true; - if (isRejected) { - rejected = true; - onFinished(); - return; + get element() { + return this._def.type; } - const { data: data2 } = response; - if (data2 instanceof stream3.Readable || data2 instanceof stream3.Duplex) { - const offListeners = stream3.finished(data2, () => { - offListeners(); - onFinished(); + min(minLength, message2) { + return new _ZodArray({ + ...this._def, + minLength: { value: minLength, message: errorUtil.toString(message2) } }); - } else { - onFinished(); - } - }); - const fullPath = buildFullPath(config4.baseURL, config4.url, config4.allowAbsoluteUrls); - const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0); - const protocol = parsed.protocol || supportedProtocols[0]; - if (protocol === "data:") { - if (config4.maxContentLength > -1) { - const dataUrl = String(config4.url || fullPath || ""); - const estimated = estimateDataURLDecodedBytes(dataUrl); - if (estimated > config4.maxContentLength) { - return reject( - new AxiosError_default( - "maxContentLength size of " + config4.maxContentLength + " exceeded", - AxiosError_default.ERR_BAD_RESPONSE, - config4 - ) - ); - } } - let convertedData; - if (method !== "GET") { - return settle(resolve, reject, { - status: 405, - statusText: "method not allowed", - headers: {}, - config: config4 + max(maxLength, message2) { + return new _ZodArray({ + ...this._def, + maxLength: { value: maxLength, message: errorUtil.toString(message2) } }); } - try { - convertedData = fromDataURI(config4.url, responseType === "blob", { - Blob: config4.env && config4.env.Blob + length(len, message2) { + return new _ZodArray({ + ...this._def, + exactLength: { value: len, message: errorUtil.toString(message2) } }); - } catch (err) { - throw AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config4); } - if (responseType === "text") { - convertedData = convertedData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === "utf8") { - convertedData = utils_default.stripBOM(convertedData); - } - } else if (responseType === "stream") { - convertedData = stream3.Readable.from(convertedData); + nonempty(message2) { + return this.min(1, message2); } - return settle(resolve, reject, { - data: convertedData, - status: 200, - statusText: "OK", - headers: new AxiosHeaders_default(), - config: config4 + }; + ZodArray3.create = (schema, params) => { + return new ZodArray3({ + type: schema, + minLength: null, + maxLength: null, + exactLength: null, + typeName: ZodFirstPartyTypeKind3.ZodArray, + ...processCreateParams(params) }); + }; + function deepPartialify(schema) { + if (schema instanceof ZodObject3) { + const newShape = {}; + for (const key in schema.shape) { + const fieldSchema = schema.shape[key]; + newShape[key] = ZodOptional3.create(deepPartialify(fieldSchema)); + } + return new ZodObject3({ + ...schema._def, + shape: () => newShape + }); + } else if (schema instanceof ZodArray3) { + return new ZodArray3({ + ...schema._def, + type: deepPartialify(schema.element) + }); + } else if (schema instanceof ZodOptional3) { + return ZodOptional3.create(deepPartialify(schema.unwrap())); + } else if (schema instanceof ZodNullable3) { + return ZodNullable3.create(deepPartialify(schema.unwrap())); + } else if (schema instanceof ZodTuple3) { + return ZodTuple3.create(schema.items.map((item) => deepPartialify(item))); + } else { + return schema; + } } - if (supportedProtocols.indexOf(protocol) === -1) { - return reject( - new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config4) - ); - } - const headers = AxiosHeaders_default.from(config4.headers).normalize(); - headers.set("User-Agent", "axios/" + VERSION, false); - const { onUploadProgress, onDownloadProgress } = config4; - const maxRate = config4.maxRate; - let maxUploadRate = void 0; - let maxDownloadRate = void 0; - if (utils_default.isSpecCompliantForm(data)) { - const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); - data = formDataToStream_default( - data, - (formHeaders) => { - headers.set(formHeaders); - }, - { - tag: `axios-${VERSION}-boundary`, - boundary: userBoundary && userBoundary[1] || void 0 + var ZodObject3 = class _ZodObject extends ZodType3 { + constructor() { + super(...arguments); + this._cached = null; + this.nonstrict = this.passthrough; + this.augment = this.extend; + } + _getCached() { + if (this._cached !== null) + return this._cached; + const shape = this._def.shape(); + const keys = util3.objectKeys(shape); + return this._cached = { shape, keys }; + } + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.object) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext(ctx2, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.object, + received: ctx2.parsedType + }); + return INVALID; + } + const { status, ctx } = this._processInputParams(input); + const { shape, keys: shapeKeys } = this._getCached(); + const extraKeys = []; + if (!(this._def.catchall instanceof ZodNever3 && this._def.unknownKeys === "strip")) { + for (const key in ctx.data) { + if (!shapeKeys.includes(key)) { + extraKeys.push(key); + } + } } - ); - } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) { - headers.set(data.getHeaders()); - if (!headers.hasContentLength()) { - try { - const knownLength = await util2.promisify(data.getLength).call(data); - Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); - } catch (e) { + const pairs = []; + for (const key of shapeKeys) { + const keyValidator = shape[key]; + const value = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)), + alwaysSet: key in ctx.data + }); } + if (this._def.catchall instanceof ZodNever3) { + const unknownKeys = this._def.unknownKeys; + if (unknownKeys === "passthrough") { + for (const key of extraKeys) { + pairs.push({ + key: { status: "valid", value: key }, + value: { status: "valid", value: ctx.data[key] } + }); + } + } else if (unknownKeys === "strict") { + if (extraKeys.length > 0) { + addIssueToContext(ctx, { + code: ZodIssueCode3.unrecognized_keys, + keys: extraKeys + }); + status.dirty(); + } + } else if (unknownKeys === "strip") ; + else { + throw new Error(`Internal ZodObject error: invalid unknownKeys value.`); + } + } else { + const catchall = this._def.catchall; + for (const key of extraKeys) { + const value = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: catchall._parse( + new ParseInputLazyPath(ctx, value, ctx.path, key) + //, ctx.child(key), value, getParsedType(value) + ), + alwaysSet: key in ctx.data + }); + } + } + if (ctx.common.async) { + return Promise.resolve().then(async () => { + const syncPairs = []; + for (const pair of pairs) { + const key = await pair.key; + const value = await pair.value; + syncPairs.push({ + key, + value, + alwaysSet: pair.alwaysSet + }); + } + return syncPairs; + }).then((syncPairs) => { + return ParseStatus.mergeObjectSync(status, syncPairs); + }); + } else { + return ParseStatus.mergeObjectSync(status, pairs); + } + } + get shape() { + return this._def.shape(); + } + strict(message2) { + errorUtil.errToObj; + return new _ZodObject({ + ...this._def, + unknownKeys: "strict", + ...message2 !== void 0 ? { + errorMap: (issue4, ctx) => { + var _a4, _b, _c, _d; + const defaultError = (_c = (_b = (_a4 = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a4, issue4, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError; + if (issue4.code === "unrecognized_keys") + return { + message: (_d = errorUtil.errToObj(message2).message) !== null && _d !== void 0 ? _d : defaultError + }; + return { + message: defaultError + }; + } + } : {} + }); } - } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { - data.size && headers.setContentType(data.type || "application/octet-stream"); - headers.setContentLength(data.size || 0); - data = stream3.Readable.from(readBlob_default(data)); - } else if (data && !utils_default.isStream(data)) { - if (Buffer.isBuffer(data)) { - } else if (utils_default.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils_default.isString(data)) { - data = Buffer.from(data, "utf-8"); - } else { - return reject( - new AxiosError_default( - "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", - AxiosError_default.ERR_BAD_REQUEST, - config4 - ) - ); - } - headers.setContentLength(data.length, false); - if (config4.maxBodyLength > -1 && data.length > config4.maxBodyLength) { - return reject( - new AxiosError_default( - "Request body larger than maxBodyLength limit", - AxiosError_default.ERR_BAD_REQUEST, - config4 - ) - ); + strip() { + return new _ZodObject({ + ...this._def, + unknownKeys: "strip" + }); } - } - const contentLength = utils_default.toFiniteNumber(headers.getContentLength()); - if (utils_default.isArray(maxRate)) { - maxUploadRate = maxRate[0]; - maxDownloadRate = maxRate[1]; - } else { - maxUploadRate = maxDownloadRate = maxRate; - } - if (data && (onUploadProgress || maxUploadRate)) { - if (!utils_default.isStream(data)) { - data = stream3.Readable.from(data, { objectMode: false }); + passthrough() { + return new _ZodObject({ + ...this._def, + unknownKeys: "passthrough" + }); } - data = stream3.pipeline( - [ - data, - new AxiosTransformStream_default({ - maxRate: utils_default.toFiniteNumber(maxUploadRate) + // const AugmentFactory = + // (def: Def) => + // ( + // augmentation: Augmentation + // ): ZodObject< + // extendShape, Augmentation>, + // Def["unknownKeys"], + // Def["catchall"] + // > => { + // return new ZodObject({ + // ...def, + // shape: () => ({ + // ...def.shape(), + // ...augmentation, + // }), + // }) as any; + // }; + extend(augmentation) { + return new _ZodObject({ + ...this._def, + shape: () => ({ + ...this._def.shape(), + ...augmentation }) - ], - utils_default.noop - ); - onUploadProgress && data.on( - "progress", - flushOnFinish( - data, - progressEventDecorator( - contentLength, - progressEventReducer(asyncDecorator(onUploadProgress), false, 3) - ) - ) - ); - } - let auth2 = void 0; - if (config4.auth) { - const username = config4.auth.username || ""; - const password = config4.auth.password || ""; - auth2 = username + ":" + password; - } - if (!auth2 && parsed.username) { - const urlUsername = parsed.username; - const urlPassword = parsed.password; - auth2 = urlUsername + ":" + urlPassword; - } - auth2 && headers.delete("authorization"); - let path; - try { - path = buildURL( - parsed.pathname + parsed.search, - config4.params, - config4.paramsSerializer - ).replace(/^\?/, ""); - } catch (err) { - const customErr = new Error(err.message); - customErr.config = config4; - customErr.url = config4.url; - customErr.exists = true; - return reject(customErr); - } - headers.set( - "Accept-Encoding", - "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), - false - ); - const options = { - path, - method, - headers: headers.toJSON(), - agents: { http: config4.httpAgent, https: config4.httpsAgent }, - auth: auth2, - protocol, - family, - beforeRedirect: dispatchBeforeRedirect, - beforeRedirects: {}, - http2Options - }; - !utils_default.isUndefined(lookup) && (options.lookup = lookup); - if (config4.socketPath) { - options.socketPath = config4.socketPath; - } else { - options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; - options.port = parsed.port; - setProxy( - options, - config4.proxy, - protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path - ); - } - let transport; - const isHttpsRequest = isHttps.test(options.protocol); - options.agent = isHttpsRequest ? config4.httpsAgent : config4.httpAgent; - if (isHttp2) { - transport = http2Transport; - } else { - if (config4.transport) { - transport = config4.transport; - } else if (config4.maxRedirects === 0) { - transport = isHttpsRequest ? https : http; - } else { - if (config4.maxRedirects) { - options.maxRedirects = config4.maxRedirects; - } - if (config4.beforeRedirect) { - options.beforeRedirects.config = config4.beforeRedirect; - } - transport = isHttpsRequest ? httpsFollow : httpFollow; + }); } - } - if (config4.maxBodyLength > -1) { - options.maxBodyLength = config4.maxBodyLength; - } else { - options.maxBodyLength = Infinity; - } - if (config4.insecureHTTPParser) { - options.insecureHTTPParser = config4.insecureHTTPParser; - } - req = transport.request(options, function handleResponse(res) { - if (req.destroyed) return; - const streams = [res]; - const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]); - if (onDownloadProgress || maxDownloadRate) { - const transformStream = new AxiosTransformStream_default({ - maxRate: utils_default.toFiniteNumber(maxDownloadRate) + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(merging) { + const merged = new _ZodObject({ + unknownKeys: merging._def.unknownKeys, + catchall: merging._def.catchall, + shape: () => ({ + ...this._def.shape(), + ...merging._def.shape() + }), + typeName: ZodFirstPartyTypeKind3.ZodObject + }); + return merged; + } + // merge< + // Incoming extends AnyZodObject, + // Augmentation extends Incoming["shape"], + // NewOutput extends { + // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation + // ? Augmentation[k]["_output"] + // : k extends keyof Output + // ? Output[k] + // : never; + // }, + // NewInput extends { + // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation + // ? Augmentation[k]["_input"] + // : k extends keyof Input + // ? Input[k] + // : never; + // } + // >( + // merging: Incoming + // ): ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"], + // NewOutput, + // NewInput + // > { + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + setKey(key, schema) { + return this.augment({ [key]: schema }); + } + // merge( + // merging: Incoming + // ): //ZodObject = (merging) => { + // ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"] + // > { + // // const mergedShape = objectUtil.mergeShapes( + // // this._def.shape(), + // // merging._def.shape() + // // ); + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + catchall(index) { + return new _ZodObject({ + ...this._def, + catchall: index }); - onDownloadProgress && transformStream.on( - "progress", - flushOnFinish( - transformStream, - progressEventDecorator( - responseLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) - ) - ) - ); - streams.push(transformStream); } - let responseStream = res; - const lastRequest = res.req || req; - if (config4.decompress !== false && res.headers["content-encoding"]) { - if (method === "HEAD" || res.statusCode === 204) { - delete res.headers["content-encoding"]; - } - switch ((res.headers["content-encoding"] || "").toLowerCase()) { - /*eslint default-case:0*/ - case "gzip": - case "x-gzip": - case "compress": - case "x-compress": - streams.push(zlib.createUnzip(zlibOptions)); - delete res.headers["content-encoding"]; - break; - case "deflate": - streams.push(new ZlibHeaderTransformStream_default()); - streams.push(zlib.createUnzip(zlibOptions)); - delete res.headers["content-encoding"]; - break; - case "br": - if (isBrotliSupported) { - streams.push(zlib.createBrotliDecompress(brotliOptions)); - delete res.headers["content-encoding"]; - } - } + pick(mask) { + const shape = {}; + util3.objectKeys(mask).forEach((key) => { + if (mask[key] && this.shape[key]) { + shape[key] = this.shape[key]; + } + }); + return new _ZodObject({ + ...this._def, + shape: () => shape + }); } - responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0]; - const response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: new AxiosHeaders_default(res.headers), - config: config4, - request: lastRequest - }; - if (responseType === "stream") { - response.data = responseStream; - settle(resolve, reject, response); - } else { - const responseBuffer = []; - let totalResponseBytes = 0; - responseStream.on("data", function handleStreamData(chunk) { - responseBuffer.push(chunk); - totalResponseBytes += chunk.length; - if (config4.maxContentLength > -1 && totalResponseBytes > config4.maxContentLength) { - rejected = true; - responseStream.destroy(); - abort( - new AxiosError_default( - "maxContentLength size of " + config4.maxContentLength + " exceeded", - AxiosError_default.ERR_BAD_RESPONSE, - config4, - lastRequest - ) - ); + omit(mask) { + const shape = {}; + util3.objectKeys(this.shape).forEach((key) => { + if (!mask[key]) { + shape[key] = this.shape[key]; } }); - responseStream.on("aborted", function handlerStreamAborted() { - if (rejected) { - return; + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + /** + * @deprecated + */ + deepPartial() { + return deepPartialify(this); + } + partial(mask) { + const newShape = {}; + util3.objectKeys(this.shape).forEach((key) => { + const fieldSchema = this.shape[key]; + if (mask && !mask[key]) { + newShape[key] = fieldSchema; + } else { + newShape[key] = fieldSchema.optional(); } - const err = new AxiosError_default( - "stream has been aborted", - AxiosError_default.ERR_BAD_RESPONSE, - config4, - lastRequest - ); - responseStream.destroy(err); - reject(err); }); - responseStream.on("error", function handleStreamError(err) { - if (req.destroyed) return; - reject(AxiosError_default.from(err, null, config4, lastRequest)); + return new _ZodObject({ + ...this._def, + shape: () => newShape }); - responseStream.on("end", function handleStreamEnd() { - try { - let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); - if (responseType !== "arraybuffer") { - responseData = responseData.toString(responseEncoding); - if (!responseEncoding || responseEncoding === "utf8") { - responseData = utils_default.stripBOM(responseData); - } + } + required(mask) { + const newShape = {}; + util3.objectKeys(this.shape).forEach((key) => { + if (mask && !mask[key]) { + newShape[key] = this.shape[key]; + } else { + const fieldSchema = this.shape[key]; + let newField = fieldSchema; + while (newField instanceof ZodOptional3) { + newField = newField._def.innerType; } - response.data = responseData; - } catch (err) { - return reject(AxiosError_default.from(err, null, config4, response.request, response)); + newShape[key] = newField; } - settle(resolve, reject, response); + }); + return new _ZodObject({ + ...this._def, + shape: () => newShape }); } - abortEmitter.once("abort", (err) => { - if (!responseStream.destroyed) { - responseStream.emit("error", err); - responseStream.destroy(); + keyof() { + return createZodEnum(util3.objectKeys(this.shape)); + } + }; + ZodObject3.create = (shape, params) => { + return new ZodObject3({ + shape: () => shape, + unknownKeys: "strip", + catchall: ZodNever3.create(), + typeName: ZodFirstPartyTypeKind3.ZodObject, + ...processCreateParams(params) + }); + }; + ZodObject3.strictCreate = (shape, params) => { + return new ZodObject3({ + shape: () => shape, + unknownKeys: "strict", + catchall: ZodNever3.create(), + typeName: ZodFirstPartyTypeKind3.ZodObject, + ...processCreateParams(params) + }); + }; + ZodObject3.lazycreate = (shape, params) => { + return new ZodObject3({ + shape, + unknownKeys: "strip", + catchall: ZodNever3.create(), + typeName: ZodFirstPartyTypeKind3.ZodObject, + ...processCreateParams(params) + }); + }; + var ZodUnion3 = class extends ZodType3 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const options = this._def.options; + function handleResults(results) { + for (const result of results) { + if (result.result.status === "valid") { + return result.result; + } + } + for (const result of results) { + if (result.result.status === "dirty") { + ctx.common.issues.push(...result.ctx.common.issues); + return result.result; + } + } + const unionErrors = results.map((result) => new ZodError3(result.ctx.common.issues)); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_union, + unionErrors + }); + return INVALID; + } + if (ctx.common.async) { + return Promise.all(options.map(async (option) => { + const childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + return { + result: await option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }), + ctx: childCtx + }; + })).then(handleResults); + } else { + let dirty = void 0; + const issues = []; + for (const option of options) { + const childCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + }, + parent: null + }; + const result = option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: childCtx + }); + if (result.status === "valid") { + return result; + } else if (result.status === "dirty" && !dirty) { + dirty = { result, ctx: childCtx }; + } + if (childCtx.common.issues.length) { + issues.push(childCtx.common.issues); + } + } + if (dirty) { + ctx.common.issues.push(...dirty.ctx.common.issues); + return dirty.result; + } + const unionErrors = issues.map((issues2) => new ZodError3(issues2)); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_union, + unionErrors + }); + return INVALID; } + } + get options() { + return this._def.options; + } + }; + ZodUnion3.create = (types, params) => { + return new ZodUnion3({ + options: types, + typeName: ZodFirstPartyTypeKind3.ZodUnion, + ...processCreateParams(params) }); - }); - abortEmitter.once("abort", (err) => { - if (req.close) { - req.close(); + }; + var getDiscriminator = (type) => { + if (type instanceof ZodLazy3) { + return getDiscriminator(type.schema); + } else if (type instanceof ZodEffects) { + return getDiscriminator(type.innerType()); + } else if (type instanceof ZodLiteral3) { + return [type.value]; + } else if (type instanceof ZodEnum3) { + return type.options; + } else if (type instanceof ZodNativeEnum) { + return util3.objectValues(type.enum); + } else if (type instanceof ZodDefault3) { + return getDiscriminator(type._def.innerType); + } else if (type instanceof ZodUndefined3) { + return [void 0]; + } else if (type instanceof ZodNull3) { + return [null]; + } else if (type instanceof ZodOptional3) { + return [void 0, ...getDiscriminator(type.unwrap())]; + } else if (type instanceof ZodNullable3) { + return [null, ...getDiscriminator(type.unwrap())]; + } else if (type instanceof ZodBranded) { + return getDiscriminator(type.unwrap()); + } else if (type instanceof ZodReadonly3) { + return getDiscriminator(type.unwrap()); + } else if (type instanceof ZodCatch3) { + return getDiscriminator(type._def.innerType); } else { - req.destroy(err); + return []; } - }); - req.on("error", function handleRequestError(err) { - reject(AxiosError_default.from(err, null, config4, req)); - }); - req.on("socket", function handleRequestSocket(socket) { - socket.setKeepAlive(true, 1e3 * 60); - }); - if (config4.timeout) { - const timeout = parseInt(config4.timeout, 10); - if (Number.isNaN(timeout)) { - abort( - new AxiosError_default( - "error trying to parse `config.timeout` to int", - AxiosError_default.ERR_BAD_OPTION_VALUE, - config4, - req - ) - ); - return; + }; + var ZodDiscriminatedUnion3 = class _ZodDiscriminatedUnion extends ZodType3 { + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }); + return INVALID; + } + const discriminator = this.discriminator; + const discriminatorValue = ctx.data[discriminator]; + const option = this.optionsMap.get(discriminatorValue); + if (!option) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [discriminator] + }); + return INVALID; + } + if (ctx.common.async) { + return option._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + } else { + return option._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + } } - req.setTimeout(timeout, function handleRequestTimeout() { - if (isDone) return; - let timeoutErrorMessage = config4.timeout ? "timeout of " + config4.timeout + "ms exceeded" : "timeout exceeded"; - const transitional2 = config4.transitional || transitional_default; - if (config4.timeoutErrorMessage) { - timeoutErrorMessage = config4.timeoutErrorMessage; + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + /** + * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. + * However, it only allows a union of objects, all of which need to share a discriminator property. This property must + * have a different value for each object in the union. + * @param discriminator the name of the discriminator property + * @param types an array of object schemas + * @param params + */ + static create(discriminator, options, params) { + const optionsMap = /* @__PURE__ */ new Map(); + for (const type of options) { + const discriminatorValues = getDiscriminator(type.shape[discriminator]); + if (!discriminatorValues.length) { + throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); + } + for (const value of discriminatorValues) { + if (optionsMap.has(value)) { + throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`); + } + optionsMap.set(value, type); + } } - abort( - new AxiosError_default( - timeoutErrorMessage, - transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, - config4, - req - ) - ); - }); - } else { - req.setTimeout(0); + return new _ZodDiscriminatedUnion({ + typeName: ZodFirstPartyTypeKind3.ZodDiscriminatedUnion, + discriminator, + options, + optionsMap, + ...processCreateParams(params) + }); + } + }; + function mergeValues3(a, b) { + const aType = getParsedType3(a); + const bType = getParsedType3(b); + if (a === b) { + return { valid: true, data: a }; + } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) { + const bKeys = util3.objectKeys(b); + const sharedKeys = util3.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues3(a[key], b[key]); + if (!sharedValue.valid) { + return { valid: false }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) { + if (a.length !== b.length) { + return { valid: false }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues3(itemA, itemB); + if (!sharedValue.valid) { + return { valid: false }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) { + return { valid: true, data: a }; + } else { + return { valid: false }; + } } - if (utils_default.isStream(data)) { - let ended = false; - let errored = false; - data.on("end", () => { - ended = true; - }); - data.once("error", (err) => { - errored = true; - req.destroy(err); - }); - data.on("close", () => { - if (!ended && !errored) { - abort(new CanceledError_default("Request stream has been aborted", config4, req)); + var ZodIntersection3 = class extends ZodType3 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const handleParsed = (parsedLeft, parsedRight) => { + if (isAborted(parsedLeft) || isAborted(parsedRight)) { + return INVALID; + } + const merged = mergeValues3(parsedLeft.value, parsedRight.value); + if (!merged.valid) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_intersection_types + }); + return INVALID; + } + if (isDirty(parsedLeft) || isDirty(parsedRight)) { + status.dirty(); + } + return { status: status.value, value: merged.data }; + }; + if (ctx.common.async) { + return Promise.all([ + this._def.left._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), + this._def.right._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }) + ]).then(([left, right]) => handleParsed(left, right)); + } else { + return handleParsed(this._def.left._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }), this._def.right._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + })); } + } + }; + ZodIntersection3.create = (left, right, params) => { + return new ZodIntersection3({ + left, + right, + typeName: ZodFirstPartyTypeKind3.ZodIntersection, + ...processCreateParams(params) }); - data.pipe(req); - } else { - data && req.write(data); - req.end(); - } - }); -}; - -// node_modules/axios/lib/helpers/isURLSameOrigin.js -var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url5) => { - url5 = new URL(url5, platform_default.origin); - return origin2.protocol === url5.protocol && origin2.host === url5.host && (isMSIE || origin2.port === url5.port); -})( - new URL(platform_default.origin), - platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) -) : () => true; - -// node_modules/axios/lib/helpers/cookies.js -var cookies_default = platform_default.hasStandardBrowserEnv ? ( - // Standard browser envs support document.cookie - { - write(name, value, expires, path, domain4, secure, sameSite) { - if (typeof document === "undefined") return; - const cookie = [`${name}=${encodeURIComponent(value)}`]; - if (utils_default.isNumber(expires)) { - cookie.push(`expires=${new Date(expires).toUTCString()}`); + }; + var ZodTuple3 = class _ZodTuple extends ZodType3 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.array) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.array, + received: ctx.parsedType + }); + return INVALID; + } + if (ctx.data.length < this._def.items.length) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + minimum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + return INVALID; + } + const rest = this._def.rest; + if (!rest && ctx.data.length > this._def.items.length) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + maximum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + status.dirty(); + } + const items = [...ctx.data].map((item, itemIndex) => { + const schema = this._def.items[itemIndex] || this._def.rest; + if (!schema) + return null; + return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex)); + }).filter((x) => !!x); + if (ctx.common.async) { + return Promise.all(items).then((results) => { + return ParseStatus.mergeArray(status, results); + }); + } else { + return ParseStatus.mergeArray(status, items); + } } - if (utils_default.isString(path)) { - cookie.push(`path=${path}`); + get items() { + return this._def.items; } - if (utils_default.isString(domain4)) { - cookie.push(`domain=${domain4}`); + rest(rest) { + return new _ZodTuple({ + ...this._def, + rest + }); } - if (secure === true) { - cookie.push("secure"); + }; + ZodTuple3.create = (schemas, params) => { + if (!Array.isArray(schemas)) { + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + } + return new ZodTuple3({ + items: schemas, + typeName: ZodFirstPartyTypeKind3.ZodTuple, + rest: null, + ...processCreateParams(params) + }); + }; + var ZodRecord3 = class _ZodRecord extends ZodType3 { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.object) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.object, + received: ctx.parsedType + }); + return INVALID; + } + const pairs = []; + const keyType = this._def.keyType; + const valueType = this._def.valueType; + for (const key in ctx.data) { + pairs.push({ + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)), + value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (ctx.common.async) { + return ParseStatus.mergeObjectAsync(status, pairs); + } else { + return ParseStatus.mergeObjectSync(status, pairs); + } } - if (utils_default.isString(sameSite)) { - cookie.push(`SameSite=${sameSite}`); + get element() { + return this._def.valueType; } - document.cookie = cookie.join("; "); - }, - read(name) { - if (typeof document === "undefined") return null; - const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); - return match2 ? decodeURIComponent(match2[1]) : null; - }, - remove(name) { - this.write(name, "", Date.now() - 864e5, "/"); - } - } -) : ( - // Non-standard browser env (web workers, react-native) lack needed support. - { - write() { - }, - read() { - return null; - }, - remove() { - } - } -); - -// node_modules/axios/lib/core/mergeConfig.js -var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing; -function mergeConfig(config1, config22) { - config22 = config22 || {}; - const config4 = {}; - function getMergedValue(target, source, prop, caseless) { - if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { - return utils_default.merge.call({ caseless }, target, source); - } else if (utils_default.isPlainObject(source)) { - return utils_default.merge({}, source); - } else if (utils_default.isArray(source)) { - return source.slice(); - } - return source; - } - function mergeDeepProperties(a, b, prop, caseless) { - if (!utils_default.isUndefined(b)) { - return getMergedValue(a, b, prop, caseless); - } else if (!utils_default.isUndefined(a)) { - return getMergedValue(void 0, a, prop, caseless); - } - } - function valueFromConfig2(a, b) { - if (!utils_default.isUndefined(b)) { - return getMergedValue(void 0, b); - } - } - function defaultToConfig2(a, b) { - if (!utils_default.isUndefined(b)) { - return getMergedValue(void 0, b); - } else if (!utils_default.isUndefined(a)) { - return getMergedValue(void 0, a); - } - } - function mergeDirectKeys(a, b, prop) { - if (prop in config22) { - return getMergedValue(a, b); - } else if (prop in config1) { - return getMergedValue(void 0, a); - } - } - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - withXSRFToken: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) - }; - utils_default.forEach(Object.keys({ ...config1, ...config22 }), function computeConfigValue(prop) { - if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; - const merge6 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; - const configValue = merge6(config1[prop], config22[prop], prop); - utils_default.isUndefined(configValue) && merge6 !== mergeDirectKeys || (config4[prop] = configValue); - }); - return config4; -} - -// node_modules/axios/lib/helpers/resolveConfig.js -var resolveConfig_default = (config4) => { - const newConfig = mergeConfig({}, config4); - let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth: auth2 } = newConfig; - newConfig.headers = headers = AxiosHeaders_default.from(headers); - newConfig.url = buildURL( - buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), - config4.params, - config4.paramsSerializer - ); - if (auth2) { - headers.set( - "Authorization", - "Basic " + btoa( - (auth2.username || "") + ":" + (auth2.password ? unescape(encodeURIComponent(auth2.password)) : "") - ) - ); - } - if (utils_default.isFormData(data)) { - if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { - headers.setContentType(void 0); - } else if (utils_default.isFunction(data.getHeaders)) { - const formHeaders = data.getHeaders(); - const allowedHeaders = ["content-type", "content-length"]; - Object.entries(formHeaders).forEach(([key, val]) => { - if (allowedHeaders.includes(key.toLowerCase())) { - headers.set(key, val); + static create(first, second, third) { + if (second instanceof ZodType3) { + return new _ZodRecord({ + keyType: first, + valueType: second, + typeName: ZodFirstPartyTypeKind3.ZodRecord, + ...processCreateParams(third) + }); + } + return new _ZodRecord({ + keyType: ZodString3.create(), + valueType: first, + typeName: ZodFirstPartyTypeKind3.ZodRecord, + ...processCreateParams(second) + }); + } + }; + var ZodMap3 = class extends ZodType3 { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.map) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.map, + received: ctx.parsedType + }); + return INVALID; + } + const keyType = this._def.keyType; + const valueType = this._def.valueType; + const pairs = [...ctx.data.entries()].map(([key, value], index) => { + return { + key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])), + value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"])) + }; + }); + if (ctx.common.async) { + const finalMap = /* @__PURE__ */ new Map(); + return Promise.resolve().then(async () => { + for (const pair of pairs) { + const key = await pair.key; + const value = await pair.value; + if (key.status === "aborted" || value.status === "aborted") { + return INVALID; + } + if (key.status === "dirty" || value.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value.value); + } + return { status: status.value, value: finalMap }; + }); + } else { + const finalMap = /* @__PURE__ */ new Map(); + for (const pair of pairs) { + const key = pair.key; + const value = pair.value; + if (key.status === "aborted" || value.status === "aborted") { + return INVALID; + } + if (key.status === "dirty" || value.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value.value); + } + return { status: status.value, value: finalMap }; } + } + }; + ZodMap3.create = (keyType, valueType, params) => { + return new ZodMap3({ + valueType, + keyType, + typeName: ZodFirstPartyTypeKind3.ZodMap, + ...processCreateParams(params) }); - } - } - if (platform_default.hasStandardBrowserEnv) { - withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); - if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { - const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); - if (xsrfValue) { - headers.set(xsrfHeaderName, xsrfValue); + }; + var ZodSet3 = class _ZodSet extends ZodType3 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.set) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.set, + received: ctx.parsedType + }); + return INVALID; + } + const def = this._def; + if (def.minSize !== null) { + if (ctx.data.size < def.minSize.value) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_small, + minimum: def.minSize.value, + type: "set", + inclusive: true, + exact: false, + message: def.minSize.message + }); + status.dirty(); + } + } + if (def.maxSize !== null) { + if (ctx.data.size > def.maxSize.value) { + addIssueToContext(ctx, { + code: ZodIssueCode3.too_big, + maximum: def.maxSize.value, + type: "set", + inclusive: true, + exact: false, + message: def.maxSize.message + }); + status.dirty(); + } + } + const valueType = this._def.valueType; + function finalizeSet(elements2) { + const parsedSet = /* @__PURE__ */ new Set(); + for (const element of elements2) { + if (element.status === "aborted") + return INVALID; + if (element.status === "dirty") + status.dirty(); + parsedSet.add(element.value); + } + return { status: status.value, value: parsedSet }; + } + const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i))); + if (ctx.common.async) { + return Promise.all(elements).then((elements2) => finalizeSet(elements2)); + } else { + return finalizeSet(elements); + } } - } - } - return newConfig; -}; - -// node_modules/axios/lib/adapters/xhr.js -var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; -var xhr_default = isXHRAdapterSupported && function(config4) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - const _config = resolveConfig_default(config4); - let requestData = _config.data; - const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize(); - let { responseType, onUploadProgress, onDownloadProgress } = _config; - let onCanceled; - let uploadThrottled, downloadThrottled; - let flushUpload, flushDownload; - function done() { - flushUpload && flushUpload(); - flushDownload && flushDownload(); - _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); - _config.signal && _config.signal.removeEventListener("abort", onCanceled); - } - let request3 = new XMLHttpRequest(); - request3.open(_config.method.toUpperCase(), _config.url, true); - request3.timeout = _config.timeout; - function onloadend() { - if (!request3) { - return; + min(minSize, message2) { + return new _ZodSet({ + ...this._def, + minSize: { value: minSize, message: errorUtil.toString(message2) } + }); } - const responseHeaders = AxiosHeaders_default.from( - "getAllResponseHeaders" in request3 && request3.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === "text" || responseType === "json" ? request3.responseText : request3.response; - const response = { - data: responseData, - status: request3.status, - statusText: request3.statusText, - headers: responseHeaders, - config: config4, - request: request3 - }; - settle( - function _resolve(value) { - resolve(value); - done(); - }, - function _reject(err) { - reject(err); - done(); - }, - response - ); - request3 = null; - } - if ("onloadend" in request3) { - request3.onloadend = onloadend; - } else { - request3.onreadystatechange = function handleLoad() { - if (!request3 || request3.readyState !== 4) { - return; + max(maxSize, message2) { + return new _ZodSet({ + ...this._def, + maxSize: { value: maxSize, message: errorUtil.toString(message2) } + }); + } + size(size, message2) { + return this.min(size, message2).max(size, message2); + } + nonempty(message2) { + return this.min(1, message2); + } + }; + ZodSet3.create = (valueType, params) => { + return new ZodSet3({ + valueType, + minSize: null, + maxSize: null, + typeName: ZodFirstPartyTypeKind3.ZodSet, + ...processCreateParams(params) + }); + }; + var ZodFunction3 = class _ZodFunction extends ZodType3 { + constructor() { + super(...arguments); + this.validate = this.implement; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.function) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.function, + received: ctx.parsedType + }); + return INVALID; + } + function makeArgsIssue(args, error99) { + return makeIssue({ + data: args, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap3(), + errorMap + ].filter((x) => !!x), + issueData: { + code: ZodIssueCode3.invalid_arguments, + argumentsError: error99 + } + }); } - if (request3.status === 0 && !(request3.responseURL && request3.responseURL.indexOf("file:") === 0)) { - return; + function makeReturnsIssue(returns, error99) { + return makeIssue({ + data: returns, + path: ctx.path, + errorMaps: [ + ctx.common.contextualErrorMap, + ctx.schemaErrorMap, + getErrorMap3(), + errorMap + ].filter((x) => !!x), + issueData: { + code: ZodIssueCode3.invalid_return_type, + returnTypeError: error99 + } + }); } - setTimeout(onloadend); - }; - } - request3.onabort = function handleAbort() { - if (!request3) { - return; + const params = { errorMap: ctx.common.contextualErrorMap }; + const fn = ctx.data; + if (this._def.returns instanceof ZodPromise3) { + const me = this; + return OK(async function(...args) { + const error99 = new ZodError3([]); + const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => { + error99.addIssue(makeArgsIssue(args, e)); + throw error99; + }); + const result = await Reflect.apply(fn, this, parsedArgs); + const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { + error99.addIssue(makeReturnsIssue(result, e)); + throw error99; + }); + return parsedReturns; + }); + } else { + const me = this; + return OK(function(...args) { + const parsedArgs = me._def.args.safeParse(args, params); + if (!parsedArgs.success) { + throw new ZodError3([makeArgsIssue(args, parsedArgs.error)]); + } + const result = Reflect.apply(fn, this, parsedArgs.data); + const parsedReturns = me._def.returns.safeParse(result, params); + if (!parsedReturns.success) { + throw new ZodError3([makeReturnsIssue(result, parsedReturns.error)]); + } + return parsedReturns.data; + }); + } + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...items) { + return new _ZodFunction({ + ...this._def, + args: ZodTuple3.create(items).rest(ZodUnknown3.create()) + }); + } + returns(returnType) { + return new _ZodFunction({ + ...this._def, + returns: returnType + }); + } + implement(func) { + const validatedFunc = this.parse(func); + return validatedFunc; + } + strictImplement(func) { + const validatedFunc = this.parse(func); + return validatedFunc; + } + static create(args, returns, params) { + return new _ZodFunction({ + args: args ? args : ZodTuple3.create([]).rest(ZodUnknown3.create()), + returns: returns || ZodUnknown3.create(), + typeName: ZodFirstPartyTypeKind3.ZodFunction, + ...processCreateParams(params) + }); } - reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config4, request3)); - request3 = null; }; - request3.onerror = function handleError(event) { - const msg = event && event.message ? event.message : "Network Error"; - const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config4, request3); - err.event = event || null; - reject(err); - request3 = null; + var ZodLazy3 = class extends ZodType3 { + get schema() { + return this._def.getter(); + } + _parse(input) { + const { ctx } = this._processInputParams(input); + const lazySchema = this._def.getter(); + return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx }); + } }; - request3.ontimeout = function handleTimeout() { - let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; - const transitional2 = _config.transitional || transitional_default; - if (_config.timeoutErrorMessage) { - timeoutErrorMessage = _config.timeoutErrorMessage; + ZodLazy3.create = (getter, params) => { + return new ZodLazy3({ + getter, + typeName: ZodFirstPartyTypeKind3.ZodLazy, + ...processCreateParams(params) + }); + }; + var ZodLiteral3 = class extends ZodType3 { + _parse(input) { + if (input.data !== this._def.value) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode3.invalid_literal, + expected: this._def.value + }); + return INVALID; + } + return { status: "valid", value: input.data }; + } + get value() { + return this._def.value; } - reject( - new AxiosError_default( - timeoutErrorMessage, - transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, - config4, - request3 - ) - ); - request3 = null; }; - requestData === void 0 && requestHeaders.setContentType(null); - if ("setRequestHeader" in request3) { - utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request3.setRequestHeader(key, val); + ZodLiteral3.create = (value, params) => { + return new ZodLiteral3({ + value, + typeName: ZodFirstPartyTypeKind3.ZodLiteral, + ...processCreateParams(params) + }); + }; + function createZodEnum(values, params) { + return new ZodEnum3({ + values, + typeName: ZodFirstPartyTypeKind3.ZodEnum, + ...processCreateParams(params) }); } - if (!utils_default.isUndefined(_config.withCredentials)) { - request3.withCredentials = !!_config.withCredentials; - } - if (responseType && responseType !== "json") { - request3.responseType = _config.responseType; - } - if (onDownloadProgress) { - [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); - request3.addEventListener("progress", downloadThrottled); - } - if (onUploadProgress && request3.upload) { - [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); - request3.upload.addEventListener("progress", uploadThrottled); - request3.upload.addEventListener("loadend", flushUpload); - } - if (_config.cancelToken || _config.signal) { - onCanceled = (cancel) => { - if (!request3) { - return; + var ZodEnum3 = class _ZodEnum extends ZodType3 { + constructor() { + super(...arguments); + _ZodEnum_cache.set(this, void 0); + } + _parse(input) { + if (typeof input.data !== "string") { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext(ctx, { + expected: util3.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode3.invalid_type + }); + return INVALID; + } + if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) { + __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f"); + } + if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode3.invalid_enum_value, + options: expectedValues + }); + return INVALID; } - reject(!cancel || cancel.type ? new CanceledError_default(null, config4, request3) : cancel); - request3.abort(); - request3 = null; - }; - _config.cancelToken && _config.cancelToken.subscribe(onCanceled); - if (_config.signal) { - _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); + return OK(input.data); } - } - const protocol = parseProtocol(_config.url); - if (protocol && platform_default.protocols.indexOf(protocol) === -1) { - reject( - new AxiosError_default( - "Unsupported protocol " + protocol + ":", - AxiosError_default.ERR_BAD_REQUEST, - config4 - ) - ); - return; - } - request3.send(requestData || null); - }); -}; - -// node_modules/axios/lib/helpers/composeSignals.js -var composeSignals = (signals, timeout) => { - const { length } = signals = signals ? signals.filter(Boolean) : []; - if (timeout || length) { - let controller = new AbortController(); - let aborted4; - const onabort = function(reason) { - if (!aborted4) { - aborted4 = true; - unsubscribe(); - const err = reason instanceof Error ? reason : this.reason; - controller.abort( - err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) - ); + get options() { + return this._def.values; } - }; - let timer = timeout && setTimeout(() => { - timer = null; - onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); - }, timeout); - const unsubscribe = () => { - if (signals) { - timer && clearTimeout(timer); - timer = null; - signals.forEach((signal2) => { - signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + get enum() { + const enumValues = {}; + for (const val of this._def.values) { + enumValues[val] = val; + } + return enumValues; + } + get Values() { + const enumValues = {}; + for (const val of this._def.values) { + enumValues[val] = val; + } + return enumValues; + } + get Enum() { + const enumValues = {}; + for (const val of this._def.values) { + enumValues[val] = val; + } + return enumValues; + } + extract(values, newDef = this._def) { + return _ZodEnum.create(values, { + ...this._def, + ...newDef + }); + } + exclude(values, newDef = this._def) { + return _ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), { + ...this._def, + ...newDef }); - signals = null; } }; - signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); - const { signal } = controller; - signal.unsubscribe = () => utils_default.asap(unsubscribe); - return signal; - } -}; -var composeSignals_default = composeSignals; - -// node_modules/axios/lib/helpers/trackStream.js -var streamChunk = function* (chunk, chunkSize) { - let len = chunk.byteLength; - if (!chunkSize || len < chunkSize) { - yield chunk; - return; - } - let pos = 0; - let end; - while (pos < len) { - end = pos + chunkSize; - yield chunk.slice(pos, end); - pos = end; - } -}; -var readBytes = async function* (iterable, chunkSize) { - for await (const chunk of readStream(iterable)) { - yield* streamChunk(chunk, chunkSize); - } -}; -var readStream = async function* (stream4) { - if (stream4[Symbol.asyncIterator]) { - yield* stream4; - return; - } - const reader = stream4.getReader(); - try { - for (; ; ) { - const { done, value } = await reader.read(); - if (done) { - break; + _ZodEnum_cache = /* @__PURE__ */ new WeakMap(); + ZodEnum3.create = createZodEnum; + var ZodNativeEnum = class extends ZodType3 { + constructor() { + super(...arguments); + _ZodNativeEnum_cache.set(this, void 0); + } + _parse(input) { + const nativeEnumValues = util3.getValidEnumValues(this._def.values); + const ctx = this._getOrReturnCtx(input); + if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) { + const expectedValues = util3.objectValues(nativeEnumValues); + addIssueToContext(ctx, { + expected: util3.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode3.invalid_type + }); + return INVALID; + } + if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) { + __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util3.getValidEnumValues(this._def.values)), "f"); + } + if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) { + const expectedValues = util3.objectValues(nativeEnumValues); + addIssueToContext(ctx, { + received: ctx.data, + code: ZodIssueCode3.invalid_enum_value, + options: expectedValues + }); + return INVALID; + } + return OK(input.data); } - yield value; - } - } finally { - await reader.cancel(); - } -}; -var trackStream = (stream4, chunkSize, onProgress, onFinish) => { - const iterator3 = readBytes(stream4, chunkSize); - let bytes = 0; - let done; - let _onFinish = (e) => { - if (!done) { - done = true; - onFinish && onFinish(e); - } - }; - return new ReadableStream( - { - async pull(controller) { - try { - const { done: done2, value } = await iterator3.next(); - if (done2) { - _onFinish(); - controller.close(); - return; + get enum() { + return this._def.values; + } + }; + _ZodNativeEnum_cache = /* @__PURE__ */ new WeakMap(); + ZodNativeEnum.create = (values, params) => { + return new ZodNativeEnum({ + values, + typeName: ZodFirstPartyTypeKind3.ZodNativeEnum, + ...processCreateParams(params) + }); + }; + var ZodPromise3 = class extends ZodType3 { + unwrap() { + return this._def.type; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) { + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.promise, + received: ctx.parsedType + }); + return INVALID; + } + const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data); + return OK(promisified.then((data) => { + return this._def.type.parseAsync(data, { + path: ctx.path, + errorMap: ctx.common.contextualErrorMap + }); + })); + } + }; + ZodPromise3.create = (schema, params) => { + return new ZodPromise3({ + type: schema, + typeName: ZodFirstPartyTypeKind3.ZodPromise, + ...processCreateParams(params) + }); + }; + var ZodEffects = class extends ZodType3 { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === ZodFirstPartyTypeKind3.ZodEffects ? this._def.schema.sourceType() : this._def.schema; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const effect = this._def.effect || null; + const checkCtx = { + addIssue: (arg) => { + addIssueToContext(ctx, arg); + if (arg.fatal) { + status.abort(); + } else { + status.dirty(); + } + }, + get path() { + return ctx.path; } - let len = value.byteLength; - if (onProgress) { - let loadedBytes = bytes += len; - onProgress(loadedBytes); + }; + checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx); + if (effect.type === "preprocess") { + const processed = effect.transform(ctx.data, checkCtx); + if (ctx.common.async) { + return Promise.resolve(processed).then(async (processed2) => { + if (status.value === "aborted") + return INVALID; + const result = await this._def.schema._parseAsync({ + data: processed2, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID; + if (result.status === "dirty") + return DIRTY(result.value); + if (status.value === "dirty") + return DIRTY(result.value); + return result; + }); + } else { + if (status.value === "aborted") + return INVALID; + const result = this._def.schema._parseSync({ + data: processed, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID; + if (result.status === "dirty") + return DIRTY(result.value); + if (status.value === "dirty") + return DIRTY(result.value); + return result; } - controller.enqueue(new Uint8Array(value)); - } catch (err) { - _onFinish(err); - throw err; } - }, - cancel(reason) { - _onFinish(reason); - return iterator3.return(); + if (effect.type === "refinement") { + const executeRefinement = (acc) => { + const result = effect.refinement(acc, checkCtx); + if (ctx.common.async) { + return Promise.resolve(result); + } + if (result instanceof Promise) { + throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); + } + return acc; + }; + if (ctx.common.async === false) { + const inner = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inner.status === "aborted") + return INVALID; + if (inner.status === "dirty") + status.dirty(); + executeRefinement(inner.value); + return { status: status.value, value: inner.value }; + } else { + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => { + if (inner.status === "aborted") + return INVALID; + if (inner.status === "dirty") + status.dirty(); + return executeRefinement(inner.value).then(() => { + return { status: status.value, value: inner.value }; + }); + }); + } + } + if (effect.type === "transform") { + if (ctx.common.async === false) { + const base = this._def.schema._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (!isValid2(base)) + return base; + const result = effect.transform(base.value, checkCtx); + if (result instanceof Promise) { + throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`); + } + return { status: status.value, value: result }; + } else { + return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => { + if (!isValid2(base)) + return base; + return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result })); + }); + } + } + util3.assertNever(effect); } - }, - { - highWaterMark: 2 - } - ); -}; - -// node_modules/axios/lib/adapters/fetch.js -var DEFAULT_CHUNK_SIZE = 64 * 1024; -var { isFunction: isFunction2 } = utils_default; -var globalFetchAPI = (({ Request, Response }) => ({ - Request, - Response -}))(utils_default.global); -var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global; -var test = (fn, ...args) => { - try { - return !!fn(...args); - } catch (e) { - return false; - } -}; -var factory = (env) => { - env = utils_default.merge.call( - { - skipUndefined: true - }, - globalFetchAPI, - env - ); - const { fetch: envFetch, Request, Response } = env; - const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function"; - const isRequestSupported = isFunction2(Request); - const isResponseSupported = isFunction2(Response); - if (!isFetchSupported) { - return false; - } - const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2); - const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); - const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { - let duplexAccessed = false; - const hasContentType = new Request(platform_default.origin, { - body: new ReadableStream2(), - method: "POST", - get duplex() { - duplexAccessed = true; - return "half"; + }; + ZodEffects.create = (schema, effect, params) => { + return new ZodEffects({ + schema, + typeName: ZodFirstPartyTypeKind3.ZodEffects, + effect, + ...processCreateParams(params) + }); + }; + ZodEffects.createWithPreprocess = (preprocess3, schema, params) => { + return new ZodEffects({ + schema, + effect: { type: "preprocess", transform: preprocess3 }, + typeName: ZodFirstPartyTypeKind3.ZodEffects, + ...processCreateParams(params) + }); + }; + var ZodOptional3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 === ZodParsedType.undefined) { + return OK(void 0); + } + return this._def.innerType._parse(input); } - }).headers.has("Content-Type"); - return duplexAccessed && !hasContentType; - }); - const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body)); - const resolvers = { - stream: supportsResponseStream && ((res) => res.body) - }; - isFetchSupported && (() => { - ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { - !resolvers[type] && (resolvers[type] = (res, config4) => { - let method = res && res[type]; - if (method) { - return method.call(res); + unwrap() { + return this._def.innerType; + } + }; + ZodOptional3.create = (type, params) => { + return new ZodOptional3({ + innerType: type, + typeName: ZodFirstPartyTypeKind3.ZodOptional, + ...processCreateParams(params) + }); + }; + var ZodNullable3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 === ZodParsedType.null) { + return OK(null); } - throw new AxiosError_default( - `Response type '${type}' is not supported`, - AxiosError_default.ERR_NOT_SUPPORT, - config4 - ); + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } + }; + ZodNullable3.create = (type, params) => { + return new ZodNullable3({ + innerType: type, + typeName: ZodFirstPartyTypeKind3.ZodNullable, + ...processCreateParams(params) }); - }); - })(); - const getBodyLength = async (body) => { - if (body == null) { - return 0; - } - if (utils_default.isBlob(body)) { - return body.size; - } - if (utils_default.isSpecCompliantForm(body)) { - const _request = new Request(platform_default.origin, { - method: "POST", - body + }; + var ZodDefault3 = class extends ZodType3 { + _parse(input) { + const { ctx } = this._processInputParams(input); + let data = ctx.data; + if (ctx.parsedType === ZodParsedType.undefined) { + data = this._def.defaultValue(); + } + return this._def.innerType._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + removeDefault() { + return this._def.innerType; + } + }; + ZodDefault3.create = (type, params) => { + return new ZodDefault3({ + innerType: type, + typeName: ZodFirstPartyTypeKind3.ZodDefault, + defaultValue: typeof params.default === "function" ? params.default : () => params.default, + ...processCreateParams(params) }); - return (await _request.arrayBuffer()).byteLength; - } - if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { - return body.byteLength; - } - if (utils_default.isURLSearchParams(body)) { - body = body + ""; - } - if (utils_default.isString(body)) { - return (await encodeText(body)).byteLength; - } - }; - const resolveBodyLength = async (headers, body) => { - const length = utils_default.toFiniteNumber(headers.getContentLength()); - return length == null ? getBodyLength(body) : length; - }; - return async (config4) => { - let { - url: url5, - method, - data, - signal, - cancelToken, - timeout, - onDownloadProgress, - onUploadProgress, - responseType, - headers, - withCredentials = "same-origin", - fetchOptions - } = resolveConfig_default(config4); - let _fetch = envFetch || fetch; - responseType = responseType ? (responseType + "").toLowerCase() : "text"; - let composedSignal = composeSignals_default( - [signal, cancelToken && cancelToken.toAbortSignal()], - timeout - ); - let request3 = null; - const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { - composedSignal.unsubscribe(); - }); - let requestContentLength; - try { - if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { - let _request = new Request(url5, { - method: "POST", - body: data, - duplex: "half" + }; + var ZodCatch3 = class extends ZodType3 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const newCtx = { + ...ctx, + common: { + ...ctx.common, + issues: [] + } + }; + const result = this._def.innerType._parse({ + data: newCtx.data, + path: newCtx.path, + parent: { + ...newCtx + } }); - let contentTypeHeader; - if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { - headers.setContentType(contentTypeHeader); - } - if (_request.body) { - const [onProgress, flush] = progressEventDecorator( - requestContentLength, - progressEventReducer(asyncDecorator(onUploadProgress)) - ); - data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); + if (isAsync(result)) { + return result.then((result2) => { + return { + status: "valid", + value: result2.status === "valid" ? result2.value : this._def.catchValue({ + get error() { + return new ZodError3(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + }); + } else { + return { + status: "valid", + value: result.status === "valid" ? result.value : this._def.catchValue({ + get error() { + return new ZodError3(newCtx.common.issues); + }, + input: newCtx.data + }) + }; } } - if (!utils_default.isString(withCredentials)) { - withCredentials = withCredentials ? "include" : "omit"; + removeCatch() { + return this._def.innerType; } - const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype; - const resolvedOptions = { - ...fetchOptions, - signal: composedSignal, - method: method.toUpperCase(), - headers: headers.normalize().toJSON(), - body: data, - duplex: "half", - credentials: isCredentialsSupported ? withCredentials : void 0 - }; - request3 = isRequestSupported && new Request(url5, resolvedOptions); - let response = await (isRequestSupported ? _fetch(request3, fetchOptions) : _fetch(url5, resolvedOptions)); - const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); - if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { - const options = {}; - ["status", "statusText", "headers"].forEach((prop) => { - options[prop] = response[prop]; + }; + ZodCatch3.create = (type, params) => { + return new ZodCatch3({ + innerType: type, + typeName: ZodFirstPartyTypeKind3.ZodCatch, + catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, + ...processCreateParams(params) + }); + }; + var ZodNaN3 = class extends ZodType3 { + _parse(input) { + const parsedType3 = this._getType(input); + if (parsedType3 !== ZodParsedType.nan) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext(ctx, { + code: ZodIssueCode3.invalid_type, + expected: ZodParsedType.nan, + received: ctx.parsedType + }); + return INVALID; + } + return { status: "valid", value: input.data }; + } + }; + ZodNaN3.create = (params) => { + return new ZodNaN3({ + typeName: ZodFirstPartyTypeKind3.ZodNaN, + ...processCreateParams(params) + }); + }; + var BRAND = /* @__PURE__ */ Symbol("zod_brand"); + var ZodBranded = class extends ZodType3 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const data = ctx.data; + return this._def.type._parse({ + data, + path: ctx.path, + parent: ctx }); - const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); - const [onProgress, flush] = onDownloadProgress && progressEventDecorator( - responseContentLength, - progressEventReducer(asyncDecorator(onDownloadProgress), true) - ) || []; - response = new Response( - trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { - flush && flush(); - unsubscribe && unsubscribe(); - }), - options - ); } - responseType = responseType || "text"; - let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( - response, - config4 - ); - !isStreamResponse && unsubscribe && unsubscribe(); - return await new Promise((resolve, reject) => { - settle(resolve, reject, { - data: responseData, - headers: AxiosHeaders_default.from(response.headers), - status: response.status, - statusText: response.statusText, - config: config4, - request: request3 + unwrap() { + return this._def.type; + } + }; + var ZodPipeline = class _ZodPipeline extends ZodType3 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.common.async) { + const handleAsync = async () => { + const inResult = await this._def.in._parseAsync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inResult.status === "aborted") + return INVALID; + if (inResult.status === "dirty") { + status.dirty(); + return DIRTY(inResult.value); + } else { + return this._def.out._parseAsync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + }; + return handleAsync(); + } else { + const inResult = this._def.in._parseSync({ + data: ctx.data, + path: ctx.path, + parent: ctx + }); + if (inResult.status === "aborted") + return INVALID; + if (inResult.status === "dirty") { + status.dirty(); + return { + status: "dirty", + value: inResult.value + }; + } else { + return this._def.out._parseSync({ + data: inResult.value, + path: ctx.path, + parent: ctx + }); + } + } + } + static create(a, b) { + return new _ZodPipeline({ + in: a, + out: b, + typeName: ZodFirstPartyTypeKind3.ZodPipeline }); + } + }; + var ZodReadonly3 = class extends ZodType3 { + _parse(input) { + const result = this._def.innerType._parse(input); + const freeze = (data) => { + if (isValid2(data)) { + data.value = Object.freeze(data.value); + } + return data; + }; + return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result); + } + unwrap() { + return this._def.innerType; + } + }; + ZodReadonly3.create = (type, params) => { + return new ZodReadonly3({ + innerType: type, + typeName: ZodFirstPartyTypeKind3.ZodReadonly, + ...processCreateParams(params) }); - } catch (err) { - unsubscribe && unsubscribe(); - if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { - throw Object.assign( - new AxiosError_default( - "Network Error", - AxiosError_default.ERR_NETWORK, - config4, - request3, - err && err.response - ), - { - cause: err.cause || err + }; + function cleanParams(params, data) { + const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params; + const p2 = typeof p === "string" ? { message: p } : p; + return p2; + } + function custom3(check3, _params = {}, fatal) { + if (check3) + return ZodAny3.create().superRefine((data, ctx) => { + var _a4, _b; + const r = check3(data); + if (r instanceof Promise) { + return r.then((r2) => { + var _a22, _b2; + if (!r2) { + const params = cleanParams(_params, data); + const _fatal = (_b2 = (_a22 = params.fatal) !== null && _a22 !== void 0 ? _a22 : fatal) !== null && _b2 !== void 0 ? _b2 : true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + }); + } + if (!r) { + const params = cleanParams(_params, data); + const _fatal = (_b = (_a4 = params.fatal) !== null && _a4 !== void 0 ? _a4 : fatal) !== null && _b !== void 0 ? _b : true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + return; + }); + return ZodAny3.create(); + } + var late = { + object: ZodObject3.lazycreate + }; + var ZodFirstPartyTypeKind3; + (function(ZodFirstPartyTypeKind22) { + ZodFirstPartyTypeKind22["ZodString"] = "ZodString"; + ZodFirstPartyTypeKind22["ZodNumber"] = "ZodNumber"; + ZodFirstPartyTypeKind22["ZodNaN"] = "ZodNaN"; + ZodFirstPartyTypeKind22["ZodBigInt"] = "ZodBigInt"; + ZodFirstPartyTypeKind22["ZodBoolean"] = "ZodBoolean"; + ZodFirstPartyTypeKind22["ZodDate"] = "ZodDate"; + ZodFirstPartyTypeKind22["ZodSymbol"] = "ZodSymbol"; + ZodFirstPartyTypeKind22["ZodUndefined"] = "ZodUndefined"; + ZodFirstPartyTypeKind22["ZodNull"] = "ZodNull"; + ZodFirstPartyTypeKind22["ZodAny"] = "ZodAny"; + ZodFirstPartyTypeKind22["ZodUnknown"] = "ZodUnknown"; + ZodFirstPartyTypeKind22["ZodNever"] = "ZodNever"; + ZodFirstPartyTypeKind22["ZodVoid"] = "ZodVoid"; + ZodFirstPartyTypeKind22["ZodArray"] = "ZodArray"; + ZodFirstPartyTypeKind22["ZodObject"] = "ZodObject"; + ZodFirstPartyTypeKind22["ZodUnion"] = "ZodUnion"; + ZodFirstPartyTypeKind22["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; + ZodFirstPartyTypeKind22["ZodIntersection"] = "ZodIntersection"; + ZodFirstPartyTypeKind22["ZodTuple"] = "ZodTuple"; + ZodFirstPartyTypeKind22["ZodRecord"] = "ZodRecord"; + ZodFirstPartyTypeKind22["ZodMap"] = "ZodMap"; + ZodFirstPartyTypeKind22["ZodSet"] = "ZodSet"; + ZodFirstPartyTypeKind22["ZodFunction"] = "ZodFunction"; + ZodFirstPartyTypeKind22["ZodLazy"] = "ZodLazy"; + ZodFirstPartyTypeKind22["ZodLiteral"] = "ZodLiteral"; + ZodFirstPartyTypeKind22["ZodEnum"] = "ZodEnum"; + ZodFirstPartyTypeKind22["ZodEffects"] = "ZodEffects"; + ZodFirstPartyTypeKind22["ZodNativeEnum"] = "ZodNativeEnum"; + ZodFirstPartyTypeKind22["ZodOptional"] = "ZodOptional"; + ZodFirstPartyTypeKind22["ZodNullable"] = "ZodNullable"; + ZodFirstPartyTypeKind22["ZodDefault"] = "ZodDefault"; + ZodFirstPartyTypeKind22["ZodCatch"] = "ZodCatch"; + ZodFirstPartyTypeKind22["ZodPromise"] = "ZodPromise"; + ZodFirstPartyTypeKind22["ZodBranded"] = "ZodBranded"; + ZodFirstPartyTypeKind22["ZodPipeline"] = "ZodPipeline"; + ZodFirstPartyTypeKind22["ZodReadonly"] = "ZodReadonly"; + })(ZodFirstPartyTypeKind3 || (ZodFirstPartyTypeKind3 = {})); + var instanceOfType = (cls, params = { + message: `Input not instance of ${cls.name}` + }) => custom3((data) => data instanceof cls, params); + var stringType = ZodString3.create; + var numberType = ZodNumber3.create; + var nanType = ZodNaN3.create; + var bigIntType = ZodBigInt3.create; + var booleanType = ZodBoolean3.create; + var dateType = ZodDate3.create; + var symbolType = ZodSymbol3.create; + var undefinedType = ZodUndefined3.create; + var nullType = ZodNull3.create; + var anyType = ZodAny3.create; + var unknownType = ZodUnknown3.create; + var neverType = ZodNever3.create; + var voidType = ZodVoid3.create; + var arrayType = ZodArray3.create; + var objectType = ZodObject3.create; + var strictObjectType = ZodObject3.strictCreate; + var unionType = ZodUnion3.create; + var discriminatedUnionType = ZodDiscriminatedUnion3.create; + var intersectionType = ZodIntersection3.create; + var tupleType = ZodTuple3.create; + var recordType = ZodRecord3.create; + var mapType = ZodMap3.create; + var setType = ZodSet3.create; + var functionType = ZodFunction3.create; + var lazyType = ZodLazy3.create; + var literalType = ZodLiteral3.create; + var enumType = ZodEnum3.create; + var nativeEnumType = ZodNativeEnum.create; + var promiseType = ZodPromise3.create; + var effectsType = ZodEffects.create; + var optionalType = ZodOptional3.create; + var nullableType = ZodNullable3.create; + var preprocessType = ZodEffects.createWithPreprocess; + var pipelineType = ZodPipeline.create; + var ostring = () => stringType().optional(); + var onumber = () => numberType().optional(); + var oboolean = () => booleanType().optional(); + var coerce = { + string: (arg) => ZodString3.create({ ...arg, coerce: true }), + number: (arg) => ZodNumber3.create({ ...arg, coerce: true }), + boolean: (arg) => ZodBoolean3.create({ + ...arg, + coerce: true + }), + bigint: (arg) => ZodBigInt3.create({ ...arg, coerce: true }), + date: (arg) => ZodDate3.create({ ...arg, coerce: true }) + }; + var NEVER3 = INVALID; + var z3 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + defaultErrorMap: errorMap, + setErrorMap: setErrorMap3, + getErrorMap: getErrorMap3, + makeIssue, + EMPTY_PATH, + addIssueToContext, + ParseStatus, + INVALID, + DIRTY, + OK, + isAborted, + isDirty, + isValid: isValid2, + isAsync, + get util() { + return util3; + }, + get objectUtil() { + return objectUtil; + }, + ZodParsedType, + getParsedType: getParsedType3, + ZodType: ZodType3, + datetimeRegex, + ZodString: ZodString3, + ZodNumber: ZodNumber3, + ZodBigInt: ZodBigInt3, + ZodBoolean: ZodBoolean3, + ZodDate: ZodDate3, + ZodSymbol: ZodSymbol3, + ZodUndefined: ZodUndefined3, + ZodNull: ZodNull3, + ZodAny: ZodAny3, + ZodUnknown: ZodUnknown3, + ZodNever: ZodNever3, + ZodVoid: ZodVoid3, + ZodArray: ZodArray3, + ZodObject: ZodObject3, + ZodUnion: ZodUnion3, + ZodDiscriminatedUnion: ZodDiscriminatedUnion3, + ZodIntersection: ZodIntersection3, + ZodTuple: ZodTuple3, + ZodRecord: ZodRecord3, + ZodMap: ZodMap3, + ZodSet: ZodSet3, + ZodFunction: ZodFunction3, + ZodLazy: ZodLazy3, + ZodLiteral: ZodLiteral3, + ZodEnum: ZodEnum3, + ZodNativeEnum, + ZodPromise: ZodPromise3, + ZodEffects, + ZodTransformer: ZodEffects, + ZodOptional: ZodOptional3, + ZodNullable: ZodNullable3, + ZodDefault: ZodDefault3, + ZodCatch: ZodCatch3, + ZodNaN: ZodNaN3, + BRAND, + ZodBranded, + ZodPipeline, + ZodReadonly: ZodReadonly3, + custom: custom3, + Schema: ZodType3, + ZodSchema: ZodType3, + late, + get ZodFirstPartyTypeKind() { + return ZodFirstPartyTypeKind3; + }, + coerce, + any: anyType, + array: arrayType, + bigint: bigIntType, + boolean: booleanType, + date: dateType, + discriminatedUnion: discriminatedUnionType, + effect: effectsType, + "enum": enumType, + "function": functionType, + "instanceof": instanceOfType, + intersection: intersectionType, + lazy: lazyType, + literal: literalType, + map: mapType, + nan: nanType, + nativeEnum: nativeEnumType, + never: neverType, + "null": nullType, + nullable: nullableType, + number: numberType, + object: objectType, + oboolean, + onumber, + optional: optionalType, + ostring, + pipeline: pipelineType, + preprocess: preprocessType, + promise: promiseType, + record: recordType, + set: setType, + strictObject: strictObjectType, + string: stringType, + symbol: symbolType, + transformer: effectsType, + tuple: tupleType, + "undefined": undefinedType, + union: unionType, + unknown: unknownType, + "void": voidType, + NEVER: NEVER3, + ZodIssueCode: ZodIssueCode3, + quotelessJson, + ZodError: ZodError3 + }); + var idSchema = z3.string().min(1); + var metadataSchema = z3.object({ + template: z3.object({ + before: z3.string(), + after: z3.string() + }), + id: z3.string() + }); + var requestDetailsSchema2 = z3.object( + { + owner: z3.string().min(1), + repo: z3.string().min(1), + headers: z3.object({ + authorization: z3.string().min(1) + }) + }, + { + required_error: `Required settings wasn't provided: {owner: string, repo: string}` + } + ); + var metadataObjectSchema = z3.record( + z3.union([z3.string(), z3.array(z3.string()), z3.array(z3.record(z3.any()))]), + { + required_error: `Metadata doesn't have an expected structure: {key: string, value: string | string[] | object[]}` + } + ); + var MetadataController2 = class { + constructor(uniqueID, settings) { + const verifiedID = idSchema.parse(uniqueID); + this.requestDefaults = requestDetailsSchema2.parse(settings); + this.schema = { + id: verifiedID, + template: { + before: "" } + }; + this.regexp = new RegExp( + `^${this.schema.template.before}${verifiedID} = (.*)${this.schema.template.after}$`, + "m" ); } - throw AxiosError_default.from(err, err && err.code, config4, request3, err && err.response); - } - }; -}; -var seedCache = /* @__PURE__ */ new Map(); -var getFetch = (config4) => { - let env = config4 && config4.env || {}; - const { fetch: fetch3, Request, Response } = env; - const seeds = [Request, Response, fetch3]; - let len = seeds.length, i = len, seed, target, map4 = seedCache; - while (i--) { - seed = seeds[i]; - target = map4.get(seed); - target === void 0 && map4.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env)); - map4 = target; + async getMetadata(issue4, key) { + const body = (await request2("GET /repos/{owner}/{repo}/issues/{issue_number}", { + ...this.requestDefaults, + issue_number: issue4 + })).data.body || ""; + return parseMetadata(body, key, this.regexp); + } + async setMetadata(issue4, key, value) { + let issueBody = (await request2("GET /repos/{owner}/{repo}/issues/{issue_number}", { + ...this.requestDefaults, + issue_number: issue4 + })).data.body || ""; + let { body, metadata } = getBodyAndMetadata(issueBody, this.regexp); + const parsedMetadata = metadataObjectSchema.parse(metadata); + const trimmedBody = body.trim(); + const newMetadata = assignNewMetadata(parsedMetadata, key, value); + await request2("PATCH /repos/{owner}/{repo}/issues/{issue_number}", { + ...this.requestDefaults, + issue_number: issue4, + body: `${trimmedBody} + +${this.schema.template.before}${this.schema.id} = ${JSON.stringify(newMetadata)}${this.schema.template.after}` + }); + return newMetadata; + } + }; } - return target; -}; -var adapter = getFetch(); +}); -// node_modules/axios/lib/adapters/adapters.js -var knownAdapters = { - http: http_default, - xhr: xhr_default, - fetch: { - get: getFetch +// node_modules/@actions/core/lib/command.js +import * as os from "os"; + +// node_modules/@actions/core/lib/utils.js +function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; } -}; -utils_default.forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, "name", { value }); - } catch (e) { + return JSON.stringify(input); +} +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} + +// node_modules/@actions/core/lib/command.js +function issueCommand(command, properties, message2) { + const cmd = new Command(command, properties, message2); + process.stdout.write(cmd.toString() + os.EOL); +} +var CMD_STRING = "::"; +var Command = class { + constructor(command, properties, message2) { + if (!command) { + command = "missing.command"; } - Object.defineProperty(fn, "adapterName", { value }); + this.command = command; + this.properties = properties; + this.message = message2; } -}); -var renderReason = (reason) => `- ${reason}`; -var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false; -function getAdapter(adapters, config4) { - adapters = utils_default.isArray(adapters) ? adapters : [adapters]; - const { length } = adapters; - let nameOrAdapter; - let adapter2; - const rejectedReasons = {}; - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters[i]; - let id; - adapter2 = nameOrAdapter; - if (!isResolvedHandle(nameOrAdapter)) { - adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; - if (adapter2 === void 0) { - throw new AxiosError_default(`Unknown adapter '${id}'`); + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += " "; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } else { + cmdStr += ","; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } } } - if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config4)))) { - break; - } - rejectedReasons[id || "#" + i] = adapter2; - } - if (!adapter2) { - const reasons = Object.entries(rejectedReasons).map( - ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") - ); - let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; - throw new AxiosError_default( - `There is no suitable adapter to dispatch the request ` + s, - "ERR_NOT_SUPPORT" - ); + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; } - return adapter2; -} -var adapters_default = { - /** - * Resolve an adapter from a list of adapter names or functions. - * @type {Function} - */ - getAdapter, - /** - * Exposes all known adapters - * @type {Object} - */ - adapters: knownAdapters }; +function escapeData(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); +} +function escapeProperty(s) { + return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); +} -// node_modules/axios/lib/core/dispatchRequest.js -function throwIfCancellationRequested(config4) { - if (config4.cancelToken) { - config4.cancelToken.throwIfRequested(); +// node_modules/@actions/core/lib/file-command.js +import * as crypto from "crypto"; +import * as fs from "fs"; +import * as os2 from "os"; +function issueFileCommand(command, message2) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); } - if (config4.signal && config4.signal.aborted) { - throw new CanceledError_default(null, config4); + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); } + fs.appendFileSync(filePath, `${toCommandValue(message2)}${os2.EOL}`, { + encoding: "utf8" + }); } -function dispatchRequest(config4) { - throwIfCancellationRequested(config4); - config4.headers = AxiosHeaders_default.from(config4.headers); - config4.data = transformData.call(config4, config4.transformRequest); - if (["post", "put", "patch"].indexOf(config4.method) !== -1) { - config4.headers.setContentType("application/x-www-form-urlencoded", false); +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto.randomUUID()}`; + const convertedValue = toCommandValue(value); + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); } - const adapter2 = adapters_default.getAdapter(config4.adapter || defaults_default.adapter, config4); - return adapter2(config4).then( - function onAdapterResolution(response) { - throwIfCancellationRequested(config4); - response.data = transformData.call(config4, config4.transformResponse, response); - response.headers = AxiosHeaders_default.from(response.headers); - return response; - }, - function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config4); - if (reason && reason.response) { - reason.response.data = transformData.call( - config4, - config4.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders_default.from(reason.response.headers); - } - } - return Promise.reject(reason); - } - ); + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } -// node_modules/axios/lib/helpers/validator.js -var validators = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => { - validators[type] = function validator(thing) { - return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; - }; -}); -var deprecatedWarnings = {}; -validators.transitional = function transitional(validator, version4, message2) { - function formatMessage(opt, desc) { - return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message2 ? ". " + message2 : ""); +// node_modules/@actions/core/lib/core.js +import * as os4 from "os"; + +// node_modules/@actions/http-client/lib/index.js +var tunnel = __toESM(require_tunnel2(), 1); +var import_undici = __toESM(require_undici(), 1); +var HttpCodes; +(function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes || (HttpCodes = {})); +var Headers; +(function(Headers2) { + Headers2["Accept"] = "accept"; + Headers2["ContentType"] = "content-type"; +})(Headers || (Headers = {})); +var MediaTypes; +(function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; +})(MediaTypes || (MediaTypes = {})); +var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; + +// node_modules/@actions/core/lib/summary.js +import { EOL as EOL3 } from "os"; +import { constants, promises } from "fs"; +var __awaiter = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); } - return (value, opt, opts) => { - if (validator === false) { - throw new AxiosError_default( - formatMessage(opt, " has been removed" + (version4 ? " in " + version4 : "")), - AxiosError_default.ERR_DEPRECATED - ); - } - if (version4 && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - console.warn( - formatMessage( - opt, - " has been deprecated since v" + version4 + " and will be removed in the near future" - ) - ); + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - return validator ? validator(value, opt, opts) : true; - }; -}; -validators.spelling = function spelling(correctSpelling) { - return (value, opt) => { - console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); - return true; - }; -}; -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== "object") { - throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator = schema[opt]; - if (validator) { - const value = options[opt]; - const result = value === void 0 || validator(value, opt, options); - if (result !== true) { - throw new AxiosError_default( - "option " + opt + " must be " + result, - AxiosError_default.ERR_BAD_OPTION_VALUE - ); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } - continue; } - if (allowUnknown !== true) { - throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION); + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - } -} -var validator_default = { - assertOptions, - validators + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - -// node_modules/axios/lib/core/Axios.js -var validators2 = validator_default.validators; -var Axios = class { - constructor(instanceConfig) { - this.defaults = instanceConfig || {}; - this.interceptors = { - request: new InterceptorManager_default(), - response: new InterceptorManager_default() - }; +var { access, appendFile, writeFile } = promises; +var SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +var Summary = class { + constructor() { + this._buffer = ""; } /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. * - * @returns {Promise} The Promise to be fulfilled + * @returns step summary file path */ - async request(configOrUrl, config4) { - try { - return await this._request(configOrUrl, config4); - } catch (err) { - if (err instanceof Error) { - let dummy = {}; - Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); - const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; - try { - if (!err.stack) { - err.stack = stack; - } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { - err.stack += "\n" + stack; - } - } catch (e) { - } - } - throw err; - } - } - _request(configOrUrl, config4) { - if (typeof configOrUrl === "string") { - config4 = config4 || {}; - config4.url = configOrUrl; - } else { - config4 = configOrUrl || {}; - } - config4 = mergeConfig(this.defaults, config4); - const { transitional: transitional2, paramsSerializer, headers } = config4; - if (transitional2 !== void 0) { - validator_default.assertOptions( - transitional2, - { - silentJSONParsing: validators2.transitional(validators2.boolean), - forcedJSONParsing: validators2.transitional(validators2.boolean), - clarifyTimeoutError: validators2.transitional(validators2.boolean), - legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean) - }, - false - ); - } - if (paramsSerializer != null) { - if (utils_default.isFunction(paramsSerializer)) { - config4.paramsSerializer = { - serialize: paramsSerializer - }; - } else { - validator_default.assertOptions( - paramsSerializer, - { - encode: validators2.function, - serialize: validators2.function - }, - true - ); - } - } - if (config4.allowAbsoluteUrls !== void 0) { - } else if (this.defaults.allowAbsoluteUrls !== void 0) { - config4.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; - } else { - config4.allowAbsoluteUrls = true; - } - validator_default.assertOptions( - config4, - { - baseUrl: validators2.spelling("baseURL"), - withXsrfToken: validators2.spelling("withXSRFToken") - }, - true - ); - config4.method = (config4.method || this.defaults.method || "get").toLowerCase(); - let contextHeaders = headers && utils_default.merge(headers.common, headers[config4.method]); - headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => { - delete headers[method]; - }); - config4.headers = AxiosHeaders_default.concat(contextHeaders, headers); - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config4) === false) { - return; - } - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - const transitional3 = config4.transitional || transitional_default; - const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; - if (legacyInterceptorReqResOrdering) { - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - } else { - requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; } - }); - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - let promise4; - let i = 0; - let len; - if (!synchronousRequestInterceptors) { - const chain = [dispatchRequest.bind(this), void 0]; - chain.unshift(...requestInterceptorChain); - chain.push(...responseInterceptorChain); - len = chain.length; - promise4 = Promise.resolve(config4); - while (i < len) { - promise4 = promise4.then(chain[i++], chain[i++]); + const pathFromEnv = process.env[SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); } - return promise4; - } - len = requestInterceptorChain.length; - let newConfig = config4; - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; try { - newConfig = onFulfilled(newConfig); - } catch (error100) { - onRejected.call(this, error100); - break; + yield access(pathFromEnv, constants.R_OK | constants.W_OK); + } catch (_a4) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); } - } - try { - promise4 = dispatchRequest.call(this, newConfig); - } catch (error100) { - return Promise.reject(error100); - } - i = 0; - len = responseInterceptorChain.length; - while (i < len) { - promise4 = promise4.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - return promise4; - } - getUri(config4) { - config4 = mergeConfig(this.defaults, config4); - const fullPath = buildFullPath(config4.baseURL, config4.url, config4.allowAbsoluteUrls); - return buildURL(fullPath, config4.params, config4.paramsSerializer); - } -}; -utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) { - Axios.prototype[method] = function(url5, config4) { - return this.request( - mergeConfig(config4 || {}, { - method, - url: url5, - data: (config4 || {}).data - }) - ); - }; -}); -utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) { - function generateHTTPMethod(isForm) { - return function httpMethod(url5, data, config4) { - return this.request( - mergeConfig(config4 || {}, { - method, - headers: isForm ? { - "Content-Type": "multipart/form-data" - } : {}, - url: url5, - data - }) - ); - }; + this._filePath = pathFromEnv; + return this._filePath; + }); } - Axios.prototype[method] = generateHTTPMethod(); - Axios.prototype[method + "Form"] = generateHTTPMethod(true); -}); -var Axios_default = Axios; - -// node_modules/axios/lib/cancel/CancelToken.js -var CancelToken = class _CancelToken { - constructor(executor) { - if (typeof executor !== "function") { - throw new TypeError("executor must be a function."); + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; } - let resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - const token = this; - this.promise.then((cancel) => { - if (!token._listeners) return; - let i = token._listeners.length; - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); }); - this.promise.then = (onfulfilled) => { - let _resolve; - const promise4 = new Promise((resolve) => { - token.subscribe(resolve); - _resolve = resolve; - }).then(onfulfilled); - promise4.cancel = function reject() { - token.unsubscribe(_resolve); - }; - return promise4; - }; - executor(function cancel(message2, config4, request3) { - if (token.reason) { - return; - } - token.reason = new CanceledError_default(message2, config4, request3); - resolvePromise(token.reason); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); }); } /** - * Throws a `CanceledError` if cancellation has been requested. + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } + stringify() { + return this._buffer; } /** - * Subscribe to the cancel signal + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty */ - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } + isEmptyBuffer() { + return this._buffer.length === 0; } /** - * Unsubscribe from the cancel signal + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance */ - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } + emptyBuffer() { + this._buffer = ""; + return this; } - toAbortSignal() { - const controller = new AbortController(); - const abort = (err) => { - controller.abort(err); - }; - this.subscribe(abort); - controller.signal.unsubscribe = () => this.unsubscribe(abort); - return controller.signal; + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; } /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance */ - static source() { - let cancel; - const token = new _CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; + addEOL() { + return this.addRaw(EOL3); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); } }; -var CancelToken_default = CancelToken; +var _summary = new Summary(); +var summary = _summary; -// node_modules/axios/lib/helpers/spread.js -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} +// node_modules/@actions/core/lib/platform.js +import os3 from "os"; -// node_modules/axios/lib/helpers/isAxiosError.js -function isAxiosError(payload) { - return utils_default.isObject(payload) && payload.isAxiosError === true; -} +// node_modules/@actions/io/lib/io-util.js +import * as fs2 from "fs"; +var { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs2.promises; +var IS_WINDOWS = process.platform === "win32"; +var READONLY = fs2.constants.O_RDONLY; -// node_modules/axios/lib/helpers/HttpStatusCode.js -var HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511, - WebServerIsDown: 521, - ConnectionTimedOut: 522, - OriginIsUnreachable: 523, - TimeoutOccurred: 524, - SslHandshakeFailed: 525, - InvalidSslCertificate: 526 -}; -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); -var HttpStatusCode_default = HttpStatusCode; +// node_modules/@actions/exec/lib/toolrunner.js +var IS_WINDOWS2 = process.platform === "win32"; -// node_modules/axios/lib/axios.js -function createInstance(defaultConfig) { - const context3 = new Axios_default(defaultConfig); - const instance = bind(Axios_default.prototype.request, context3); - utils_default.extend(instance, Axios_default.prototype, context3, { allOwnKeys: true }); - utils_default.extend(instance, context3, null, { allOwnKeys: true }); - instance.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig, instanceConfig)); - }; - return instance; +// node_modules/@actions/core/lib/platform.js +var platform = os3.platform(); +var arch = os3.arch(); + +// node_modules/@actions/core/lib/core.js +var ExitCode; +(function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; +})(ExitCode || (ExitCode = {})); +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +function getBooleanInput(name, options) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return issueFileCommand("OUTPUT", prepareKeyValueMessage(name, value)); + } + process.stdout.write(os4.EOL); + issueCommand("set-output", { name }, toCommandValue(value)); +} +function setFailed(message2) { + process.exitCode = ExitCode.Failure; + error(message2); +} +function debug(message2) { + issueCommand("debug", {}, message2); +} +function error(message2, properties = {}) { + issueCommand("error", toCommandProperties(properties), message2 instanceof Error ? message2.toString() : message2); +} +function warning(message2, properties = {}) { + issueCommand("warning", toCommandProperties(properties), message2 instanceof Error ? message2.toString() : message2); +} +function notice(message2, properties = {}) { + issueCommand("notice", toCommandProperties(properties), message2 instanceof Error ? message2.toString() : message2); +} +function info(message2) { + process.stdout.write(message2 + os4.EOL); +} +function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return issueFileCommand("STATE", prepareKeyValueMessage(name, value)); + } + issueCommand("save-state", { name }, toCommandValue(value)); +} +function getState(name) { + return process.env[`STATE_${name}`] || ""; } -var axios = createInstance(defaults_default); -axios.Axios = Axios_default; -axios.CanceledError = CanceledError_default; -axios.CancelToken = CancelToken_default; -axios.isCancel = isCancel; -axios.VERSION = VERSION; -axios.toFormData = toFormData_default; -axios.AxiosError = AxiosError_default; -axios.Cancel = axios.CanceledError; -axios.all = function all(promises3) { - return Promise.all(promises3); -}; -axios.spread = spread; -axios.isAxiosError = isAxiosError; -axios.mergeConfig = mergeConfig; -axios.AxiosHeaders = AxiosHeaders_default; -axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); -axios.getAdapter = adapters_default.getAdapter; -axios.HttpStatusCode = HttpStatusCode_default; -axios.default = axios; -var axios_default = axios; -// node_modules/axios/index.js -var { - Axios: Axios2, - AxiosError: AxiosError2, - CanceledError: CanceledError2, - isCancel: isCancel2, - CancelToken: CancelToken2, - VERSION: VERSION2, - all: all2, - Cancel, - isAxiosError: isAxiosError2, - spread: spread2, - toFormData: toFormData2, - AxiosHeaders: AxiosHeaders2, - HttpStatusCode: HttpStatusCode2, - formToJSON, - getAdapter: getAdapter2, - mergeConfig: mergeConfig2 -} = axios_default; +// node_modules/axios/lib/helpers/bind.js +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} -// node_modules/testing-farm/dist/link.js -import { URL as URL2 } from "url"; -async function performRequest(config4) { - var _a5, _b; +// node_modules/axios/lib/utils.js +var { toString } = Object.prototype; +var { getPrototypeOf } = Object; +var { iterator, toStringTag } = Symbol; +var kindOf = /* @__PURE__ */ ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(/* @__PURE__ */ Object.create(null)); +var kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; +}; +var typeOfTest = (type) => (thing) => typeof thing === type; +var { isArray } = Array; +var isUndefined = typeOfTest("undefined"); +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +var isArrayBuffer = kindOfTest("ArrayBuffer"); +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; +} +var isString = typeOfTest("string"); +var isFunction = typeOfTest("function"); +var isNumber = typeOfTest("number"); +var isObject = (thing) => thing !== null && typeof thing === "object"; +var isBoolean = (thing) => thing === true || thing === false; +var isPlainObject = (val) => { + if (kindOf(val) !== "object") { + return false; + } + const prototype2 = getPrototypeOf(val); + return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val); +}; +var isEmptyObject = (val) => { + if (!isObject(val) || isBuffer(val)) { + return false; + } try { - let response = await axios_default.request(Object.assign(Object.assign({}, config4), { headers: Object.assign({ Accept: "application/json" }, (_a5 = config4.headers) !== null && _a5 !== void 0 ? _a5 : {}) })); - return response.data; + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; } catch (e) { - if (axios_default.isAxiosError(e)) { - throw new Error(JSON.stringify((_b = e.response) === null || _b === void 0 ? void 0 : _b.data)); - } else { - throw e; + return false; + } +}; +var isDate = kindOfTest("Date"); +var isFile = kindOfTest("File"); +var isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== "undefined"); +}; +var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined"; +var isBlob = kindOfTest("Blob"); +var isFileList = kindOfTest("FileList"); +var isStream = (val) => isObject(val) && isFunction(val.pipe); +function getGlobal() { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + return {}; +} +var G = getGlobal(); +var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0; +var isFormData = (thing) => { + let kind; + return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance + kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]")); +}; +var isURLSearchParams = kindOfTest("URLSearchParams"); +var [isReadableStream, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" +].map(kindOfTest); +var trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +}; +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") { + return; + } + let i; + let l; + if (typeof obj !== "object") { + obj = [obj]; + } + if (isArray(obj)) { + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + if (isBuffer(obj)) { + return; + } + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); } } } -var TestingFarmLink = class { - constructor(instance) { - this.instance = instance; +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; } - buildURL(path, searchParams) { - let url5 = new URL2(`${this.instance.pathname}/${path}`, this.instance); - if (searchParams) { - url5.search = new URLSearchParams(searchParams).toString(); + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; } - return url5; } - async get(path, searchParams) { - const url5 = searchParams ? this.buildURL(path, searchParams) : this.buildURL(path); - const config4 = { - url: url5.toString(), - method: "GET" - }; - return this.request(config4); + return null; +} +var _global = (() => { + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; +})(); +var isContextDefined = (context3) => !isUndefined(context3) && context3 !== _global; +function merge() { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = (val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return; + } + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject(result[targetKey]) && isPlainObject(val)) { + result[targetKey] = merge(result[targetKey], val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); } - async post(path, data) { - const config4 = { - url: this.buildURL(path).toString(), - method: "POST", - data, - headers: { - "Content-Type": "application/json" + return result; +} +var extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction(val)) { + Object.defineProperty(a, key, { + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a, key, { + value: val, + writable: true, + enumerable: true, + configurable: true + }); } - }; - return this.request(config4); + }, + { allOwnKeys } + ); + return a; +}; +var stripBOM = (content) => { + if (content.charCodeAt(0) === 65279) { + content = content.slice(1); } - async delete(path, data) { - const config4 = { - url: this.buildURL(path).toString(), - method: "DELETE", - data, - headers: { - "Content-Type": "application/json" + return content; +}; +var inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +}; +var toFlatObject = (sourceObj, destObj, filter2, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; } - }; - return this.request(config4); + } + sourceObj = filter2 !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; +}; +var endsWith = (str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) { + position = str.length; } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; }; -var PublicLink = class extends TestingFarmLink { - async request(config4) { - return performRequest(config4); +var toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; } + return arr; }; -var ApiKeyLink = class extends TestingFarmLink { - constructor(instance, apiKey) { - super(instance); - this.apiKey = apiKey; +var isTypedArray = /* @__PURE__ */ ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); +var forEachEntry = (obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); } - async request(config4) { - var _a5; - return performRequest(Object.assign(Object.assign({}, config4), { headers: Object.assign(Object.assign({}, (_a5 = config4.headers) !== null && _a5 !== void 0 ? _a5 : {}), { - // https://api.dev.testing-farm.io/docs#/default/request_a_new_test_v0_1_requests_post - // OAuth2: OAuth2PasswordBearer - // The API key for authentication. - // Flow type: password - // Token URL: token - Authorization: `Bearer ${this.apiKey}` - }) })); +}; +var matchAll = (regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); } + return arr; }; - -// node_modules/testing-farm/node_modules/zod/v4/classic/external.js -var external_exports = {}; -__export(external_exports, { - $brand: () => $brand, - $input: () => $input, - $output: () => $output, - NEVER: () => NEVER, - TimePrecision: () => TimePrecision, - ZodAny: () => ZodAny, - ZodArray: () => ZodArray, - ZodBase64: () => ZodBase64, - ZodBase64URL: () => ZodBase64URL, - ZodBigInt: () => ZodBigInt, - ZodBigIntFormat: () => ZodBigIntFormat, - ZodBoolean: () => ZodBoolean, - ZodCIDRv4: () => ZodCIDRv4, - ZodCIDRv6: () => ZodCIDRv6, - ZodCUID: () => ZodCUID, - ZodCUID2: () => ZodCUID2, - ZodCatch: () => ZodCatch, - ZodCodec: () => ZodCodec, - ZodCustom: () => ZodCustom, - ZodCustomStringFormat: () => ZodCustomStringFormat, - ZodDate: () => ZodDate, - ZodDefault: () => ZodDefault, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, - ZodE164: () => ZodE164, - ZodEmail: () => ZodEmail, - ZodEmoji: () => ZodEmoji, - ZodEnum: () => ZodEnum, - ZodError: () => ZodError, - ZodExactOptional: () => ZodExactOptional, - ZodFile: () => ZodFile, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, - ZodFunction: () => ZodFunction, - ZodGUID: () => ZodGUID, - ZodIPv4: () => ZodIPv4, - ZodIPv6: () => ZodIPv6, - ZodISODate: () => ZodISODate, - ZodISODateTime: () => ZodISODateTime, - ZodISODuration: () => ZodISODuration, - ZodISOTime: () => ZodISOTime, - ZodIntersection: () => ZodIntersection, - ZodIssueCode: () => ZodIssueCode, - ZodJWT: () => ZodJWT, - ZodKSUID: () => ZodKSUID, - ZodLazy: () => ZodLazy, - ZodLiteral: () => ZodLiteral, - ZodMAC: () => ZodMAC, - ZodMap: () => ZodMap, - ZodNaN: () => ZodNaN, - ZodNanoID: () => ZodNanoID, - ZodNever: () => ZodNever, - ZodNonOptional: () => ZodNonOptional, - ZodNull: () => ZodNull, - ZodNullable: () => ZodNullable, - ZodNumber: () => ZodNumber, - ZodNumberFormat: () => ZodNumberFormat, - ZodObject: () => ZodObject, - ZodOptional: () => ZodOptional, - ZodPipe: () => ZodPipe, - ZodPrefault: () => ZodPrefault, - ZodPromise: () => ZodPromise, - ZodReadonly: () => ZodReadonly, - ZodRealError: () => ZodRealError, - ZodRecord: () => ZodRecord, - ZodSet: () => ZodSet, - ZodString: () => ZodString, - ZodStringFormat: () => ZodStringFormat, - ZodSuccess: () => ZodSuccess, - ZodSymbol: () => ZodSymbol, - ZodTemplateLiteral: () => ZodTemplateLiteral, - ZodTransform: () => ZodTransform, - ZodTuple: () => ZodTuple, - ZodType: () => ZodType, - ZodULID: () => ZodULID, - ZodURL: () => ZodURL, - ZodUUID: () => ZodUUID, - ZodUndefined: () => ZodUndefined, - ZodUnion: () => ZodUnion, - ZodUnknown: () => ZodUnknown, - ZodVoid: () => ZodVoid, - ZodXID: () => ZodXID, - ZodXor: () => ZodXor, - _ZodString: () => _ZodString, - _default: () => _default2, - _function: () => _function, - any: () => any, - array: () => array, - base64: () => base642, - base64url: () => base64url2, - bigint: () => bigint2, - boolean: () => boolean2, - catch: () => _catch2, - check: () => check, - cidrv4: () => cidrv42, - cidrv6: () => cidrv62, - clone: () => clone, - codec: () => codec, - coerce: () => coerce_exports, - config: () => config, - core: () => core_exports2, - cuid: () => cuid3, - cuid2: () => cuid22, - custom: () => custom, - date: () => date3, - decode: () => decode2, - decodeAsync: () => decodeAsync2, - describe: () => describe2, - discriminatedUnion: () => discriminatedUnion, - e164: () => e1642, - email: () => email2, - emoji: () => emoji2, - encode: () => encode4, - encodeAsync: () => encodeAsync2, - endsWith: () => _endsWith, - enum: () => _enum2, - exactOptional: () => exactOptional, - file: () => file, - flattenError: () => flattenError, - float32: () => float32, - float64: () => float64, - formatError: () => formatError, - fromJSONSchema: () => fromJSONSchema, - function: () => _function, - getErrorMap: () => getErrorMap, - globalRegistry: () => globalRegistry, - gt: () => _gt, - gte: () => _gte, - guid: () => guid2, - hash: () => hash, - hex: () => hex2, - hostname: () => hostname2, - httpUrl: () => httpUrl, - includes: () => _includes, - instanceof: () => _instanceof, - int: () => int, - int32: () => int32, - int64: () => int64, - intersection: () => intersection, - ipv4: () => ipv42, - ipv6: () => ipv62, - iso: () => iso_exports, - json: () => json, - jwt: () => jwt, - keyof: () => keyof, - ksuid: () => ksuid2, - lazy: () => lazy, - length: () => _length, - literal: () => literal, - locales: () => locales_exports, - looseObject: () => looseObject, - looseRecord: () => looseRecord, - lowercase: () => _lowercase, - lt: () => _lt, - lte: () => _lte, - mac: () => mac2, - map: () => map, - maxLength: () => _maxLength, - maxSize: () => _maxSize, - meta: () => meta2, - mime: () => _mime, - minLength: () => _minLength, - minSize: () => _minSize, - multipleOf: () => _multipleOf, - nan: () => nan, - nanoid: () => nanoid2, - nativeEnum: () => nativeEnum, - negative: () => _negative, - never: () => never, - nonnegative: () => _nonnegative, - nonoptional: () => nonoptional, - nonpositive: () => _nonpositive, - normalize: () => _normalize, - null: () => _null3, - nullable: () => nullable, - nullish: () => nullish2, - number: () => number2, - object: () => object, - optional: () => optional, - overwrite: () => _overwrite, - parse: () => parse2, - parseAsync: () => parseAsync2, - partialRecord: () => partialRecord, - pipe: () => pipe, - positive: () => _positive, - prefault: () => prefault, - preprocess: () => preprocess, - prettifyError: () => prettifyError, - promise: () => promise, - property: () => _property, - readonly: () => readonly, - record: () => record, - refine: () => refine, - regex: () => _regex, - regexes: () => regexes_exports, - registry: () => registry, - safeDecode: () => safeDecode2, - safeDecodeAsync: () => safeDecodeAsync2, - safeEncode: () => safeEncode2, - safeEncodeAsync: () => safeEncodeAsync2, - safeParse: () => safeParse2, - safeParseAsync: () => safeParseAsync2, - set: () => set, - setErrorMap: () => setErrorMap, - size: () => _size, - slugify: () => _slugify, - startsWith: () => _startsWith, - strictObject: () => strictObject, - string: () => string2, - stringFormat: () => stringFormat, - stringbool: () => stringbool, - success: () => success, - superRefine: () => superRefine, - symbol: () => symbol, - templateLiteral: () => templateLiteral, - toJSONSchema: () => toJSONSchema, - toLowerCase: () => _toLowerCase, - toUpperCase: () => _toUpperCase, - transform: () => transform, - treeifyError: () => treeifyError, - trim: () => _trim, - tuple: () => tuple, - uint32: () => uint32, - uint64: () => uint64, - ulid: () => ulid2, - undefined: () => _undefined3, - union: () => union, - unknown: () => unknown, - uppercase: () => _uppercase, - url: () => url2, - util: () => util_exports, - uuid: () => uuid2, - uuidv4: () => uuidv4, - uuidv6: () => uuidv6, - uuidv7: () => uuidv7, - void: () => _void2, - xid: () => xid2, - xor: () => xor -}); - -// node_modules/testing-farm/node_modules/zod/v4/core/index.js -var core_exports2 = {}; -__export(core_exports2, { - $ZodAny: () => $ZodAny, - $ZodArray: () => $ZodArray, - $ZodAsyncError: () => $ZodAsyncError, - $ZodBase64: () => $ZodBase64, - $ZodBase64URL: () => $ZodBase64URL, - $ZodBigInt: () => $ZodBigInt, - $ZodBigIntFormat: () => $ZodBigIntFormat, - $ZodBoolean: () => $ZodBoolean, - $ZodCIDRv4: () => $ZodCIDRv4, - $ZodCIDRv6: () => $ZodCIDRv6, - $ZodCUID: () => $ZodCUID, - $ZodCUID2: () => $ZodCUID2, - $ZodCatch: () => $ZodCatch, - $ZodCheck: () => $ZodCheck, - $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, - $ZodCheckEndsWith: () => $ZodCheckEndsWith, - $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, - $ZodCheckIncludes: () => $ZodCheckIncludes, - $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, - $ZodCheckLessThan: () => $ZodCheckLessThan, - $ZodCheckLowerCase: () => $ZodCheckLowerCase, - $ZodCheckMaxLength: () => $ZodCheckMaxLength, - $ZodCheckMaxSize: () => $ZodCheckMaxSize, - $ZodCheckMimeType: () => $ZodCheckMimeType, - $ZodCheckMinLength: () => $ZodCheckMinLength, - $ZodCheckMinSize: () => $ZodCheckMinSize, - $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, - $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, - $ZodCheckOverwrite: () => $ZodCheckOverwrite, - $ZodCheckProperty: () => $ZodCheckProperty, - $ZodCheckRegex: () => $ZodCheckRegex, - $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, - $ZodCheckStartsWith: () => $ZodCheckStartsWith, - $ZodCheckStringFormat: () => $ZodCheckStringFormat, - $ZodCheckUpperCase: () => $ZodCheckUpperCase, - $ZodCodec: () => $ZodCodec, - $ZodCustom: () => $ZodCustom, - $ZodCustomStringFormat: () => $ZodCustomStringFormat, - $ZodDate: () => $ZodDate, - $ZodDefault: () => $ZodDefault, - $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, - $ZodE164: () => $ZodE164, - $ZodEmail: () => $ZodEmail, - $ZodEmoji: () => $ZodEmoji, - $ZodEncodeError: () => $ZodEncodeError, - $ZodEnum: () => $ZodEnum, - $ZodError: () => $ZodError, - $ZodExactOptional: () => $ZodExactOptional, - $ZodFile: () => $ZodFile, - $ZodFunction: () => $ZodFunction, - $ZodGUID: () => $ZodGUID, - $ZodIPv4: () => $ZodIPv4, - $ZodIPv6: () => $ZodIPv6, - $ZodISODate: () => $ZodISODate, - $ZodISODateTime: () => $ZodISODateTime, - $ZodISODuration: () => $ZodISODuration, - $ZodISOTime: () => $ZodISOTime, - $ZodIntersection: () => $ZodIntersection, - $ZodJWT: () => $ZodJWT, - $ZodKSUID: () => $ZodKSUID, - $ZodLazy: () => $ZodLazy, - $ZodLiteral: () => $ZodLiteral, - $ZodMAC: () => $ZodMAC, - $ZodMap: () => $ZodMap, - $ZodNaN: () => $ZodNaN, - $ZodNanoID: () => $ZodNanoID, - $ZodNever: () => $ZodNever, - $ZodNonOptional: () => $ZodNonOptional, - $ZodNull: () => $ZodNull, - $ZodNullable: () => $ZodNullable, - $ZodNumber: () => $ZodNumber, - $ZodNumberFormat: () => $ZodNumberFormat, - $ZodObject: () => $ZodObject, - $ZodObjectJIT: () => $ZodObjectJIT, - $ZodOptional: () => $ZodOptional, - $ZodPipe: () => $ZodPipe, - $ZodPrefault: () => $ZodPrefault, - $ZodPromise: () => $ZodPromise, - $ZodReadonly: () => $ZodReadonly, - $ZodRealError: () => $ZodRealError, - $ZodRecord: () => $ZodRecord, - $ZodRegistry: () => $ZodRegistry, - $ZodSet: () => $ZodSet, - $ZodString: () => $ZodString, - $ZodStringFormat: () => $ZodStringFormat, - $ZodSuccess: () => $ZodSuccess, - $ZodSymbol: () => $ZodSymbol, - $ZodTemplateLiteral: () => $ZodTemplateLiteral, - $ZodTransform: () => $ZodTransform, - $ZodTuple: () => $ZodTuple, - $ZodType: () => $ZodType, - $ZodULID: () => $ZodULID, - $ZodURL: () => $ZodURL, - $ZodUUID: () => $ZodUUID, - $ZodUndefined: () => $ZodUndefined, - $ZodUnion: () => $ZodUnion, - $ZodUnknown: () => $ZodUnknown, - $ZodVoid: () => $ZodVoid, - $ZodXID: () => $ZodXID, - $ZodXor: () => $ZodXor, - $brand: () => $brand, - $constructor: () => $constructor, - $input: () => $input, - $output: () => $output, - Doc: () => Doc, - JSONSchema: () => json_schema_exports, - JSONSchemaGenerator: () => JSONSchemaGenerator, - NEVER: () => NEVER, - TimePrecision: () => TimePrecision, - _any: () => _any, - _array: () => _array, - _base64: () => _base64, - _base64url: () => _base64url, - _bigint: () => _bigint, - _boolean: () => _boolean, - _catch: () => _catch, - _check: () => _check, - _cidrv4: () => _cidrv4, - _cidrv6: () => _cidrv6, - _coercedBigint: () => _coercedBigint, - _coercedBoolean: () => _coercedBoolean, - _coercedDate: () => _coercedDate, - _coercedNumber: () => _coercedNumber, - _coercedString: () => _coercedString, - _cuid: () => _cuid, - _cuid2: () => _cuid2, - _custom: () => _custom, - _date: () => _date, - _decode: () => _decode, - _decodeAsync: () => _decodeAsync, - _default: () => _default, - _discriminatedUnion: () => _discriminatedUnion, - _e164: () => _e164, - _email: () => _email, - _emoji: () => _emoji2, - _encode: () => _encode, - _encodeAsync: () => _encodeAsync, - _endsWith: () => _endsWith, - _enum: () => _enum, - _file: () => _file, - _float32: () => _float32, - _float64: () => _float64, - _gt: () => _gt, - _gte: () => _gte, - _guid: () => _guid, - _includes: () => _includes, - _int: () => _int, - _int32: () => _int32, - _int64: () => _int64, - _intersection: () => _intersection, - _ipv4: () => _ipv4, - _ipv6: () => _ipv6, - _isoDate: () => _isoDate, - _isoDateTime: () => _isoDateTime, - _isoDuration: () => _isoDuration, - _isoTime: () => _isoTime, - _jwt: () => _jwt, - _ksuid: () => _ksuid, - _lazy: () => _lazy, - _length: () => _length, - _literal: () => _literal, - _lowercase: () => _lowercase, - _lt: () => _lt, - _lte: () => _lte, - _mac: () => _mac, - _map: () => _map, - _max: () => _lte, - _maxLength: () => _maxLength, - _maxSize: () => _maxSize, - _mime: () => _mime, - _min: () => _gte, - _minLength: () => _minLength, - _minSize: () => _minSize, - _multipleOf: () => _multipleOf, - _nan: () => _nan, - _nanoid: () => _nanoid, - _nativeEnum: () => _nativeEnum, - _negative: () => _negative, - _never: () => _never, - _nonnegative: () => _nonnegative, - _nonoptional: () => _nonoptional, - _nonpositive: () => _nonpositive, - _normalize: () => _normalize, - _null: () => _null2, - _nullable: () => _nullable, - _number: () => _number, - _optional: () => _optional, - _overwrite: () => _overwrite, - _parse: () => _parse, - _parseAsync: () => _parseAsync, - _pipe: () => _pipe, - _positive: () => _positive, - _promise: () => _promise, - _property: () => _property, - _readonly: () => _readonly, - _record: () => _record, - _refine: () => _refine, - _regex: () => _regex, - _safeDecode: () => _safeDecode, - _safeDecodeAsync: () => _safeDecodeAsync, - _safeEncode: () => _safeEncode, - _safeEncodeAsync: () => _safeEncodeAsync, - _safeParse: () => _safeParse, - _safeParseAsync: () => _safeParseAsync, - _set: () => _set, - _size: () => _size, - _slugify: () => _slugify, - _startsWith: () => _startsWith, - _string: () => _string, - _stringFormat: () => _stringFormat, - _stringbool: () => _stringbool, - _success: () => _success, - _superRefine: () => _superRefine, - _symbol: () => _symbol, - _templateLiteral: () => _templateLiteral, - _toLowerCase: () => _toLowerCase, - _toUpperCase: () => _toUpperCase, - _transform: () => _transform, - _trim: () => _trim, - _tuple: () => _tuple, - _uint32: () => _uint32, - _uint64: () => _uint64, - _ulid: () => _ulid, - _undefined: () => _undefined2, - _union: () => _union, - _unknown: () => _unknown, - _uppercase: () => _uppercase, - _url: () => _url, - _uuid: () => _uuid, - _uuidv4: () => _uuidv4, - _uuidv6: () => _uuidv6, - _uuidv7: () => _uuidv7, - _void: () => _void, - _xid: () => _xid, - _xor: () => _xor, - clone: () => clone, - config: () => config, - createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, - createToJSONSchemaMethod: () => createToJSONSchemaMethod, - decode: () => decode, - decodeAsync: () => decodeAsync, - describe: () => describe, - encode: () => encode3, - encodeAsync: () => encodeAsync, - extractDefs: () => extractDefs, - finalize: () => finalize, - flattenError: () => flattenError, - formatError: () => formatError, - globalConfig: () => globalConfig, - globalRegistry: () => globalRegistry, - initializeContext: () => initializeContext, - isValidBase64: () => isValidBase64, - isValidBase64URL: () => isValidBase64URL, - isValidJWT: () => isValidJWT, - locales: () => locales_exports, - meta: () => meta, - parse: () => parse, - parseAsync: () => parseAsync, - prettifyError: () => prettifyError, - process: () => process2, - regexes: () => regexes_exports, - registry: () => registry, - safeDecode: () => safeDecode, - safeDecodeAsync: () => safeDecodeAsync, - safeEncode: () => safeEncode, - safeEncodeAsync: () => safeEncodeAsync, - safeParse: () => safeParse, - safeParseAsync: () => safeParseAsync, - toDotPath: () => toDotPath, - toJSONSchema: () => toJSONSchema, - treeifyError: () => treeifyError, - util: () => util_exports, - version: () => version -}); - -// node_modules/testing-farm/node_modules/zod/v4/core/core.js -var NEVER = Object.freeze({ - status: "aborted" -}); -// @__NO_SIDE_EFFECTS__ -function $constructor(name, initializer6, params) { - function init(inst, def) { - if (!inst._zod) { - Object.defineProperty(inst, "_zod", { - value: { - def, - constr: _, - traits: /* @__PURE__ */ new Set() - }, - enumerable: false - }); - } - if (inst._zod.traits.has(name)) { - return; +var isHTMLForm = kindOfTest("HTMLFormElement"); +var toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; +var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); +var isRegExp = kindOfTest("RegExp"); +var reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; } - inst._zod.traits.add(name); - initializer6(inst, def); - const proto = _.prototype; - const keys = Object.keys(proto); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - if (!(k in inst)) { - inst[k] = proto[k].bind(inst); - } + }); + Object.defineProperties(obj, reducedDescriptors); +}; +var freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) { + return false; } - } - const Parent = params?.Parent ?? Object; - class Definition extends Parent { - } - Object.defineProperty(Definition, "name", { value: name }); - function _(def) { - var _a5; - const inst = params?.Parent ? new Definition() : this; - init(inst, def); - (_a5 = inst._zod).deferred ?? (_a5.deferred = []); - for (const fn of inst._zod.deferred) { - fn(); + const value = obj[name]; + if (!isFunction(value)) return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; } - 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); + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; } }); - Object.defineProperty(_, "name", { value: name }); - return _; -} -var $brand = /* @__PURE__ */ Symbol("zod_brand"); -var $ZodAsyncError = class extends Error { - constructor() { - super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); +}; +var toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + const define2 = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter)); + return obj; +}; +var noop = () => { +}; +var toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; +}; +function isSpecCompliantForm(thing) { + return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +var toJSONObject = (obj) => { + const stack = new Array(10); + const visit = (source, i) => { + if (isObject(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + if (isBuffer(source)) { + return source; + } + if (!("toJSON" in source)) { + stack[i] = source; + const target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + stack[i] = void 0; + return target; + } + } + return source; + }; + return visit(obj, 0); +}; +var isAsyncFn = kindOfTest("AsyncFunction"); +var isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); +var _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener( + "message", + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); +})(typeof setImmediate === "function", isFunction(_global.postMessage)); +var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; +var isIterable = (thing) => thing != null && isFunction(thing[iterator]); +var utils_default = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable }; -var $ZodEncodeError = class extends Error { - constructor(name) { - super(`Encountered unidirectional transform during encode: ${name}`); - this.name = "ZodEncodeError"; + +// node_modules/axios/lib/core/AxiosError.js +var AxiosError = class _AxiosError extends Error { + static from(error99, code, config3, request2, response, customProps) { + const axiosError = new _AxiosError(error99.message, code || error99.code, config3, request2, response); + axiosError.cause = error99; + axiosError.name = error99.name; + if (error99.status != null && axiosError.status == null) { + axiosError.status = error99.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message2, code, config3, request2, response) { + super(message2); + Object.defineProperty(this, "message", { + value: message2, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config3 && (this.config = config3); + request2 && (this.request = request2); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils_default.toJSONObject(this.config), + code: this.code, + status: this.status + }; } }; -var globalConfig = {}; -function config(newConfig) { - if (newConfig) - Object.assign(globalConfig, newConfig); - return globalConfig; -} +AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; +AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION"; +AxiosError.ECONNABORTED = "ECONNABORTED"; +AxiosError.ETIMEDOUT = "ETIMEDOUT"; +AxiosError.ERR_NETWORK = "ERR_NETWORK"; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; +AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED"; +AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; +AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; +AxiosError.ERR_CANCELED = "ERR_CANCELED"; +AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; +AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL"; +var AxiosError_default = AxiosError; -// node_modules/testing-farm/node_modules/zod/v4/core/util.js -var util_exports = {}; -__export(util_exports, { - BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, - Class: () => Class, - NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, - aborted: () => aborted, - allowsEval: () => allowsEval, - assert: () => assert, - assertEqual: () => assertEqual, - assertIs: () => assertIs, - assertNever: () => assertNever, - assertNotEqual: () => assertNotEqual, - assignProp: () => assignProp, - base64ToUint8Array: () => base64ToUint8Array, - base64urlToUint8Array: () => base64urlToUint8Array, - cached: () => cached, - captureStackTrace: () => captureStackTrace, - cleanEnum: () => cleanEnum, - cleanRegex: () => cleanRegex, - clone: () => clone, - cloneDef: () => cloneDef, - createTransparentProxy: () => createTransparentProxy, - defineLazy: () => defineLazy, - esc: () => esc, - escapeRegex: () => escapeRegex, - extend: () => extend2, - finalizeIssue: () => finalizeIssue, - floatSafeRemainder: () => floatSafeRemainder, - getElementAtPath: () => getElementAtPath, - getEnumValues: () => getEnumValues, - getLengthableOrigin: () => getLengthableOrigin, - getParsedType: () => getParsedType, - getSizableOrigin: () => getSizableOrigin, - hexToUint8Array: () => hexToUint8Array, - isObject: () => isObject2, - isPlainObject: () => isPlainObject2, - issue: () => issue2, - joinValues: () => joinValues, - jsonStringifyReplacer: () => jsonStringifyReplacer, - merge: () => merge2, - mergeDefs: () => mergeDefs, - normalizeParams: () => normalizeParams, - nullish: () => nullish, - numKeys: () => numKeys, - objectClone: () => objectClone, - omit: () => omit, - optionalKeys: () => optionalKeys, - parsedType: () => parsedType, - partial: () => partial, - pick: () => pick, - prefixIssues: () => prefixIssues, - primitiveTypes: () => primitiveTypes, - promiseAllObject: () => promiseAllObject, - propertyKeyTypes: () => propertyKeyTypes, - randomString: () => randomString, - required: () => required, - safeExtend: () => safeExtend, - shallowClone: () => shallowClone, - slugify: () => slugify, - stringifyPrimitive: () => stringifyPrimitive, - uint8ArrayToBase64: () => uint8ArrayToBase64, - uint8ArrayToBase64url: () => uint8ArrayToBase64url, - uint8ArrayToHex: () => uint8ArrayToHex, - unwrapMessage: () => unwrapMessage -}); -function assertEqual(val) { - return val; -} -function assertNotEqual(val) { - return val; -} -function assertIs(_arg) { -} -function assertNever(_x) { - throw new Error("Unexpected value in exhaustive check"); -} -function assert(_) { +// node_modules/axios/lib/platform/node/classes/FormData.js +var import_form_data = __toESM(require_form_data(), 1); +var FormData_default = import_form_data.default; + +// node_modules/axios/lib/helpers/toFormData.js +function isVisitable(thing) { + return utils_default.isPlainObject(thing) || utils_default.isArray(thing); } -function getEnumValues(entries) { - const numericValues = Object.values(entries).filter((v) => typeof v === "number"); - const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); - return values; +function removeBrackets(key) { + return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; } -function joinValues(array4, separator = "|") { - return array4.map((val) => stringifyPrimitive(val)).join(separator); +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + token = removeBrackets(token); + return !dots && i ? "[" + token + "]" : token; + }).join(dots ? "." : ""); } -function jsonStringifyReplacer(_, value) { - if (typeof value === "bigint") - return value.toString(); - return value; +function isFlatArray(arr) { + return utils_default.isArray(arr) && !arr.some(isVisitable); } -function cached(getter) { - const set4 = false; - return { - get value() { - if (!set4) { - const value = getter(); - Object.defineProperty(this, "value", { value }); - return value; - } - throw new Error("cached value already set"); +var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); +function toFormData(obj, formData, options) { + if (!utils_default.isObject(obj)) { + throw new TypeError("target must be an object"); + } + formData = formData || new (FormData_default || FormData)(); + options = utils_default.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false + }, + false, + function defined(option, source) { + return !utils_default.isUndefined(source[option]); } - }; -} -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 floatSafeRemainder(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepString = step.toString(); - let stepDecCount = (stepString.split(".")[1] || "").length; - if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { - const match2 = stepString.match(/\d?e-(\d?)/); - if (match2?.[1]) { - stepDecCount = Number.parseInt(match2[1]); + ); + const metaTokens = options.metaTokens; + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; + const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); + if (!utils_default.isFunction(visitor)) { + throw new TypeError("visitor must be a function"); + } + function convertValue(value) { + if (value === null) return ""; + if (utils_default.isDate(value)) { + return value.toISOString(); + } + if (utils_default.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils_default.isBlob(value)) { + throw new AxiosError_default("Blob is not supported. Use a Buffer instead."); + } + if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { + return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); } + return value; } - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return valInt % stepInt / 10 ** decCount; -} -var EVALUATING = /* @__PURE__ */ Symbol("evaluating"); -function defineLazy(object4, key, getter) { - let value = void 0; - Object.defineProperty(object4, key, { - get() { - if (value === EVALUATING) { - return void 0; + function defaultVisitor(value, key, path) { + let arr = value; + if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === "object") { + if (utils_default.endsWith(key, "{}")) { + key = metaTokens ? key : key.slice(0, -2); + value = JSON.stringify(value); + } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { + key = removeBrackets(key); + arr.forEach(function each(el, index) { + !(utils_default.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", + convertValue(el) + ); + }); + return false; } - if (value === void 0) { - value = EVALUATING; - value = getter(); + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + const stack = []; + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path) { + if (utils_default.isUndefined(value)) return; + if (stack.indexOf(value) !== -1) { + throw Error("Circular reference detected in " + path.join(".")); + } + stack.push(value); + utils_default.forEach(value, function each(el, key) { + const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers); + if (result === true) { + build(el, path ? path.concat(key) : [key]); } - return value; - }, - set(v) { - Object.defineProperty(object4, key, { - value: v - // configurable: true, - }); - }, - configurable: true + }); + stack.pop(); + } + if (!utils_default.isObject(obj)) { + throw new TypeError("data must be an object"); + } + build(obj); + return formData; +} +var toFormData_default = toFormData; + +// node_modules/axios/lib/helpers/AxiosURLSearchParams.js +function encode(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+", + "%00": "\0" + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match2) { + return charMap[match2]; }); } -function objectClone(obj) { - return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData_default(params, this, options); } -function assignProp(target, prop, value) { - Object.defineProperty(target, prop, { - value, - writable: true, - enumerable: true, - configurable: true - }); +var prototype = AxiosURLSearchParams.prototype; +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; +prototype.toString = function toString2(encoder) { + const _encode3 = encoder ? function(value) { + return encoder.call(this, value, encode); + } : encode; + return this._pairs.map(function each(pair) { + return _encode3(pair[0]) + "=" + _encode3(pair[1]); + }, "").join("&"); +}; +var AxiosURLSearchParams_default = AxiosURLSearchParams; + +// node_modules/axios/lib/helpers/buildURL.js +function encode2(val) { + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); } -function mergeDefs(...defs) { - const mergedDescriptors = {}; - for (const def of defs) { - const descriptors = Object.getOwnPropertyDescriptors(def); - Object.assign(mergedDescriptors, descriptors); +function buildURL(url4, params, options) { + if (!params) { + return url4; } - return Object.defineProperties({}, mergedDescriptors); + const _encode3 = options && options.encode || encode2; + const _options = utils_default.isFunction(options) ? { + serialize: options + } : options; + const serializeFn = _options && _options.serialize; + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode3); + } + if (serializedParams) { + const hashmarkIndex = url4.indexOf("#"); + if (hashmarkIndex !== -1) { + url4 = url4.slice(0, hashmarkIndex); + } + url4 += (url4.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url4; } -function cloneDef(schema) { - return mergeDefs(schema._zod.def); -} -function getElementAtPath(obj, path) { - if (!path) - return obj; - return path.reduce((acc, key) => acc?.[key], obj); -} -function promiseAllObject(promisesObj) { - const keys = Object.keys(promisesObj); - const promises3 = keys.map((key) => promisesObj[key]); - return Promise.all(promises3).then((results) => { - const resolvedObj = {}; - for (let i = 0; i < keys.length; i++) { - resolvedObj[keys[i]] = results[i]; + +// node_modules/axios/lib/core/InterceptorManager.js +var InterceptorManager = class { + constructor() { + this.handlers = []; + } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; } - return resolvedObj; - }); -} -function randomString(length = 10) { - const chars = "abcdefghijklmnopqrstuvwxyz"; + } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils_default.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } +}; +var InterceptorManager_default = InterceptorManager; + +// node_modules/axios/lib/defaults/transitional.js +var transitional_default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true +}; + +// node_modules/axios/lib/platform/node/index.js +import crypto2 from "crypto"; + +// node_modules/axios/lib/platform/node/classes/URLSearchParams.js +import url from "url"; +var URLSearchParams_default = url.URLSearchParams; + +// node_modules/axios/lib/platform/node/index.js +var ALPHA = "abcdefghijklmnopqrstuvwxyz"; +var DIGIT = "0123456789"; +var ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +}; +var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { let str = ""; - for (let i = 0; i < length; i++) { - str += chars[Math.floor(Math.random() * chars.length)]; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + crypto2.randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; } return str; -} -function esc(str) { - return JSON.stringify(str); -} -function slugify(input) { - return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); -} -var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { }; -function isObject2(data) { - return typeof data === "object" && data !== null && !Array.isArray(data); +var node_default = { + isNode: true, + classes: { + URLSearchParams: URLSearchParams_default, + FormData: FormData_default, + Blob: typeof Blob !== "undefined" && Blob || null + }, + ALPHABET, + generateString, + protocols: ["http", "https", "file", "data"] +}; + +// node_modules/axios/lib/platform/common/utils.js +var utils_exports = {}; +__export(utils_exports, { + hasBrowserEnv: () => hasBrowserEnv, + hasStandardBrowserEnv: () => hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, + navigator: () => _navigator, + origin: () => origin +}); +var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; +var _navigator = typeof navigator === "object" && navigator || void 0; +var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0); +var hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; +})(); +var origin = hasBrowserEnv && window.location.href || "http://localhost"; + +// node_modules/axios/lib/platform/index.js +var platform_default = { + ...utils_exports, + ...node_default +}; + +// node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData_default(data, new platform_default.classes.URLSearchParams(), { + visitor: function(value, key, path, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); } -var allowsEval = cached(() => { - if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { - return false; + +// node_modules/axios/lib/helpers/formDataToJSON.js +function parsePropPath(name) { + return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => { + return match2[0] === "[]" ? "" : match2[1] || match2[0]; + }); +} +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; } - try { - const F = Function; - new F(""); - return true; - } catch (_) { - return false; + return obj; +} +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + if (name === "__proto__") return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils_default.isArray(target) ? target.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!target[name] || !utils_default.isObject(target[name])) { + target[name] = []; + } + const result = buildPath(path, value, target[name], index); + if (result && utils_default.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; } -}); -function isPlainObject2(o) { - if (isObject2(o) === false) - return false; - const ctor = o.constructor; - if (ctor === void 0) - return true; - if (typeof ctor !== "function") - return true; - const prot = ctor.prototype; - if (isObject2(prot) === false) - return false; - if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { - return false; + if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { + const obj = {}; + utils_default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; } - return true; -} -function shallowClone(o) { - if (isPlainObject2(o)) - return { ...o }; - if (Array.isArray(o)) - return [...o]; - return o; + return null; } -function numKeys(data) { - let keyCount = 0; - for (const key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - keyCount++; +var formDataToJSON_default = formDataToJSON; + +// node_modules/axios/lib/defaults/index.js +function stringifySafely(rawValue, parser, encoder) { + if (utils_default.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e) { + if (e.name !== "SyntaxError") { + throw e; + } } } - return keyCount; + return (encoder || JSON.stringify)(rawValue); } -var getParsedType = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return "undefined"; - case "string": - return "string"; - case "number": - return Number.isNaN(data) ? "nan" : "number"; - case "boolean": - return "boolean"; - case "function": - return "function"; - case "bigint": - return "bigint"; - case "symbol": - return "symbol"; - case "object": - if (Array.isArray(data)) { - return "array"; +var defaults = { + transitional: transitional_default, + adapter: ["xhr", "http", "fetch"], + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) { + data = new FormData(data); } - if (data === null) { - return "null"; + const isFormData2 = utils_default.isFormData(data); + if (isFormData2) { + return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data; } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return "promise"; + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) { + return data; } - if (typeof Map !== "undefined" && data instanceof Map) { - return "map"; + if (utils_default.isArrayBufferView(data)) { + return data.buffer; } - if (typeof Set !== "undefined" && data instanceof Set) { - return "set"; + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); } - if (typeof Date !== "undefined" && data instanceof Date) { - return "date"; + let isFileList2; + if (isObjectPayload) { + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); + } + if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const _FormData = this.env && this.env.FormData; + return toFormData_default( + isFileList2 ? { "files[]": data } : data, + _FormData && new _FormData(), + this.formSerializer + ); + } } - if (typeof File !== "undefined" && data instanceof File) { - return "file"; + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); } - return "object"; - default: - throw new Error(`Unknown data type: ${t}`); + return data; + } + ], + transformResponse: [ + function transformResponse(data) { + const transitional2 = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; + const JSONRequested = this.responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) { + return data; + } + if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { + const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, this.parseReviver); + } catch (e) { + if (strictJSONParsing) { + if (e.name === "SyntaxError") { + throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } + } + } + return data; + } + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 + } } }; -var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); -var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); -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 createTransparentProxy(getter) { - let target; - return new Proxy({}, { - get(_, prop, receiver) { - target ?? (target = getter()); - return Reflect.get(target, prop, receiver); - }, - set(_, prop, value, receiver) { - target ?? (target = getter()); - return Reflect.set(target, prop, value, receiver); - }, - has(_, prop) { - target ?? (target = getter()); - return Reflect.has(target, prop); - }, - deleteProperty(_, prop) { - target ?? (target = getter()); - return Reflect.deleteProperty(target, prop); - }, - ownKeys(_) { - target ?? (target = getter()); - return Reflect.ownKeys(target); - }, - getOwnPropertyDescriptor(_, prop) { - target ?? (target = getter()); - return Reflect.getOwnPropertyDescriptor(target, prop); - }, - defineProperty(_, prop, descriptor) { - target ?? (target = getter()); - return Reflect.defineProperty(target, prop, descriptor); +utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => { + defaults.headers[method] = {}; +}); +var defaults_default = defaults; + +// node_modules/axios/lib/helpers/parseHeaders.js +var ignoreDuplicateOf = utils_default.toObjectSet([ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent" +]); +var parseHeaders_default = (rawHeaders) => { + const parsed = {}; + let key; + let val; + let i; + rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { + i = line.indexOf(":"); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + if (!key || parsed[key] && ignoreDuplicateOf[key]) { + return; + } + if (key === "set-cookie") { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; } }); + return parsed; +}; + +// node_modules/axios/lib/core/AxiosHeaders.js +var $internals = /* @__PURE__ */ Symbol("internals"); +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); } -function stringifyPrimitive(value) { - if (typeof value === "bigint") - return value.toString() + "n"; - if (typeof value === "string") - return `"${value}"`; - return `${value}`; +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils_default.isArray(value) ? value.map(normalizeValue) : String(value); } -function optionalKeys(shape) { - return Object.keys(shape).filter((k) => { - return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; - }); -} -var NUMBER_FORMAT_RANGES = { - safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], - int32: [-2147483648, 2147483647], - uint32: [0, 4294967295], - float32: [-34028234663852886e22, 34028234663852886e22], - float64: [-Number.MAX_VALUE, Number.MAX_VALUE] -}; -var BIGINT_FORMAT_RANGES = { - int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], - uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] -}; -function pick(schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".pick() cannot be used on object schemas containing refinements"); +function parseTokens(str) { + const tokens = /* @__PURE__ */ Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match2; + while (match2 = tokensRE.exec(str)) { + tokens[match2[1]] = match2[2]; } - const def = mergeDefs(schema._zod.def, { - get shape() { - const newShape = {}; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - newShape[key] = currDef.shape[key]; - } - assignProp(this, "shape", newShape); - return newShape; - }, - checks: [] - }); - return clone(schema, def); + return tokens; } -function omit(schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".omit() cannot be used on object schemas containing refinements"); +var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); +function matchHeaderValue(context3, value, header, filter2, isHeaderNameFilter) { + if (utils_default.isFunction(filter2)) { + return filter2.call(this, value, header); } - const def = mergeDefs(schema._zod.def, { - get shape() { - const newShape = { ...schema._zod.def.shape }; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - delete newShape[key]; - } - assignProp(this, "shape", newShape); - return newShape; - }, - checks: [] - }); - return clone(schema, def); -} -function extend2(schema, shape) { - if (!isPlainObject2(shape)) { - throw new Error("Invalid input to extend: expected a plain object"); + if (isHeaderNameFilter) { + value = header; } - const checks = schema._zod.def.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - const existingShape = schema._zod.def.shape; - for (const key in shape) { - if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { - throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); - } - } + if (!utils_default.isString(value)) return; + if (utils_default.isString(filter2)) { + return value.indexOf(filter2) !== -1; } - const def = mergeDefs(schema._zod.def, { - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp(this, "shape", _shape); - return _shape; - } - }); - return clone(schema, def); -} -function safeExtend(schema, shape) { - if (!isPlainObject2(shape)) { - throw new Error("Invalid input to safeExtend: expected a plain object"); + if (utils_default.isRegExp(filter2)) { + return filter2.test(value); } - const def = mergeDefs(schema._zod.def, { - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp(this, "shape", _shape); - return _shape; - } +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; }); - return clone(schema, def); } -function merge2(a, b) { - const def = mergeDefs(a._zod.def, { - get shape() { - const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; - assignProp(this, "shape", _shape); - return _shape; - }, - get catchall() { - return b._zod.def.catchall; - }, - checks: [] - // delete existing checks +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); }); - return clone(a, def); } -function partial(Class4, schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".partial() cannot be used on object schemas containing refinements"); +var AxiosHeaders = class { + constructor(headers) { + headers && this.set(headers); } - const def = mergeDefs(schema._zod.def, { - get shape() { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in oldShape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = Class4 ? new Class4({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } else { - for (const key in oldShape) { - shape[key] = Class4 ? new Class4({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; + set(header, valueOrRewrite, rewrite) { + const self2 = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + throw new Error("header name must be a non-empty string"); + } + const key = utils_default.findKey(self2, lHeader); + if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { + self2[key || _header] = normalizeValue(_value); + } + } + const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders_default(header), valueOrRewrite); + } else if (utils_default.isObject(header) && utils_default.isIterable(header)) { + let obj = {}, dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) { + throw TypeError("Object iterator must return a key-value pair"); } + obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1]; } - assignProp(this, "shape", shape); - return shape; - }, - checks: [] - }); - return clone(schema, def); -} -function required(Class4, schema, mask) { - const def = mergeDefs(schema._zod.def, { - get shape() { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = new Class4({ - type: "nonoptional", - innerType: oldShape[key] - }); + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser) { + return value; } - } else { - for (const key in oldShape) { - shape[key] = new Class4({ - type: "nonoptional", - innerType: oldShape[key] - }); + if (parser === true) { + return parseTokens(value); + } + if (utils_default.isFunction(parser)) { + return parser.call(this, value, key); + } + if (utils_default.isRegExp(parser)) { + return parser.exec(value); } + throw new TypeError("parser must be boolean|regexp|function"); } - assignProp(this, "shape", shape); - return shape; } - }); - return clone(schema, def); -} -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 prefixIssues(path, issues) { - return issues.map((iss) => { - var _a5; - (_a5 = iss).path ?? (_a5.path = []); - iss.path.unshift(path); - return iss; - }); -} -function unwrapMessage(message2) { - return typeof message2 === "string" ? message2 : message2?.message; -} -function finalizeIssue(iss, ctx, config4) { - const full = { ...iss, path: iss.path ?? [] }; - if (!iss.message) { - const message2 = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config4.customError?.(iss)) ?? unwrapMessage(config4.localeError?.(iss)) ?? "Invalid input"; - full.message = message2; } - delete full.inst; - delete full.continue; - if (!ctx?.reportInput) { - delete full.input; + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; } - return full; -} -function getSizableOrigin(input) { - if (input instanceof Set) - return "set"; - if (input instanceof Map) - return "map"; - if (input instanceof File) - return "file"; - return "unknown"; -} -function getLengthableOrigin(input) { - if (Array.isArray(input)) - return "array"; - if (typeof input === "string") - return "string"; - return "unknown"; -} -function parsedType(data) { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "nan" : "number"; + delete(header, matcher) { + const self2 = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self2, _header); + if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { + delete self2[key]; + deleted = true; + } + } } - case "object": { - if (data === null) { - return "null"; + if (utils_default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; } - if (Array.isArray(data)) { - return "array"; + } + return deleted; + } + normalize(format2) { + const self2 = this; + const headers = {}; + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self2[key] = normalizeValue(value); + delete self2[header]; + return; } - const obj = data; - if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { - return obj.constructor.name; + const normalized = format2 ? formatHeader(header) : String(header).trim(); + if (normalized !== header) { + delete self2[header]; } - } + self2[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; } - return t; -} -function issue2(...args) { - const [iss, input, inst] = args; - if (typeof iss === "string") { - return { - message: iss, - code: "custom", - input, - inst - }; + concat(...targets) { + return this.constructor.concat(this, ...targets); } - return { ...iss }; -} -function cleanEnum(obj) { - return Object.entries(obj).filter(([k, _]) => { - return Number.isNaN(Number.parseInt(k, 10)); - }).map((el) => el[1]); -} -function base64ToUint8Array(base646) { - const binaryString = atob(base646); - const bytes = new Uint8Array(binaryString.length); - for (let i = 0; i < binaryString.length; i++) { - bytes[i] = binaryString.charCodeAt(i); + toJSON(asStrings) { + const obj = /* @__PURE__ */ Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; } - return bytes; -} -function uint8ArrayToBase64(bytes) { - let binaryString = ""; - for (let i = 0; i < bytes.length; i++) { - binaryString += String.fromCharCode(bytes[i]); + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); } - return btoa(binaryString); -} -function base64urlToUint8Array(base64url6) { - const base646 = base64url6.replace(/-/g, "+").replace(/_/g, "/"); - const padding = "=".repeat((4 - base646.length % 4) % 4); - return base64ToUint8Array(base646 + padding); -} -function uint8ArrayToBase64url(bytes) { - return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); -} -function hexToUint8Array(hex6) { - const cleanHex = hex6.replace(/^0x/, ""); - if (cleanHex.length % 2 !== 0) { - throw new Error("Invalid hex string length"); + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); } - const bytes = new Uint8Array(cleanHex.length / 2); - for (let i = 0; i < cleanHex.length; i += 2) { - bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + getSetCookie() { + return this.get("set-cookie") || []; } - return bytes; -} -function uint8ArrayToHex(bytes) { - return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); -} -var Class = class { - constructor(..._args) { + get [Symbol.toStringTag]() { + return "AxiosHeaders"; } -}; - -// node_modules/testing-farm/node_modules/zod/v4/core/errors.js -var initializer = (inst, def) => { - inst.name = "$ZodError"; - Object.defineProperty(inst, "_zod", { - value: inst._zod, - enumerable: false - }); - Object.defineProperty(inst, "issues", { - value: def, - enumerable: false - }); - inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); - Object.defineProperty(inst, "toString", { - value: () => inst.message, - enumerable: false - }); -}; -var $ZodError = $constructor("$ZodError", initializer); -var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); -function flattenError(error100, mapper = (issue5) => issue5.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of error100.issues) { - if (sub.path.length > 0) { - fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; - fieldErrors[sub.path[0]].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } + static from(thing) { + return thing instanceof this ? thing : new this(thing); } - return { formErrors, fieldErrors }; -} -function formatError(error100, mapper = (issue5) => issue5.message) { - const fieldErrors = { _errors: [] }; - const processError = (error101) => { - for (const issue5 of error101.issues) { - if (issue5.code === "invalid_union" && issue5.errors.length) { - issue5.errors.map((issues) => processError({ issues })); - } else if (issue5.code === "invalid_key") { - processError({ issues: issue5.issues }); - } else if (issue5.code === "invalid_element") { - processError({ issues: issue5.issues }); - } else if (issue5.path.length === 0) { - fieldErrors._errors.push(mapper(issue5)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < issue5.path.length) { - const el = issue5.path[i]; - const terminal = i === issue5.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue5)); - } - curr = curr[el]; - i++; - } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = this[$internals] = this[$internals] = { + accessors: {} + }; + const accessors = internals.accessors; + const prototype2 = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype2, _header); + accessors[lHeader] = true; } } + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } +}; +AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" +]); +utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } }; - processError(error100); - return fieldErrors; +}); +utils_default.freezeMethods(AxiosHeaders); +var AxiosHeaders_default = AxiosHeaders; + +// node_modules/axios/lib/core/transformData.js +function transformData(fns, response) { + const config3 = this || defaults_default; + const context3 = response || config3; + const headers = AxiosHeaders_default.from(context3.headers); + let data = context3.data; + utils_default.forEach(fns, function transform3(fn) { + data = fn.call(config3, data, headers.normalize(), response ? response.status : void 0); + }); + headers.normalize(); + return data; } -function treeifyError(error100, mapper = (issue5) => issue5.message) { - const result = { errors: [] }; - const processError = (error101, path = []) => { - var _a5, _b; - for (const issue5 of error101.issues) { - if (issue5.code === "invalid_union" && issue5.errors.length) { - issue5.errors.map((issues) => processError({ issues }, issue5.path)); - } else if (issue5.code === "invalid_key") { - processError({ issues: issue5.issues }, issue5.path); - } else if (issue5.code === "invalid_element") { - processError({ issues: issue5.issues }, issue5.path); - } else { - const fullpath = [...path, ...issue5.path]; - if (fullpath.length === 0) { - result.errors.push(mapper(issue5)); - continue; - } - let curr = result; - let i = 0; - while (i < fullpath.length) { - const el = fullpath[i]; - const terminal = i === fullpath.length - 1; - if (typeof el === "string") { - curr.properties ?? (curr.properties = {}); - (_a5 = curr.properties)[el] ?? (_a5[el] = { errors: [] }); - curr = curr.properties[el]; - } else { - curr.items ?? (curr.items = []); - (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); - curr = curr.items[el]; - } - if (terminal) { - curr.errors.push(mapper(issue5)); - } - i++; - } - } - } - }; - processError(error100); - return result; + +// node_modules/axios/lib/cancel/isCancel.js +function isCancel(value) { + return !!(value && value.__CANCEL__); } -function toDotPath(_path) { - const segs = []; - const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); - for (const seg of path) { - if (typeof seg === "number") - segs.push(`[${seg}]`); - else if (typeof seg === "symbol") - segs.push(`[${JSON.stringify(String(seg))}]`); - else if (/[^\w$]/.test(seg)) - segs.push(`[${JSON.stringify(seg)}]`); - else { - if (segs.length) - segs.push("."); - segs.push(seg); - } + +// node_modules/axios/lib/cancel/CanceledError.js +var CanceledError = class extends AxiosError_default { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message2, config3, request2) { + super(message2 == null ? "canceled" : message2, AxiosError_default.ERR_CANCELED, config3, request2); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } +}; +var CanceledError_default = CanceledError; + +// node_modules/axios/lib/core/settle.js +function settle(resolve, reject, response) { + const validateStatus2 = response.config.validateStatus; + if (!response.status || !validateStatus2 || validateStatus2(response.status)) { + resolve(response); + } else { + reject( + new AxiosError_default( + "Request failed with status code " + response.status, + [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + ) + ); } - return segs.join(""); } -function prettifyError(error100) { - const lines = []; - const issues = [...error100.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); - for (const issue5 of issues) { - lines.push(`\u2716 ${issue5.message}`); - if (issue5.path?.length) - lines.push(` \u2192 at ${toDotPath(issue5.path)}`); + +// node_modules/axios/lib/helpers/isAbsoluteURL.js +function isAbsoluteURL(url4) { + if (typeof url4 !== "string") { + return false; } - return lines.join("\n"); + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url4); } -// node_modules/testing-farm/node_modules/zod/v4/core/parse.js -var _parse = (_Err) => (schema, value, _ctx, _params) => { - const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; - const result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) { - throw new $ZodAsyncError(); +// node_modules/axios/lib/helpers/combineURLs.js +function combineURLs(baseURL, relativeURL) { + return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; +} + +// node_modules/axios/lib/core/buildFullPath.js +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) { + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) { + return combineURLs(baseURL, requestedURL); } - if (result.issues.length) { - const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); - captureStackTrace(e, _params?.callee); - throw e; + return requestedURL; +} + +// node_modules/axios/lib/adapters/http.js +var import_proxy_from_env = __toESM(require_proxy_from_env(), 1); +var import_follow_redirects = __toESM(require_follow_redirects(), 1); +import http from "http"; +import https from "https"; +import http2 from "http2"; +import util2 from "util"; +import zlib from "zlib"; + +// node_modules/axios/lib/env/data.js +var VERSION = "1.13.6"; + +// node_modules/axios/lib/helpers/parseProtocol.js +function parseProtocol(url4) { + const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url4); + return match2 && match2[1] || ""; +} + +// node_modules/axios/lib/helpers/fromDataURI.js +var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; +function fromDataURI(uri, asBlob, options) { + const _Blob = options && options.Blob || platform_default.classes.Blob; + const protocol = parseProtocol(uri); + if (asBlob === void 0 && _Blob) { + asBlob = true; } - return result.value; -}; -var parse = /* @__PURE__ */ _parse($ZodRealError); -var _parseAsync = (_Err) => async (schema, value, _ctx, params) => { - const ctx = _ctx ? Object.assign(_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); - throw e; + if (protocol === "data") { + uri = protocol.length ? uri.slice(protocol.length + 1) : uri; + const match2 = DATA_URL_PATTERN.exec(uri); + if (!match2) { + throw new AxiosError_default("Invalid URL", AxiosError_default.ERR_INVALID_URL); + } + const mime = match2[1]; + const isBase64 = match2[2]; + const body = match2[3]; + const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8"); + if (asBlob) { + if (!_Blob) { + throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT); + } + return new _Blob([buffer], { type: mime }); + } + return buffer; } - return result.value; -}; -var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); -var _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(); + throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT); +} + +// node_modules/axios/lib/adapters/http.js +import stream3 from "stream"; + +// node_modules/axios/lib/helpers/AxiosTransformStream.js +import stream from "stream"; +var kInternals = /* @__PURE__ */ Symbol("internals"); +var AxiosTransformStream = class extends stream.Transform { + constructor(options) { + options = utils_default.toFlatObject( + options, + { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15 + }, + null, + (prop, source) => { + return !utils_default.isUndefined(source[prop]); + } + ); + super({ + readableHighWaterMark: options.chunkSize + }); + const internals = this[kInternals] = { + timeWindow: options.timeWindow, + chunkSize: options.chunkSize, + maxRate: options.maxRate, + minChunkSize: options.minChunkSize, + bytesSeen: 0, + isCaptured: false, + notifiedBytesLoaded: 0, + ts: Date.now(), + bytes: 0, + onReadCallback: null + }; + this.on("newListener", (event) => { + if (event === "progress") { + if (!internals.isCaptured) { + internals.isCaptured = true; + } + } + }); + } + _read(size) { + const internals = this[kInternals]; + if (internals.onReadCallback) { + internals.onReadCallback(); + } + return super._read(size); + } + _transform(chunk, encoding, callback) { + const internals = this[kInternals]; + const maxRate = internals.maxRate; + const readableHighWaterMark = this.readableHighWaterMark; + const timeWindow = internals.timeWindow; + const divider = 1e3 / timeWindow; + const bytesThreshold = maxRate / divider; + const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; + const pushChunk = (_chunk, _callback) => { + const bytes = Buffer.byteLength(_chunk); + internals.bytesSeen += bytes; + internals.bytes += bytes; + internals.isCaptured && this.emit("progress", internals.bytesSeen); + if (this.push(_chunk)) { + process.nextTick(_callback); + } else { + internals.onReadCallback = () => { + internals.onReadCallback = null; + process.nextTick(_callback); + }; + } + }; + const transformChunk = (_chunk, _callback) => { + const chunkSize = Buffer.byteLength(_chunk); + let chunkRemainder = null; + let maxChunkSize = readableHighWaterMark; + let bytesLeft; + let passed = 0; + if (maxRate) { + const now = Date.now(); + if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { + internals.ts = now; + bytesLeft = bytesThreshold - internals.bytes; + internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; + passed = 0; + } + bytesLeft = bytesThreshold - internals.bytes; + } + if (maxRate) { + if (bytesLeft <= 0) { + return setTimeout(() => { + _callback(null, _chunk); + }, timeWindow - passed); + } + if (bytesLeft < maxChunkSize) { + maxChunkSize = bytesLeft; + } + } + if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { + chunkRemainder = _chunk.subarray(maxChunkSize); + _chunk = _chunk.subarray(0, maxChunkSize); + } + pushChunk( + _chunk, + chunkRemainder ? () => { + process.nextTick(_callback, null, chunkRemainder); + } : _callback + ); + }; + transformChunk(chunk, function transformNextChunk(err, _chunk) { + if (err) { + return callback(err); + } + if (_chunk) { + transformChunk(_chunk, transformNextChunk); + } else { + callback(null); + } + }); } - return result.issues.length ? { - success: false, - error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - } : { success: true, data: result.value }; -}; -var safeParse = /* @__PURE__ */ _safeParse($ZodRealError); -var _safeParseAsync = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; - let result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) - result = await result; - return result.issues.length ? { - success: false, - error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - } : { success: true, data: result.value }; -}; -var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); -var _encode = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _parse(_Err)(schema, value, ctx); -}; -var encode3 = /* @__PURE__ */ _encode($ZodRealError); -var _decode = (_Err) => (schema, value, _ctx) => { - return _parse(_Err)(schema, value, _ctx); -}; -var decode = /* @__PURE__ */ _decode($ZodRealError); -var _encodeAsync = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _parseAsync(_Err)(schema, value, ctx); }; -var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); -var _decodeAsync = (_Err) => async (schema, value, _ctx) => { - return _parseAsync(_Err)(schema, value, _ctx); +var AxiosTransformStream_default = AxiosTransformStream; + +// node_modules/axios/lib/adapters/http.js +import { EventEmitter } from "events"; + +// node_modules/axios/lib/helpers/formDataToStream.js +import util from "util"; +import { Readable } from "stream"; + +// node_modules/axios/lib/helpers/readBlob.js +var { asyncIterator } = Symbol; +var readBlob = async function* (blob) { + if (blob.stream) { + yield* blob.stream(); + } else if (blob.arrayBuffer) { + yield await blob.arrayBuffer(); + } else if (blob[asyncIterator]) { + yield* blob[asyncIterator](); + } else { + yield blob; + } }; -var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); -var _safeEncode = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _safeParse(_Err)(schema, value, ctx); +var readBlob_default = readBlob; + +// node_modules/axios/lib/helpers/formDataToStream.js +var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_"; +var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder(); +var CRLF = "\r\n"; +var CRLF_BYTES = textEncoder.encode(CRLF); +var CRLF_BYTES_COUNT = 2; +var FormDataPart = class { + constructor(name, value) { + const { escapeName } = this.constructor; + const isStringValue = utils_default.isString(value); + let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`; + if (isStringValue) { + value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); + } else { + headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`; + } + this.headers = textEncoder.encode(headers + CRLF); + this.contentLength = isStringValue ? value.byteLength : value.size; + this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; + this.name = name; + this.value = value; + } + async *encode() { + yield this.headers; + const { value } = this; + if (utils_default.isTypedArray(value)) { + yield value; + } else { + yield* readBlob_default(value); + } + yield CRLF_BYTES; + } + static escapeName(name) { + return String(name).replace( + /[\r\n"]/g, + (match2) => ({ + "\r": "%0D", + "\n": "%0A", + '"': "%22" + })[match2] + ); + } }; -var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); -var _safeDecode = (_Err) => (schema, value, _ctx) => { - return _safeParse(_Err)(schema, value, _ctx); +var formDataToStream = (form, headersHandler, options) => { + const { + tag = "form-data-boundary", + size = 25, + boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) + } = options || {}; + if (!utils_default.isFormData(form)) { + throw TypeError("FormData instance required"); + } + if (boundary.length < 1 || boundary.length > 70) { + throw Error("boundary must be 10-70 characters long"); + } + const boundaryBytes = textEncoder.encode("--" + boundary + CRLF); + const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF); + let contentLength = footerBytes.byteLength; + const parts = Array.from(form.entries()).map(([name, value]) => { + const part = new FormDataPart(name, value); + contentLength += part.size; + return part; + }); + contentLength += boundaryBytes.byteLength * parts.length; + contentLength = utils_default.toFiniteNumber(contentLength); + const computedHeaders = { + "Content-Type": `multipart/form-data; boundary=${boundary}` + }; + if (Number.isFinite(contentLength)) { + computedHeaders["Content-Length"] = contentLength; + } + headersHandler && headersHandler(computedHeaders); + return Readable.from( + (async function* () { + for (const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } + yield footerBytes; + })() + ); }; -var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); -var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _safeParseAsync(_Err)(schema, value, ctx); +var formDataToStream_default = formDataToStream; + +// node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +import stream2 from "stream"; +var ZlibHeaderTransformStream = class extends stream2.Transform { + __transform(chunk, encoding, callback) { + this.push(chunk); + callback(); + } + _transform(chunk, encoding, callback) { + if (chunk.length !== 0) { + this._transform = this.__transform; + if (chunk[0] !== 120) { + const header = Buffer.alloc(2); + header[0] = 120; + header[1] = 156; + this.push(header, encoding); + } + } + this.__transform(chunk, encoding, callback); + } }; -var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); -var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { - return _safeParseAsync(_Err)(schema, value, _ctx); +var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream; + +// node_modules/axios/lib/helpers/callbackify.js +var callbackify = (fn, reducer) => { + return utils_default.isAsyncFn(fn) ? function(...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); + } : fn; }; -var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); +var callbackify_default = callbackify; -// node_modules/testing-farm/node_modules/zod/v4/core/regexes.js -var regexes_exports = {}; -__export(regexes_exports, { - base64: () => base64, - base64url: () => base64url, - bigint: () => bigint, - boolean: () => boolean, - browserEmail: () => browserEmail, - cidrv4: () => cidrv4, - cidrv6: () => cidrv6, - cuid: () => cuid, - cuid2: () => cuid2, - date: () => date, - datetime: () => datetime, - domain: () => domain, - duration: () => duration, - e164: () => e164, - email: () => email, - emoji: () => emoji, - extendedDuration: () => extendedDuration, - guid: () => guid, - hex: () => hex, - hostname: () => hostname, - html5Email: () => html5Email, - idnEmail: () => idnEmail, - integer: () => integer, - ipv4: () => ipv4, - ipv6: () => ipv6, - ksuid: () => ksuid, - lowercase: () => lowercase, - mac: () => mac, - md5_base64: () => md5_base64, - md5_base64url: () => md5_base64url, - md5_hex: () => md5_hex, - nanoid: () => nanoid, - null: () => _null, - number: () => number, - rfc5322Email: () => rfc5322Email, - sha1_base64: () => sha1_base64, - sha1_base64url: () => sha1_base64url, - sha1_hex: () => sha1_hex, - sha256_base64: () => sha256_base64, - sha256_base64url: () => sha256_base64url, - sha256_hex: () => sha256_hex, - sha384_base64: () => sha384_base64, - sha384_base64url: () => sha384_base64url, - sha384_hex: () => sha384_hex, - sha512_base64: () => sha512_base64, - sha512_base64url: () => sha512_base64url, - sha512_hex: () => sha512_hex, - string: () => string, - time: () => time, - ulid: () => ulid, - undefined: () => _undefined, - unicodeEmail: () => unicodeEmail, - uppercase: () => uppercase, - uuid: () => uuid, - uuid4: () => uuid4, - uuid6: () => uuid6, - uuid7: () => uuid7, - xid: () => xid -}); -var cuid = /^[cC][^\s-]{8,}$/; -var cuid2 = /^[0-9a-z]+$/; -var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; -var xid = /^[0-9a-vA-V]{20}$/; -var ksuid = /^[A-Za-z0-9]{27}$/; -var nanoid = /^[a-zA-Z0-9_-]{21}$/; -var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; -var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; -var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; -var uuid = (version4) => { - if (!version4) - return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); -}; -var uuid4 = /* @__PURE__ */ uuid(4); -var uuid6 = /* @__PURE__ */ uuid(6); -var uuid7 = /* @__PURE__ */ uuid(7); -var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; -var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; -var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; -var idnEmail = unicodeEmail; -var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -function emoji() { - return new RegExp(_emoji, "u"); -} -var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; -var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; -var mac = (delimiter) => { - const escapedDelim = escapeRegex(delimiter ?? ":"); - return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); -}; -var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; -var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; -var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; -var base64url = /^[A-Za-z0-9_-]*$/; -var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; -var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; -var e164 = /^\+[1-9]\d{6,14}$/; -var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; -var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); -function timeSource(args) { - const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; - const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; - return regex2; -} -function time(args) { - return new RegExp(`^${timeSource(args)}$`); -} -function datetime(args) { - const time6 = timeSource({ precision: args.precision }); - const opts = ["Z"]; - if (args.local) - opts.push(""); - if (args.offset) - opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); - const timeRegex = `${time6}(?:${opts.join("|")})`; - return new RegExp(`^${dateSource}T(?:${timeRegex})$`); -} -var string = (params) => { - const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; - return new RegExp(`^${regex2}$`); -}; -var bigint = /^-?\d+n?$/; -var integer = /^-?\d+$/; -var number = /^-?\d+(?:\.\d+)?$/; -var boolean = /^(?:true|false)$/i; -var _null = /^null$/i; -var _undefined = /^undefined$/i; -var lowercase = /^[^A-Z]*$/; -var uppercase = /^[^a-z]*$/; -var hex = /^[0-9a-fA-F]*$/; -function fixedBase64(bodyLength, padding) { - return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); -} -function fixedBase64url(length) { - return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); -} -var md5_hex = /^[0-9a-fA-F]{32}$/; -var md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); -var md5_base64url = /* @__PURE__ */ fixedBase64url(22); -var sha1_hex = /^[0-9a-fA-F]{40}$/; -var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); -var sha1_base64url = /* @__PURE__ */ fixedBase64url(27); -var sha256_hex = /^[0-9a-fA-F]{64}$/; -var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); -var sha256_base64url = /* @__PURE__ */ fixedBase64url(43); -var sha384_hex = /^[0-9a-fA-F]{96}$/; -var sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); -var sha384_base64url = /* @__PURE__ */ fixedBase64url(64); -var sha512_hex = /^[0-9a-fA-F]{128}$/; -var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); -var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); - -// node_modules/testing-farm/node_modules/zod/v4/core/checks.js -var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { - var _a5; - inst._zod ?? (inst._zod = {}); - inst._zod.def = def; - (_a5 = inst._zod).onattach ?? (_a5.onattach = []); -}); -var numericOriginMap = { - number: "number", - bigint: "bigint", - object: "date" -}; -var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { - $ZodCheck.init(inst, def); - const origin2 = numericOriginMap[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; - if (def.value < curr) { - if (def.inclusive) - bag.maximum = def.value; - else - bag.exclusiveMaximum = def.value; +// node_modules/axios/lib/helpers/speedometer.js +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== void 0 ? min : 1e3; + return function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { - return; + bytes[head] = chunkLength; + timestamps[head] = now; + let i = tail; + let bytesCount = 0; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; } - payload.issues.push({ - origin: origin2, - code: "too_big", - maximum: typeof def.value === "object" ? def.value.getTime() : def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { - $ZodCheck.init(inst, def); - const origin2 = numericOriginMap[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; - if (def.value > curr) { - if (def.inclusive) - bag.minimum = def.value; - else - bag.exclusiveMinimum = def.value; + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + if (now - firstSampleTS < min) { return; } - payload.issues.push({ - origin: origin2, - code: "too_small", - minimum: typeof def.value === "object" ? def.value.getTime() : def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; }; -}); -var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.onattach.push((inst2) => { - var _a5; - (_a5 = inst2._zod.bag).multipleOf ?? (_a5.multipleOf = def.value); - }); - inst._zod.check = (payload) => { - if (typeof payload.value !== typeof def.value) - throw new Error("Cannot mix number and bigint in multiple_of check."); - const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; - if (isMultiple) - return; - payload.issues.push({ - origin: typeof payload.value, - code: "not_multiple_of", - divisor: def.value, - input: payload.value, - inst, - continue: !def.abort - }); +} +var speedometer_default = speedometer; + +// node_modules/axios/lib/helpers/throttle.js +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1e3 / freq; + let lastArgs; + let timer; + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); }; -}); -var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { - $ZodCheck.init(inst, def); - def.format = def.format || "float64"; - const isInt = def.format?.includes("int"); - const origin2 = isInt ? "int" : "number"; - const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - if (isInt) - bag.pattern = integer; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (isInt) { - if (!Number.isInteger(input)) { - payload.issues.push({ - expected: origin2, - format: def.format, - code: "invalid_type", - continue: false, - input, - inst - }); - return; + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); } - if (!Number.isSafeInteger(input)) { - if (input > 0) { - payload.issues.push({ - input, - code: "too_big", - maximum: Number.MAX_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin: origin2, - inclusive: true, - continue: !def.abort - }); - } else { - payload.issues.push({ - input, - code: "too_small", - minimum: Number.MIN_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin: origin2, - inclusive: true, - continue: !def.abort - }); + } + }; + const flush = () => lastArgs && invoke(lastArgs); + return [throttled, flush]; +} +var throttle_default = throttle; + +// node_modules/axios/lib/helpers/progressEventReducer.js +var progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer_default(50, 250); + return throttle_default((e) => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : void 0; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + bytesNotified = loaded; + const data = { + loaded, + total, + progress: total ? loaded / total : void 0, + bytes: progressBytes, + rate: rate ? rate : void 0, + estimated: rate && total && inRange ? (total - loaded) / rate : void 0, + event: e, + lengthComputable: total != null, + [isDownloadStream ? "download" : "upload"]: true + }; + listener(data); + }, freq); +}; +var progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + return [ + (loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), + throttled[1] + ]; +}; +var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args)); + +// node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +function estimateDataURLDecodedBytes(url4) { + if (!url4 || typeof url4 !== "string") return 0; + if (!url4.startsWith("data:")) return 0; + const comma = url4.indexOf(","); + if (comma < 0) return 0; + const meta5 = url4.slice(5, comma); + const body = url4.slice(comma + 1); + const isBase64 = /;base64/i.test(meta5); + if (isBase64) { + let effectiveLen = body.length; + const len = body.length; + for (let i = 0; i < len; i++) { + if (body.charCodeAt(i) === 37 && i + 2 < len) { + const a = body.charCodeAt(i + 1); + const b = body.charCodeAt(i + 2); + const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102); + if (isHex) { + effectiveLen -= 2; + i += 2; } - return; } } - if (input < minimum) { - payload.issues.push({ - origin: "number", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); + let pad = 0; + let idx = len - 1; + const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%' + body.charCodeAt(j - 1) === 51 && // '3' + (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); + if (idx >= 0) { + if (body.charCodeAt(idx) === 61) { + pad++; + idx--; + } else if (tailIsPct3D(idx)) { + pad++; + idx -= 3; + } } - if (input > maximum) { - payload.issues.push({ - origin: "number", - input, - code: "too_big", - maximum, - inclusive: true, - inst, - continue: !def.abort - }); + if (pad === 1 && idx >= 0) { + if (body.charCodeAt(idx) === 61) { + pad++; + } else if (tailIsPct3D(idx)) { + pad++; + } } - }; + const groups2 = Math.floor(effectiveLen / 4); + const bytes = groups2 * 3 - (pad || 0); + return bytes > 0 ? bytes : 0; + } + return Buffer.byteLength(body, "utf8"); +} + +// node_modules/axios/lib/adapters/http.js +var zlibOptions = { + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH +}; +var brotliOptions = { + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH +}; +var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress); +var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default; +var isHttps = /https:?/; +var supportedProtocols = platform_default.protocols.map((protocol) => { + return protocol + ":"; }); -var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { - $ZodCheck.init(inst, def); - const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (input < minimum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_big", - maximum, - inclusive: true, - inst, - continue: !def.abort - }); +var flushOnFinish = (stream4, [throttled, flush]) => { + stream4.on("end", flush).on("error", flush); + return throttled; +}; +var Http2Sessions = class { + constructor() { + this.sessions = /* @__PURE__ */ Object.create(null); + } + getSession(authority, options) { + options = Object.assign( + { + sessionTimeout: 1e3 + }, + options + ); + let authoritySessions = this.sessions[authority]; + if (authoritySessions) { + let len = authoritySessions.length; + for (let i = 0; i < len; i++) { + const [sessionHandle, sessionOptions] = authoritySessions[i]; + if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) { + return sessionHandle; + } + } } - }; -}); -var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { - var _a5; - $ZodCheck.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size <= def.maximum) - return; - payload.issues.push({ - origin: getSizableOrigin(input), - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { - var _a5; - $ZodCheck.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size >= def.minimum) - return; - payload.issues.push({ - origin: getSizableOrigin(input), - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { - var _a5; - $ZodCheck.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.size; - bag.maximum = def.size; - bag.size = def.size; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size === def.size) - return; - const tooBig = size > def.size; - payload.issues.push({ - origin: getSizableOrigin(input), - ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { - var _a5; - $ZodCheck.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length <= def.maximum) - return; - const origin2 = getLengthableOrigin(input); - payload.issues.push({ - origin: origin2, - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { - var _a5; - $ZodCheck.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length >= def.minimum) - return; - const origin2 = getLengthableOrigin(input); - payload.issues.push({ - origin: origin2, - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { - var _a5; - $ZodCheck.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.length; - bag.maximum = def.length; - bag.length = def.length; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length === def.length) - return; - const origin2 = getLengthableOrigin(input); - const tooBig = length > def.length; - payload.issues.push({ - origin: origin2, - ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { - var _a5, _b; - $ZodCheck.init(inst, def); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - if (def.pattern) { - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(def.pattern); - } - }); - if (def.pattern) - (_a5 = inst._zod).check ?? (_a5.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) + const session = http2.connect(authority, options); + let removed; + const removeSession = () => { + if (removed) { 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 = () => { - }); -}); -var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { - $ZodCheckStringFormat.init(inst, def); - inst._zod.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "regex", - input: payload.value, - pattern: def.pattern.toString(), - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { - def.pattern ?? (def.pattern = lowercase); - $ZodCheckStringFormat.init(inst, def); -}); -var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { - def.pattern ?? (def.pattern = uppercase); - $ZodCheckStringFormat.init(inst, def); -}); -var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { - $ZodCheck.init(inst, def); - const escapedRegex = escapeRegex(def.includes); - const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); - def.pattern = pattern; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.includes(def.includes, def.position)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "includes", - includes: def.includes, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { - $ZodCheck.init(inst, def); - const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.startsWith(def.prefix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "starts_with", - prefix: def.prefix, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { - $ZodCheck.init(inst, def); - const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.endsWith(def.suffix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "ends_with", - suffix: def.suffix, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -function handleCheckPropertyResult(result, payload, property) { - if (result.issues.length) { - payload.issues.push(...prefixIssues(property, result.issues)); + } + removed = true; + let entries = authoritySessions, len = entries.length, i = len; + while (i--) { + if (entries[i][0] === session) { + if (len === 1) { + delete this.sessions[authority]; + } else { + entries.splice(i, 1); + } + return; + } + } + }; + const originalRequestFn = session.request; + const { sessionTimeout } = options; + if (sessionTimeout != null) { + let timer; + let streamsCount = 0; + session.request = function() { + const stream4 = originalRequestFn.apply(this, arguments); + streamsCount++; + if (timer) { + clearTimeout(timer); + timer = null; + } + stream4.once("close", () => { + if (!--streamsCount) { + timer = setTimeout(() => { + timer = null; + removeSession(); + }, sessionTimeout); + } + }); + return stream4; + }; + } + session.once("close", removeSession); + let entry = [session, options]; + authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry]; + return session; + } +}; +var http2Sessions = new Http2Sessions(); +function dispatchBeforeRedirect(options, responseDetails) { + if (options.beforeRedirects.proxy) { + options.beforeRedirects.proxy(options); + } + if (options.beforeRedirects.config) { + options.beforeRedirects.config(options, responseDetails); } } -var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.check = (payload) => { - const result = def.schema._zod.run({ - value: payload.value[def.property], - issues: [] - }, {}); - if (result instanceof Promise) { - return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); +function setProxy(options, configProxy, location) { + let proxy = configProxy; + if (!proxy && proxy !== false) { + const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location); + if (proxyUrl) { + proxy = new URL(proxyUrl); } - handleCheckPropertyResult(result, payload, def.property); - return; - }; -}); -var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { - $ZodCheck.init(inst, def); - const mimeSet = new Set(def.mime); - inst._zod.onattach.push((inst2) => { - inst2._zod.bag.mime = def.mime; - }); - inst._zod.check = (payload) => { - if (mimeSet.has(payload.value.type)) - return; - payload.issues.push({ - code: "invalid_value", - values: def.mime, - input: payload.value.type, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { - $ZodCheck.init(inst, def); - inst._zod.check = (payload) => { - payload.value = def.tx(payload.value); - }; -}); - -// node_modules/testing-farm/node_modules/zod/v4/core/doc.js -var Doc = class { - constructor(args = []) { - this.content = []; - this.indent = 0; - if (this) - this.args = args; - } - indented(fn) { - this.indent += 1; - fn(this); - this.indent -= 1; } - write(arg) { - if (typeof arg === "function") { - arg(this, { execution: "sync" }); - arg(this, { execution: "async" }); - return; + if (proxy) { + if (proxy.username) { + proxy.auth = (proxy.username || "") + ":" + (proxy.password || ""); } - const content = arg; - const lines = content.split("\n").filter((x) => x); - const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); - const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); - for (const line of dedented) { - this.content.push(line); + if (proxy.auth) { + const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password); + if (validProxyAuth) { + proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || ""); + } else if (typeof proxy.auth === "object") { + throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy }); + } + const base645 = Buffer.from(proxy.auth, "utf8").toString("base64"); + options.headers["Proxy-Authorization"] = "Basic " + base645; + } + options.headers.host = options.hostname + (options.port ? ":" + options.port : ""); + const proxyHost = proxy.hostname || proxy.host; + options.hostname = proxyHost; + options.host = proxyHost; + options.port = proxy.port; + options.path = location; + if (proxy.protocol) { + options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`; } } - compile() { - const F = Function; - const args = this?.args; - const content = this?.content ?? [``]; - const lines = [...content.map((x) => ` ${x}`)]; - return new F(...args, lines.join("\n")); - } + options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { + setProxy(redirectOptions, configProxy, redirectOptions.href); + }; +} +var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process"; +var wrapAsync = (asyncExecutor) => { + return new Promise((resolve, reject) => { + let onDone; + let isDone; + const done = (value, isRejected) => { + if (isDone) return; + isDone = true; + onDone && onDone(value, isRejected); + }; + const _resolve = (value) => { + done(value); + resolve(value); + }; + const _reject = (reason) => { + done(reason, true); + reject(reason); + }; + asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject); + }); }; - -// node_modules/testing-farm/node_modules/zod/v4/core/versions.js -var version = { - major: 4, - minor: 3, - patch: 6 +var resolveFamily = ({ address, family }) => { + if (!utils_default.isString(address)) { + throw TypeError("address must be a string"); + } + return { + address, + family: family || (address.indexOf(".") < 0 ? 6 : 4) + }; }; - -// node_modules/testing-farm/node_modules/zod/v4/core/schemas.js -var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { - var _a5; - inst ?? (inst = {}); - inst._zod.def = def; - inst._zod.bag = inst._zod.bag || {}; - inst._zod.version = version; - const checks = [...inst._zod.def.checks ?? []]; - if (inst._zod.traits.has("$ZodCheck")) { - checks.unshift(inst); +var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family }); +var http2Transport = { + request(options, cb) { + const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80)); + const { http2Options, headers } = options; + const session = http2Sessions.getSession(authority, http2Options); + const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants; + const http2Headers = { + [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""), + [HTTP2_HEADER_METHOD]: options.method, + [HTTP2_HEADER_PATH]: options.path + }; + utils_default.forEach(headers, (header, name) => { + name.charAt(0) !== ":" && (http2Headers[name] = header); + }); + const req = session.request(http2Headers); + req.once("response", (responseHeaders) => { + const response = req; + responseHeaders = Object.assign({}, responseHeaders); + const status = responseHeaders[HTTP2_HEADER_STATUS]; + delete responseHeaders[HTTP2_HEADER_STATUS]; + response.headers = responseHeaders; + response.statusCode = +status; + cb(response); + }); + return req; } - for (const ch of checks) { - for (const fn of ch._zod.onattach) { - fn(inst); +}; +var http_default = isHttpAdapterSupported && function httpAdapter(config3) { + return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { + let { data, lookup, family, httpVersion = 1, http2Options } = config3; + const { responseType, responseEncoding } = config3; + const method = config3.method.toUpperCase(); + let isDone; + let rejected = false; + let req; + httpVersion = +httpVersion; + if (Number.isNaN(httpVersion)) { + throw TypeError(`Invalid protocol version: '${config3.httpVersion}' is not a number`); } - } - if (checks.length === 0) { - (_a5 = inst._zod).deferred ?? (_a5.deferred = []); - inst._zod.deferred?.push(() => { - inst._zod.run = inst._zod.parse; - }); - } else { - const runChecks = (payload, checks2, ctx) => { - let isAborted = aborted(payload); - let asyncResult; - for (const ch of checks2) { - if (ch._zod.def.when) { - const shouldRun = ch._zod.def.when(payload); - if (!shouldRun) - 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 _; - const nextLen = payload.issues.length; - if (nextLen === currLen) - return; - if (!isAborted) - isAborted = aborted(payload, currLen); - }); - } else { - const nextLen = payload.issues.length; - if (nextLen === currLen) - continue; - if (!isAborted) - isAborted = aborted(payload, currLen); - } - } - if (asyncResult) { - return asyncResult.then(() => { - return payload; + if (httpVersion !== 1 && httpVersion !== 2) { + throw TypeError(`Unsupported protocol version '${httpVersion}'`); + } + const isHttp2 = httpVersion === 2; + if (lookup) { + const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]); + lookup = (hostname5, opt, cb) => { + _lookup(hostname5, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } + const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); }); + }; + } + const abortEmitter = new EventEmitter(); + function abort(reason) { + try { + abortEmitter.emit( + "abort", + !reason || reason.type ? new CanceledError_default(null, config3, req) : reason + ); + } catch (err) { + console.warn("emit error", err); } - return payload; - }; - const handleCanaryResult = (canary, payload, ctx) => { - if (aborted(canary)) { - canary.aborted = true; - return canary; + } + abortEmitter.once("abort", reject); + const onFinished = () => { + if (config3.cancelToken) { + config3.cancelToken.unsubscribe(abort); } - const checkResult = runChecks(payload, checks, ctx); - if (checkResult instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError(); - return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + if (config3.signal) { + config3.signal.removeEventListener("abort", abort); } - return inst._zod.parse(checkResult, ctx); + abortEmitter.removeAllListeners(); }; - inst._zod.run = (payload, ctx) => { - if (ctx.skipChecks) { - return inst._zod.parse(payload, ctx); + if (config3.cancelToken || config3.signal) { + config3.cancelToken && config3.cancelToken.subscribe(abort); + if (config3.signal) { + config3.signal.aborted ? abort() : config3.signal.addEventListener("abort", abort); } - if (ctx.direction === "backward") { - const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); - if (canary instanceof Promise) { - return canary.then((canary2) => { - return handleCanaryResult(canary2, payload, ctx); - }); - } - return handleCanaryResult(canary, payload, ctx); + } + onDone((response, isRejected) => { + isDone = true; + if (isRejected) { + rejected = true; + onFinished(); + return; } - const result = inst._zod.parse(payload, ctx); - if (result instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError(); - return result.then((result2) => runChecks(result2, checks, ctx)); + const { data: data2 } = response; + if (data2 instanceof stream3.Readable || data2 instanceof stream3.Duplex) { + const offListeners = stream3.finished(data2, () => { + offListeners(); + onFinished(); + }); + } else { + onFinished(); } - return runChecks(result, checks, ctx); - }; - } - defineLazy(inst, "~standard", () => ({ - validate: (value) => { - try { - const r = safeParse(inst, value); - return r.success ? { value: r.data } : { issues: r.error?.issues }; - } catch (_) { - return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); + }); + const fullPath = buildFullPath(config3.baseURL, config3.url, config3.allowAbsoluteUrls); + const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0); + const protocol = parsed.protocol || supportedProtocols[0]; + if (protocol === "data:") { + if (config3.maxContentLength > -1) { + const dataUrl = String(config3.url || fullPath || ""); + const estimated = estimateDataURLDecodedBytes(dataUrl); + if (estimated > config3.maxContentLength) { + return reject( + new AxiosError_default( + "maxContentLength size of " + config3.maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config3 + ) + ); + } + } + let convertedData; + if (method !== "GET") { + return settle(resolve, reject, { + status: 405, + statusText: "method not allowed", + headers: {}, + config: config3 + }); } - }, - vendor: "zod", - version: 1 - })); -}); -var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); - inst._zod.parse = (payload, _) => { - if (def.coerce) try { - payload.value = String(payload.value); - } catch (_2) { + convertedData = fromDataURI(config3.url, responseType === "blob", { + Blob: config3.env && config3.env.Blob + }); + } catch (err) { + throw AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config3); } - if (typeof payload.value === "string") - return payload; - payload.issues.push({ - expected: "string", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; -}); -var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { - $ZodCheckStringFormat.init(inst, def); - $ZodString.init(inst, def); -}); -var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { - def.pattern ?? (def.pattern = guid); - $ZodStringFormat.init(inst, def); -}); -var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { - if (def.version) { - const versionMap = { - v1: 1, - v2: 2, - v3: 3, - v4: 4, - v5: 5, - v6: 6, - v7: 7, - v8: 8 - }; - const v = versionMap[def.version]; - if (v === void 0) - throw new Error(`Invalid UUID version: "${def.version}"`); - def.pattern ?? (def.pattern = uuid(v)); - } else - def.pattern ?? (def.pattern = uuid()); - $ZodStringFormat.init(inst, def); -}); -var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { - def.pattern ?? (def.pattern = email); - $ZodStringFormat.init(inst, def); -}); -var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - try { - const trimmed = payload.value.trim(); - const url5 = new URL(trimmed); - if (def.hostname) { - def.hostname.lastIndex = 0; - if (!def.hostname.test(url5.hostname)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid hostname", - pattern: def.hostname.source, - input: payload.value, - inst, - continue: !def.abort - }); + if (responseType === "text") { + convertedData = convertedData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === "utf8") { + convertedData = utils_default.stripBOM(convertedData); } + } else if (responseType === "stream") { + convertedData = stream3.Readable.from(convertedData); } - if (def.protocol) { - def.protocol.lastIndex = 0; - if (!def.protocol.test(url5.protocol.endsWith(":") ? url5.protocol.slice(0, -1) : url5.protocol)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid protocol", - pattern: def.protocol.source, - input: payload.value, - inst, - continue: !def.abort - }); + return settle(resolve, reject, { + data: convertedData, + status: 200, + statusText: "OK", + headers: new AxiosHeaders_default(), + config: config3 + }); + } + if (supportedProtocols.indexOf(protocol) === -1) { + return reject( + new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config3) + ); + } + const headers = AxiosHeaders_default.from(config3.headers).normalize(); + headers.set("User-Agent", "axios/" + VERSION, false); + const { onUploadProgress, onDownloadProgress } = config3; + const maxRate = config3.maxRate; + let maxUploadRate = void 0; + let maxDownloadRate = void 0; + if (utils_default.isSpecCompliantForm(data)) { + const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); + data = formDataToStream_default( + data, + (formHeaders) => { + headers.set(formHeaders); + }, + { + tag: `axios-${VERSION}-boundary`, + boundary: userBoundary && userBoundary[1] || void 0 + } + ); + } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) { + headers.set(data.getHeaders()); + if (!headers.hasContentLength()) { + try { + const knownLength = await util2.promisify(data.getLength).call(data); + Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); + } catch (e) { } } - if (def.normalize) { - payload.value = url5.href; + } else if (utils_default.isBlob(data) || utils_default.isFile(data)) { + data.size && headers.setContentType(data.type || "application/octet-stream"); + headers.setContentLength(data.size || 0); + data = stream3.Readable.from(readBlob_default(data)); + } else if (data && !utils_default.isStream(data)) { + if (Buffer.isBuffer(data)) { + } else if (utils_default.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils_default.isString(data)) { + data = Buffer.from(data, "utf-8"); } else { - payload.value = trimmed; + return reject( + new AxiosError_default( + "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); + } + headers.setContentLength(data.length, false); + if (config3.maxBodyLength > -1 && data.length > config3.maxBodyLength) { + return reject( + new AxiosError_default( + "Request body larger than maxBodyLength limit", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); } - return; - } catch (_) { - payload.issues.push({ - code: "invalid_format", - format: "url", - input: payload.value, - inst, - continue: !def.abort - }); } - }; -}); -var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { - def.pattern ?? (def.pattern = emoji()); - $ZodStringFormat.init(inst, def); -}); -var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { - def.pattern ?? (def.pattern = nanoid); - $ZodStringFormat.init(inst, def); -}); -var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { - def.pattern ?? (def.pattern = cuid); - $ZodStringFormat.init(inst, def); -}); -var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { - def.pattern ?? (def.pattern = cuid2); - $ZodStringFormat.init(inst, def); -}); -var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { - def.pattern ?? (def.pattern = ulid); - $ZodStringFormat.init(inst, def); -}); -var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { - def.pattern ?? (def.pattern = xid); - $ZodStringFormat.init(inst, def); -}); -var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { - def.pattern ?? (def.pattern = ksuid); - $ZodStringFormat.init(inst, def); -}); -var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { - def.pattern ?? (def.pattern = datetime(def)); - $ZodStringFormat.init(inst, def); -}); -var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { - def.pattern ?? (def.pattern = date); - $ZodStringFormat.init(inst, def); -}); -var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { - def.pattern ?? (def.pattern = time(def)); - $ZodStringFormat.init(inst, def); -}); -var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { - def.pattern ?? (def.pattern = duration); - $ZodStringFormat.init(inst, def); -}); -var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { - def.pattern ?? (def.pattern = ipv4); - $ZodStringFormat.init(inst, def); - inst._zod.bag.format = `ipv4`; -}); -var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { - def.pattern ?? (def.pattern = ipv6); - $ZodStringFormat.init(inst, def); - inst._zod.bag.format = `ipv6`; - inst._zod.check = (payload) => { - try { - new URL(`http://[${payload.value}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "ipv6", - input: payload.value, - inst, - continue: !def.abort - }); + const contentLength = utils_default.toFiniteNumber(headers.getContentLength()); + if (utils_default.isArray(maxRate)) { + maxUploadRate = maxRate[0]; + maxDownloadRate = maxRate[1]; + } else { + maxUploadRate = maxDownloadRate = maxRate; } - }; -}); -var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { - def.pattern ?? (def.pattern = mac(def.delimiter)); - $ZodStringFormat.init(inst, def); - inst._zod.bag.format = `mac`; -}); -var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { - def.pattern ?? (def.pattern = cidrv4); - $ZodStringFormat.init(inst, def); -}); -var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { - def.pattern ?? (def.pattern = cidrv6); - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - const parts = payload.value.split("/"); + if (data && (onUploadProgress || maxUploadRate)) { + if (!utils_default.isStream(data)) { + data = stream3.Readable.from(data, { objectMode: false }); + } + data = stream3.pipeline( + [ + data, + new AxiosTransformStream_default({ + maxRate: utils_default.toFiniteNumber(maxUploadRate) + }) + ], + utils_default.noop + ); + onUploadProgress && data.on( + "progress", + flushOnFinish( + data, + progressEventDecorator( + contentLength, + progressEventReducer(asyncDecorator(onUploadProgress), false, 3) + ) + ) + ); + } + let auth2 = void 0; + if (config3.auth) { + const username = config3.auth.username || ""; + const password = config3.auth.password || ""; + auth2 = username + ":" + password; + } + if (!auth2 && parsed.username) { + const urlUsername = parsed.username; + const urlPassword = parsed.password; + auth2 = urlUsername + ":" + urlPassword; + } + auth2 && headers.delete("authorization"); + let path; try { - if (parts.length !== 2) - throw new Error(); - const [address, prefix] = parts; - if (!prefix) - throw new Error(); - const prefixNum = Number(prefix); - if (`${prefixNum}` !== prefix) - throw new Error(); - if (prefixNum < 0 || prefixNum > 128) - throw new Error(); - new URL(`http://[${address}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "cidrv6", - input: payload.value, - inst, - continue: !def.abort - }); + path = buildURL( + parsed.pathname + parsed.search, + config3.params, + config3.paramsSerializer + ).replace(/^\?/, ""); + } catch (err) { + const customErr = new Error(err.message); + customErr.config = config3; + customErr.url = config3.url; + customErr.exists = true; + return reject(customErr); } - }; -}); -function isValidBase64(data) { - if (data === "") - return true; - if (data.length % 4 !== 0) - return false; - try { - atob(data); - return true; - } catch { - return false; - } -} -var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { - def.pattern ?? (def.pattern = base64); - $ZodStringFormat.init(inst, def); - inst._zod.bag.contentEncoding = "base64"; - inst._zod.check = (payload) => { - if (isValidBase64(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64", - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -function isValidBase64URL(data) { - if (!base64url.test(data)) - return false; - const base646 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); - const padded = base646.padEnd(Math.ceil(base646.length / 4) * 4, "="); - return isValidBase64(padded); -} -var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { - def.pattern ?? (def.pattern = base64url); - $ZodStringFormat.init(inst, def); - inst._zod.bag.contentEncoding = "base64url"; - inst._zod.check = (payload) => { - if (isValidBase64URL(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64url", - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { - def.pattern ?? (def.pattern = e164); - $ZodStringFormat.init(inst, def); -}); -function isValidJWT(token, algorithm = null) { - try { - const tokensParts = token.split("."); - if (tokensParts.length !== 3) - return false; - const [header] = tokensParts; - if (!header) - return false; - const parsedHeader = JSON.parse(atob(header)); - if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") - return false; - if (!parsedHeader.alg) - return false; - if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) - return false; - return true; - } catch { - return false; - } -} -var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - if (isValidJWT(payload.value, def.alg)) - return; - payload.issues.push({ - code: "invalid_format", - format: "jwt", - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { - $ZodStringFormat.init(inst, def); - inst._zod.check = (payload) => { - if (def.fn(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: def.format, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = inst._zod.bag.pattern ?? number; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Number(payload.value); - } catch (_) { + headers.set( + "Accept-Encoding", + "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), + false + ); + const options = { + path, + method, + headers: headers.toJSON(), + agents: { http: config3.httpAgent, https: config3.httpsAgent }, + auth: auth2, + protocol, + family, + beforeRedirect: dispatchBeforeRedirect, + beforeRedirects: {}, + http2Options + }; + !utils_default.isUndefined(lookup) && (options.lookup = lookup); + if (config3.socketPath) { + options.socketPath = config3.socketPath; + } else { + options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname; + options.port = parsed.port; + setProxy( + options, + config3.proxy, + protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path + ); + } + let transport; + const isHttpsRequest = isHttps.test(options.protocol); + options.agent = isHttpsRequest ? config3.httpsAgent : config3.httpAgent; + if (isHttp2) { + transport = http2Transport; + } else { + if (config3.transport) { + transport = config3.transport; + } else if (config3.maxRedirects === 0) { + transport = isHttpsRequest ? https : http; + } else { + if (config3.maxRedirects) { + options.maxRedirects = config3.maxRedirects; + } + if (config3.beforeRedirect) { + options.beforeRedirects.config = config3.beforeRedirect; + } + transport = isHttpsRequest ? httpsFollow : httpFollow; } - 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) ? "Infinity" : void 0 : void 0; - payload.issues.push({ - expected: "number", - code: "invalid_type", - input, - inst, - ...received ? { received } : {} - }); - return payload; - }; -}); -var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { - $ZodCheckNumberFormat.init(inst, def); - $ZodNumber.init(inst, def); -}); -var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = boolean; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Boolean(payload.value); - } catch (_) { + if (config3.maxBodyLength > -1) { + options.maxBodyLength = config3.maxBodyLength; + } else { + options.maxBodyLength = Infinity; + } + if (config3.insecureHTTPParser) { + options.insecureHTTPParser = config3.insecureHTTPParser; + } + req = transport.request(options, function handleResponse(res) { + if (req.destroyed) return; + const streams = [res]; + const responseLength = utils_default.toFiniteNumber(res.headers["content-length"]); + if (onDownloadProgress || maxDownloadRate) { + const transformStream = new AxiosTransformStream_default({ + maxRate: utils_default.toFiniteNumber(maxDownloadRate) + }); + onDownloadProgress && transformStream.on( + "progress", + flushOnFinish( + transformStream, + progressEventDecorator( + responseLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true, 3) + ) + ) + ); + streams.push(transformStream); } - const input = payload.value; - if (typeof input === "boolean") - return payload; - payload.issues.push({ - expected: "boolean", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = bigint; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = BigInt(payload.value); - } catch (_) { + let responseStream = res; + const lastRequest = res.req || req; + if (config3.decompress !== false && res.headers["content-encoding"]) { + if (method === "HEAD" || res.statusCode === 204) { + delete res.headers["content-encoding"]; + } + switch ((res.headers["content-encoding"] || "").toLowerCase()) { + /*eslint default-case:0*/ + case "gzip": + case "x-gzip": + case "compress": + case "x-compress": + streams.push(zlib.createUnzip(zlibOptions)); + delete res.headers["content-encoding"]; + break; + case "deflate": + streams.push(new ZlibHeaderTransformStream_default()); + streams.push(zlib.createUnzip(zlibOptions)); + delete res.headers["content-encoding"]; + break; + case "br": + if (isBrotliSupported) { + streams.push(zlib.createBrotliDecompress(brotliOptions)); + delete res.headers["content-encoding"]; + } + } } - if (typeof payload.value === "bigint") - return payload; - payload.issues.push({ - expected: "bigint", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; -}); -var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { - $ZodCheckBigIntFormat.init(inst, def); - $ZodBigInt.init(inst, def); -}); -var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "symbol") - return payload; - payload.issues.push({ - expected: "symbol", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = _undefined; - inst._zod.values = /* @__PURE__ */ new Set([void 0]); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "undefined", - code: "invalid_type", - input, - inst + responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0]; + const response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: new AxiosHeaders_default(res.headers), + config: config3, + request: lastRequest + }; + if (responseType === "stream") { + response.data = responseStream; + settle(resolve, reject, response); + } else { + const responseBuffer = []; + let totalResponseBytes = 0; + responseStream.on("data", function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + if (config3.maxContentLength > -1 && totalResponseBytes > config3.maxContentLength) { + rejected = true; + responseStream.destroy(); + abort( + new AxiosError_default( + "maxContentLength size of " + config3.maxContentLength + " exceeded", + AxiosError_default.ERR_BAD_RESPONSE, + config3, + lastRequest + ) + ); + } + }); + responseStream.on("aborted", function handlerStreamAborted() { + if (rejected) { + return; + } + const err = new AxiosError_default( + "stream has been aborted", + AxiosError_default.ERR_BAD_RESPONSE, + config3, + lastRequest + ); + responseStream.destroy(err); + reject(err); + }); + responseStream.on("error", function handleStreamError(err) { + if (req.destroyed) return; + reject(AxiosError_default.from(err, null, config3, lastRequest)); + }); + responseStream.on("end", function handleStreamEnd() { + try { + let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (responseType !== "arraybuffer") { + responseData = responseData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === "utf8") { + responseData = utils_default.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + return reject(AxiosError_default.from(err, null, config3, response.request, response)); + } + settle(resolve, reject, response); + }); + } + abortEmitter.once("abort", (err) => { + if (!responseStream.destroyed) { + responseStream.emit("error", err); + responseStream.destroy(); + } + }); }); - return payload; - }; -}); -var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.pattern = _null; - inst._zod.values = /* @__PURE__ */ new Set([null]); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input === null) - return payload; - payload.issues.push({ - expected: "null", - code: "invalid_type", - input, - inst + abortEmitter.once("abort", (err) => { + if (req.close) { + req.close(); + } else { + req.destroy(err); + } }); - return payload; - }; -}); -var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload) => payload; -}); -var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload) => payload; -}); -var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - payload.issues.push({ - expected: "never", - code: "invalid_type", - input: payload.value, - inst + req.on("error", function handleRequestError(err) { + reject(AxiosError_default.from(err, null, config3, req)); }); - return payload; - }; -}); -var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "void", - code: "invalid_type", - input, - inst + req.on("socket", function handleRequestSocket(socket) { + socket.setKeepAlive(true, 1e3 * 60); }); - return payload; - }; -}); -var $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) { + if (config3.timeout) { + const timeout = parseInt(config3.timeout, 10); + if (Number.isNaN(timeout)) { + abort( + new AxiosError_default( + "error trying to parse `config.timeout` to int", + AxiosError_default.ERR_BAD_OPTION_VALUE, + config3, + req + ) + ); + return; } + req.setTimeout(timeout, function handleRequestTimeout() { + if (isDone) return; + let timeoutErrorMessage = config3.timeout ? "timeout of " + config3.timeout + "ms exceeded" : "timeout exceeded"; + const transitional2 = config3.transitional || transitional_default; + if (config3.timeoutErrorMessage) { + timeoutErrorMessage = config3.timeoutErrorMessage; + } + abort( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config3, + req + ) + ); + }); + } else { + req.setTimeout(0); } - const input = payload.value; - const isDate3 = input instanceof Date; - const isValidDate = isDate3 && !Number.isNaN(input.getTime()); - if (isValidDate) - return payload; - payload.issues.push({ - expected: "date", - code: "invalid_type", - input, - ...isDate3 ? { received: "Invalid Date" } : {}, - inst - }); - return payload; - }; -}); -function handleArrayResult(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues(index, result.issues)); - } - final.value[index] = result.value; -} -var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - expected: "array", - code: "invalid_type", - input, - inst + if (utils_default.isStream(data)) { + let ended = false; + let errored = false; + data.on("end", () => { + ended = true; }); - return payload; + data.once("error", (err) => { + errored = true; + req.destroy(err); + }); + data.on("close", () => { + if (!ended && !errored) { + abort(new CanceledError_default("Request stream has been aborted", config3, req)); + } + }); + data.pipe(req); + } else { + data && req.write(data); + req.end(); } - payload.value = Array(input.length); - const proms = []; - 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((result2) => handleArrayResult(result2, payload, i))); - } else { - handleArrayResult(result, payload, i); + }); +}; + +// node_modules/axios/lib/helpers/isURLSameOrigin.js +var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url4) => { + url4 = new URL(url4, platform_default.origin); + return origin2.protocol === url4.protocol && origin2.host === url4.host && (isMSIE || origin2.port === url4.port); +})( + new URL(platform_default.origin), + platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent) +) : () => true; + +// node_modules/axios/lib/helpers/cookies.js +var cookies_default = platform_default.hasStandardBrowserEnv ? ( + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain3, secure, sameSite) { + if (typeof document === "undefined") return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils_default.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils_default.isString(domain3)) { + cookie.push(`domain=${domain3}`); } + if (secure === true) { + cookie.push("secure"); + } + if (utils_default.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + document.cookie = cookie.join("; "); + }, + read(name) { + if (typeof document === "undefined") return null; + const match2 = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)")); + return match2 ? decodeURIComponent(match2[1]) : null; + }, + remove(name) { + this.write(name, "", Date.now() - 864e5, "/"); } - if (proms.length) { - return Promise.all(proms).then(() => payload); + } +) : ( + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() { + }, + read() { + return null; + }, + remove() { } - return payload; - }; -}); -function handlePropertyResult(result, final, key, input, isOptionalOut) { - if (result.issues.length) { - if (isOptionalOut && !(key in input)) { - return; + } +); + +// node_modules/axios/lib/core/mergeConfig.js +var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing; +function mergeConfig(config1, config22) { + config22 = config22 || {}; + const config3 = {}; + function getMergedValue(target, source, prop, caseless) { + if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) { + return utils_default.merge.call({ caseless }, target, source); + } else if (utils_default.isPlainObject(source)) { + return utils_default.merge({}, source); + } else if (utils_default.isArray(source)) { + return source.slice(); } - final.issues.push(...prefixIssues(key, result.issues)); + return source; } - if (result.value === void 0) { - if (key in input) { - final.value[key] = void 0; + function mergeDeepProperties(a, b, prop, caseless) { + if (!utils_default.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils_default.isUndefined(a)) { + return getMergedValue(void 0, a, prop, caseless); } - } else { - final.value[key] = result.value; } -} -function normalizeDef(def) { - const keys = Object.keys(def.shape); - for (const k of keys) { - if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { - throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + function valueFromConfig2(a, b) { + if (!utils_default.isUndefined(b)) { + return getMergedValue(void 0, b); } } - const okeys = optionalKeys(def.shape); - return { - ...def, - keys, - keySet: new Set(keys), - numKeys: keys.length, - optionalKeys: new Set(okeys) - }; -} -function handleCatchall(proms, input, payload, ctx, def, inst) { - const unrecognized = []; - const keySet = def.keySet; - const _catchall = def.catchall._zod; - const t = _catchall.def.type; - const isOptionalOut = _catchall.optout === "optional"; - for (const key in input) { - if (keySet.has(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((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); - } else { - handlePropertyResult(r, payload, key, input, isOptionalOut); + function defaultToConfig2(a, b) { + if (!utils_default.isUndefined(b)) { + return getMergedValue(void 0, b); + } else if (!utils_default.isUndefined(a)) { + return getMergedValue(void 0, a); } } - if (unrecognized.length) { - payload.issues.push({ - code: "unrecognized_keys", - keys: unrecognized, - input, - inst - }); + function mergeDirectKeys(a, b, prop) { + if (prop in config22) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(void 0, a); + } } - if (!proms.length) - return payload; - return Promise.all(proms).then(() => { - return payload; + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true) + }; + utils_default.forEach(Object.keys({ ...config1, ...config22 }), function computeConfigValue(prop) { + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return; + const merge5 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const configValue = merge5(config1[prop], config22[prop], prop); + utils_default.isUndefined(configValue) && merge5 !== mergeDirectKeys || (config3[prop] = configValue); }); + return config3; } -var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { - $ZodType.init(inst, def); - const desc = Object.getOwnPropertyDescriptor(def, "shape"); - if (!desc?.get) { - const sh = def.shape; - Object.defineProperty(def, "shape", { - get: () => { - const newSh = { ...sh }; - Object.defineProperty(def, "shape", { - value: newSh - }); - return newSh; - } - }); + +// node_modules/axios/lib/helpers/resolveConfig.js +var resolveConfig_default = (config3) => { + const newConfig = mergeConfig({}, config3); + let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth: auth2 } = newConfig; + newConfig.headers = headers = AxiosHeaders_default.from(headers); + newConfig.url = buildURL( + buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), + config3.params, + config3.paramsSerializer + ); + if (auth2) { + headers.set( + "Authorization", + "Basic " + btoa( + (auth2.username || "") + ":" + (auth2.password ? unescape(encodeURIComponent(auth2.password)) : "") + ) + ); } - const _normalized = cached(() => normalizeDef(def)); - defineLazy(inst._zod, "propValues", () => { - const shape = def.shape; - const propValues = {}; - for (const key in shape) { - const field = shape[key]._zod; - if (field.values) { - propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); - for (const v of field.values) - propValues[key].add(v); - } - } - return propValues; - }); - const isObject5 = isObject2; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject5(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst + if (utils_default.isFormData(data)) { + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) { + headers.setContentType(void 0); + } else if (utils_default.isFunction(data.getHeaders)) { + const formHeaders = data.getHeaders(); + const allowedHeaders = ["content-type", "content-length"]; + Object.entries(formHeaders).forEach(([key, val]) => { + if (allowedHeaders.includes(key.toLowerCase())) { + headers.set(key, val); + } }); - return payload; } - payload.value = {}; - const proms = []; - const shape = value.shape; - for (const key of value.keys) { - const el = shape[key]; - const isOptionalOut = el._zod.optout === "optional"; - const r = el._zod.run({ value: input[key], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); - } else { - handlePropertyResult(r, payload, key, input, isOptionalOut); + } + if (platform_default.hasStandardBrowserEnv) { + withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig)); + if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); } } - if (!catchall) { - return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return newConfig; +}; + +// node_modules/axios/lib/adapters/xhr.js +var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; +var xhr_default = isXHRAdapterSupported && function(config3) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + const _config = resolveConfig_default(config3); + let requestData = _config.data; + const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload; + function done() { + flushUpload && flushUpload(); + flushDownload && flushDownload(); + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener("abort", onCanceled); } - return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); - }; -}); -var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { - $ZodObject.init(inst, def); - const superParse = inst._zod.parse; - const _normalized = cached(() => normalizeDef(def)); - const generateFastpass = (shape) => { - const doc = new Doc(["shape", "payload", "ctx"]); - const normalized = _normalized.value; - const parseStr = (key) => { - const k = esc(key); - return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; - }; - doc.write(`const input = payload.value;`); - const ids = /* @__PURE__ */ Object.create(null); - let counter = 0; - for (const key of normalized.keys) { - ids[key] = `key_${counter++}`; + let request2 = new XMLHttpRequest(); + request2.open(_config.method.toUpperCase(), _config.url, true); + request2.timeout = _config.timeout; + function onloadend() { + if (!request2) { + return; + } + const responseHeaders = AxiosHeaders_default.from( + "getAllResponseHeaders" in request2 && request2.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response; + const response = { + data: responseData, + status: request2.status, + statusText: request2.statusText, + headers: responseHeaders, + config: config3, + request: request2 + }; + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); + request2 = null; } - doc.write(`const newResult = {};`); - for (const key of normalized.keys) { - const id = ids[key]; - const k = esc(key); - const schema = shape[key]; - const isOptionalOut = schema?._zod?.optout === "optional"; - doc.write(`const ${id} = ${parseStr(key)};`); - if (isOptionalOut) { - doc.write(` - if (${id}.issues.length) { - if (${k} in input) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); - } - } - - if (${id}.value === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - newResult[${k}] = ${id}.value; - } - - `); - } else { - doc.write(` - if (${id}.issues.length) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); + if ("onloadend" in request2) { + request2.onloadend = onloadend; + } else { + request2.onreadystatechange = function handleLoad() { + if (!request2 || request2.readyState !== 4) { + return; } - - if (${id}.value === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - newResult[${k}] = ${id}.value; + if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) { + return; } - - `); - } + setTimeout(onloadend); + }; } - doc.write(`payload.value = newResult;`); - doc.write(`return payload;`); - const fn = doc.compile(); - return (payload, ctx) => fn(shape, payload, ctx); - }; - let fastpass; - const isObject5 = isObject2; - const jit = !globalConfig.jitless; - const allowsEval4 = allowsEval; - const fastEnabled = jit && allowsEval4.value; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject5(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst + request2.onabort = function handleAbort() { + if (!request2) { + return; + } + reject(new AxiosError_default("Request aborted", AxiosError_default.ECONNABORTED, config3, request2)); + request2 = null; + }; + request2.onerror = function handleError(event) { + const msg = event && event.message ? event.message : "Network Error"; + const err = new AxiosError_default(msg, AxiosError_default.ERR_NETWORK, config3, request2); + err.event = event || null; + reject(err); + request2 = null; + }; + request2.ontimeout = function handleTimeout() { + let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; + const transitional2 = _config.transitional || transitional_default; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError_default( + timeoutErrorMessage, + transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED, + config3, + request2 + ) + ); + request2 = null; + }; + requestData === void 0 && requestHeaders.setContentType(null); + if ("setRequestHeader" in request2) { + utils_default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request2.setRequestHeader(key, val); }); - return payload; - } - if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { - if (!fastpass) - fastpass = generateFastpass(def.shape); - payload = fastpass(payload, ctx); - if (!catchall) - return payload; - return handleCatchall([], input, payload, ctx, value, inst); } - return superParse(payload, ctx); - }; -}); -function handleUnionResults(results, final, inst, ctx) { - for (const result of results) { - if (result.issues.length === 0) { - final.value = result.value; - return final; + if (!utils_default.isUndefined(_config.withCredentials)) { + request2.withCredentials = !!_config.withCredentials; } - } - const nonaborted = results.filter((r) => !aborted(r)); - if (nonaborted.length === 1) { - final.value = nonaborted[0].value; - return nonaborted[0]; - } - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - }); - return final; -} -var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); - defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); - defineLazy(inst._zod, "values", () => { - if (def.options.every((o) => o._zod.values)) { - return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + if (responseType && responseType !== "json") { + request2.responseType = _config.responseType; } - return void 0; - }); - defineLazy(inst._zod, "pattern", () => { - if (def.options.every((o) => o._zod.pattern)) { - const patterns = def.options.map((o) => o._zod.pattern); - return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`); + if (onDownloadProgress) { + [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true); + request2.addEventListener("progress", downloadThrottled); } - return void 0; - }); - const single = def.options.length === 1; - const first = def.options[0]._zod.run; - inst._zod.parse = (payload, ctx) => { - if (single) { - return first(payload, ctx); + if (onUploadProgress && request2.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request2.upload.addEventListener("progress", uploadThrottled); + request2.upload.addEventListener("loadend", flushUpload); } - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - if (result.issues.length === 0) - return result; - results.push(result); + if (_config.cancelToken || _config.signal) { + onCanceled = (cancel) => { + if (!request2) { + return; + } + reject(!cancel || cancel.type ? new CanceledError_default(null, config3, request2) : cancel); + request2.abort(); + request2 = null; + }; + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); } } - if (!async) - return handleUnionResults(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleUnionResults(results2, payload, inst, ctx); - }); - }; -}); -function handleExclusiveUnionResults(results, final, inst, ctx) { - const successes = results.filter((r) => r.issues.length === 0); - if (successes.length === 1) { - final.value = successes[0].value; - return final; + const protocol = parseProtocol(_config.url); + if (protocol && platform_default.protocols.indexOf(protocol) === -1) { + reject( + new AxiosError_default( + "Unsupported protocol " + protocol + ":", + AxiosError_default.ERR_BAD_REQUEST, + config3 + ) + ); + return; + } + request2.send(requestData || null); + }); +}; + +// node_modules/axios/lib/helpers/composeSignals.js +var composeSignals = (signals, timeout) => { + const { length } = signals = signals ? signals.filter(Boolean) : []; + if (timeout || length) { + let controller = new AbortController(); + let aborted3; + const onabort = function(reason) { + if (!aborted3) { + aborted3 = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err) + ); + } + }; + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (signals) { + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal2) => { + signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort); + }); + signals = null; + } + }; + signals.forEach((signal2) => signal2.addEventListener("abort", onabort)); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; } - if (successes.length === 0) { - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) - }); - } else { - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: [], - inclusive: false - }); +}; +var composeSignals_default = composeSignals; + +// node_modules/axios/lib/helpers/trackStream.js +var streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (!chunkSize || len < chunkSize) { + yield chunk; + return; } - return final; -} -var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => { - $ZodUnion.init(inst, def); - def.inclusive = false; - const single = def.options.length === 1; - const first = def.options[0]._zod.run; - inst._zod.parse = (payload, ctx) => { - if (single) { - return first(payload, ctx); - } - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - results.push(result); + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; +var readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; +var readStream = async function* (stream4) { + if (stream4[Symbol.asyncIterator]) { + yield* stream4; + return; + } + const reader = stream4.getReader(); + try { + for (; ; ) { + const { done, value } = await reader.read(); + if (done) { + break; } + yield value; } - if (!async) - return handleExclusiveUnionResults(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleExclusiveUnionResults(results2, payload, inst, ctx); - }); - }; -}); -var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { - def.inclusive = false; - $ZodUnion.init(inst, def); - const _super = inst._zod.parse; - defineLazy(inst._zod, "propValues", () => { - const propValues = {}; - for (const option of def.options) { - const pv = option._zod.propValues; - if (!pv || Object.keys(pv).length === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); - for (const [k, v] of Object.entries(pv)) { - if (!propValues[k]) - propValues[k] = /* @__PURE__ */ new Set(); - for (const val of v) { - propValues[k].add(val); + } finally { + await reader.cancel(); + } +}; +var trackStream = (stream4, chunkSize, onProgress, onFinish) => { + const iterator3 = readBytes(stream4, chunkSize); + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + return new ReadableStream( + { + async pull(controller) { + try { + const { done: done2, value } = await iterator3.next(); + if (done2) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; } + }, + cancel(reason) { + _onFinish(reason); + return iterator3.return(); } + }, + { + highWaterMark: 2 } - return propValues; + ); +}; + +// node_modules/axios/lib/adapters/fetch.js +var DEFAULT_CHUNK_SIZE = 64 * 1024; +var { isFunction: isFunction2 } = utils_default; +var globalFetchAPI = (({ Request, Response }) => ({ + Request, + Response +}))(utils_default.global); +var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global; +var test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}; +var factory = (env) => { + env = utils_default.merge.call( + { + skipUndefined: true + }, + globalFetchAPI, + env + ); + const { fetch: envFetch, Request, Response } = env; + const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction2(Request); + const isResponseSupported = isFunction2(Response); + if (!isFetchSupported) { + return false; + } + const isReadableStreamSupported = isFetchSupported && isFunction2(ReadableStream2); + const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const hasContentType = new Request(platform_default.origin, { + body: new ReadableStream2(), + method: "POST", + get duplex() { + duplexAccessed = true; + return "half"; + } + }).headers.has("Content-Type"); + return duplexAccessed && !hasContentType; }); - const disc = cached(() => { - const opts = def.options; - const map4 = /* @__PURE__ */ new Map(); - for (const o of opts) { - const values = o._zod.propValues?.[def.discriminator]; - if (!values || values.size === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); - for (const v of values) { - if (map4.has(v)) { - throw new Error(`Duplicate discriminator value "${String(v)}"`); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body)); + const resolvers = { + stream: supportsResponseStream && ((res) => res.body) + }; + isFetchSupported && (() => { + ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config3) => { + let method = res && res[type]; + if (method) { + return method.call(res); } - map4.set(v, o); - } + throw new AxiosError_default( + `Response type '${type}' is not supported`, + AxiosError_default.ERR_NOT_SUPPORT, + config3 + ); + }); + }); + })(); + const getBodyLength = async (body) => { + if (body == null) { + return 0; } - return map4; - }); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isObject2(input)) { - payload.issues.push({ - code: "invalid_type", - expected: "object", - input, - inst + if (utils_default.isBlob(body)) { + return body.size; + } + if (utils_default.isSpecCompliantForm(body)) { + const _request = new Request(platform_default.origin, { + method: "POST", + body }); - return payload; + return (await _request.arrayBuffer()).byteLength; } - const opt = disc.value.get(input?.[def.discriminator]); - if (opt) { - return opt._zod.run(payload, ctx); + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) { + return body.byteLength; } - if (def.unionFallback) { - return _super(payload, ctx); + if (utils_default.isURLSearchParams(body)) { + body = body + ""; + } + if (utils_default.isString(body)) { + return (await encodeText(body)).byteLength; } - payload.issues.push({ - code: "invalid_union", - errors: [], - note: "No matching discriminator", - discriminator: def.discriminator, - input, - path: [def.discriminator], - inst - }); - return payload; }; -}); -var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - const left = def.left._zod.run({ value: input, issues: [] }, ctx); - const right = def.right._zod.run({ value: input, issues: [] }, ctx); - const async = left instanceof Promise || right instanceof Promise; - if (async) { - return Promise.all([left, right]).then(([left2, right2]) => { - return handleIntersectionResults(payload, left2, right2); + const resolveBodyLength = async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }; + return async (config3) => { + let { + url: url4, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = "same-origin", + fetchOptions + } = resolveConfig_default(config3); + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals_default( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + let request2 = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + try { + if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) { + let _request = new Request(url4, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush] = progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + ); + data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush); + } + } + if (!utils_default.isString(withCredentials)) { + withCredentials = withCredentials ? "include" : "omit"; + } + const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype; + const resolvedOptions = { + ...fetchOptions, + signal: composedSignal, + method: method.toUpperCase(), + headers: headers.normalize().toJSON(), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 + }; + request2 = isRequestSupported && new Request(url4, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request2, fetchOptions) : _fetch(url4, resolvedOptions)); + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) { + const options = {}; + ["status", "statusText", "headers"].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length")); + const [onProgress, flush] = onDownloadProgress && progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + ) || []; + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"]( + response, + config3 + ); + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders_default.from(response.headers), + status: response.status, + statusText: response.statusText, + config: config3, + request: request2 + }); }); + } catch (err) { + unsubscribe && unsubscribe(); + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + throw Object.assign( + new AxiosError_default( + "Network Error", + AxiosError_default.ERR_NETWORK, + config3, + request2, + err && err.response + ), + { + cause: err.cause || err + } + ); + } + throw AxiosError_default.from(err, err && err.code, config3, request2, err && err.response); } - return handleIntersectionResults(payload, left, right); }; -}); -function mergeValues(a, b) { - if (a === b) { - return { valid: true, data: a }; +}; +var seedCache = /* @__PURE__ */ new Map(); +var getFetch = (config3) => { + let env = config3 && config3.env || {}; + const { fetch: fetch3, Request, Response } = env; + const seeds = [Request, Response, fetch3]; + let len = seeds.length, i = len, seed, target, map3 = seedCache; + while (i--) { + seed = seeds[i]; + target = map3.get(seed); + target === void 0 && map3.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env)); + map3 = target; } - if (a instanceof Date && b instanceof Date && +a === +b) { - return { valid: true, data: a }; + return target; +}; +var adapter = getFetch(); + +// node_modules/axios/lib/adapters/adapters.js +var knownAdapters = { + http: http_default, + xhr: xhr_default, + fetch: { + get: getFetch } - if (isPlainObject2(a) && isPlainObject2(b)) { - const bKeys = Object.keys(b); - const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues(a[key], b[key]); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [key, ...sharedValue.mergeErrorPath] - }; - } - newObj[key] = sharedValue.data; +}; +utils_default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { value }); + } catch (e) { } - return { valid: true, data: newObj }; + Object.defineProperty(fn, "adapterName", { value }); } - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return { valid: false, mergeErrorPath: [] }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues(itemA, itemB); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [index, ...sharedValue.mergeErrorPath] - }; +}); +var renderReason = (reason) => `- ${reason}`; +var isResolvedHandle = (adapter2) => utils_default.isFunction(adapter2) || adapter2 === null || adapter2 === false; +function getAdapter(adapters, config3) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter2; + const rejectedReasons = {}; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + adapter2 = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter2 = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter2 === void 0) { + throw new AxiosError_default(`Unknown adapter '${id}'`); } - newArray.push(sharedValue.data); } - return { valid: true, data: newArray }; - } - return { valid: false, mergeErrorPath: [] }; -} -function handleIntersectionResults(result, left, right) { - const unrecKeys = /* @__PURE__ */ new Map(); - let unrecIssue; - for (const iss of left.issues) { - if (iss.code === "unrecognized_keys") { - unrecIssue ?? (unrecIssue = iss); - for (const k of iss.keys) { - if (!unrecKeys.has(k)) - unrecKeys.set(k, {}); - unrecKeys.get(k).l = true; - } - } else { - result.issues.push(iss); + if (adapter2 && (utils_default.isFunction(adapter2) || (adapter2 = adapter2.get(config3)))) { + break; } + rejectedReasons[id || "#" + i] = adapter2; } - for (const iss of right.issues) { - if (iss.code === "unrecognized_keys") { - for (const k of iss.keys) { - if (!unrecKeys.has(k)) - unrecKeys.set(k, {}); - unrecKeys.get(k).r = true; - } - } else { - result.issues.push(iss); - } + if (!adapter2) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build") + ); + let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"; + throw new AxiosError_default( + `There is no suitable adapter to dispatch the request ` + s, + "ERR_NOT_SUPPORT" + ); } - const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); - if (bothKeys.length && unrecIssue) { - result.issues.push({ ...unrecIssue, keys: bothKeys }); + return adapter2; +} +var adapters_default = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters +}; + +// node_modules/axios/lib/core/dispatchRequest.js +function throwIfCancellationRequested(config3) { + if (config3.cancelToken) { + config3.cancelToken.throwIfRequested(); } - if (aborted(result)) - return result; - const merged = mergeValues(left.value, right.value); - if (!merged.valid) { - throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + if (config3.signal && config3.signal.aborted) { + throw new CanceledError_default(null, config3); } - result.value = merged.data; - return result; } -var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { - $ZodType.init(inst, def); - const items = def.items; - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - input, - inst, - expected: "tuple", - code: "invalid_type" - }); - return payload; - } - payload.value = []; - const proms = []; - const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); - const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; - if (!def.rest) { - const tooBig = input.length > items.length; - const tooSmall = input.length < optStart - 1; - if (tooBig || tooSmall) { - payload.issues.push({ - ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, - input, - inst, - origin: "array" - }); - return payload; - } - } - let i = -1; - for (const item of items) { - i++; - if (i >= input.length) { - if (i >= optStart) - continue; - } - const result = item._zod.run({ - value: input[i], - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); - } else { - handleTupleResult(result, payload, i); - } - } - if (def.rest) { - const rest = input.slice(items.length); - for (const el of rest) { - i++; - const result = def.rest._zod.run({ - value: el, - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); - } else { - handleTupleResult(result, payload, i); +function dispatchRequest(config3) { + throwIfCancellationRequested(config3); + config3.headers = AxiosHeaders_default.from(config3.headers); + config3.data = transformData.call(config3, config3.transformRequest); + if (["post", "put", "patch"].indexOf(config3.method) !== -1) { + config3.headers.setContentType("application/x-www-form-urlencoded", false); + } + const adapter2 = adapters_default.getAdapter(config3.adapter || defaults_default.adapter, config3); + return adapter2(config3).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config3); + response.data = transformData.call(config3, config3.transformResponse, response); + response.headers = AxiosHeaders_default.from(response.headers); + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config3); + if (reason && reason.response) { + reason.response.data = transformData.call( + config3, + config3.transformResponse, + reason.response + ); + reason.response.headers = AxiosHeaders_default.from(reason.response.headers); } } + return Promise.reject(reason); } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; + ); +} + +// node_modules/axios/lib/helpers/validator.js +var validators = {}; +["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; }; }); -function handleTupleResult(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues(index, result.issues)); +var deprecatedWarnings = {}; +validators.transitional = function transitional(validator, version3, message2) { + function formatMessage(opt, desc) { + return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message2 ? ". " + message2 : ""); } - final.value[index] = result.value; -} -var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isPlainObject2(input)) { - payload.issues.push({ - expected: "record", - code: "invalid_type", - input, - inst - }); - return payload; + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError_default( + formatMessage(opt, " has been removed" + (version3 ? " in " + version3 : "")), + AxiosError_default.ERR_DEPRECATED + ); } - const proms = []; - const values = def.keyType._zod.values; - if (values) { - payload.value = {}; - const recordKeys = /* @__PURE__ */ new Set(); - for (const key of values) { - if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { - recordKeys.add(typeof key === "number" ? key.toString() : key); - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues(key, result2.issues)); - } - payload.value[key] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); - } - payload.value[key] = result.value; - } - } - } - let unrecognized; - for (const key in input) { - if (!recordKeys.has(key)) { - unrecognized = unrecognized ?? []; - unrecognized.push(key); - } - } - if (unrecognized && unrecognized.length > 0) { - payload.issues.push({ - code: "unrecognized_keys", - input, - inst, - keys: unrecognized - }); + if (version3 && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + console.warn( + formatMessage( + opt, + " has been deprecated since v" + version3 + " and will be removed in the near future" + ) + ); + } + return validator ? validator(value, opt, opts) : true; + }; +}; +validators.spelling = function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object") { + throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === void 0 || validator(value, opt, options); + if (result !== true) { + throw new AxiosError_default( + "option " + opt + " must be " + result, + AxiosError_default.ERR_BAD_OPTION_VALUE + ); } - } else { - payload.value = {}; - for (const key of Reflect.ownKeys(input)) { - if (key === "__proto__") - continue; - let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - if (keyResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length; - if (checkNumericKey) { - const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); - if (retryResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - if (retryResult.issues.length === 0) { - keyResult = retryResult; - } - } - if (keyResult.issues.length) { - if (def.mode === "loose") { - payload.value[key] = input[key]; - } else { - payload.issues.push({ - code: "invalid_key", - origin: "record", - issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())), - input: key, - path: [key], - inst - }); - } - continue; - } - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues(key, result2.issues)); - } - payload.value[keyResult.value] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues(key, result.issues)); + continue; + } + if (allowUnknown !== true) { + throw new AxiosError_default("Unknown option " + opt, AxiosError_default.ERR_BAD_OPTION); + } + } +} +var validator_default = { + assertOptions, + validators +}; + +// node_modules/axios/lib/core/Axios.js +var validators2 = validator_default.validators; +var Axios = class { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager_default(), + response: new InterceptorManager_default() + }; + } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config3) { + try { + return await this._request(configOrUrl, config3); + } catch (err) { + if (err instanceof Error) { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : ""; + try { + if (!err.stack) { + err.stack = stack; + } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) { + err.stack += "\n" + stack; } - payload.value[keyResult.value] = result.value; + } catch (e) { } } + throw err; } - if (proms.length) { - return Promise.all(proms).then(() => payload); + } + _request(configOrUrl, config3) { + if (typeof configOrUrl === "string") { + config3 = config3 || {}; + config3.url = configOrUrl; + } else { + config3 = configOrUrl || {}; } - return payload; - }; -}); -var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Map)) { - payload.issues.push({ - expected: "map", - code: "invalid_type", - input, - inst - }); - return payload; + config3 = mergeConfig(this.defaults, config3); + const { transitional: transitional2, paramsSerializer, headers } = config3; + if (transitional2 !== void 0) { + validator_default.assertOptions( + transitional2, + { + silentJSONParsing: validators2.transitional(validators2.boolean), + forcedJSONParsing: validators2.transitional(validators2.boolean), + clarifyTimeoutError: validators2.transitional(validators2.boolean), + legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean) + }, + false + ); } - const proms = []; - payload.value = /* @__PURE__ */ new Map(); - for (const [key, value] of input) { - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); - if (keyResult instanceof Promise || valueResult instanceof Promise) { - proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { - handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); - })); + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) { + config3.paramsSerializer = { + serialize: paramsSerializer + }; } else { - handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + validator_default.assertOptions( + paramsSerializer, + { + encode: validators2.function, + serialize: validators2.function + }, + true + ); } } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { - if (keyResult.issues.length) { - if (propertyKeyTypes.has(typeof key)) { - final.issues.push(...prefixIssues(key, keyResult.issues)); + if (config3.allowAbsoluteUrls !== void 0) { + } else if (this.defaults.allowAbsoluteUrls !== void 0) { + config3.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; } else { - final.issues.push({ - code: "invalid_key", - origin: "map", - input, - inst, - issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }); + config3.allowAbsoluteUrls = true; } - } - if (valueResult.issues.length) { - if (propertyKeyTypes.has(typeof key)) { - final.issues.push(...prefixIssues(key, valueResult.issues)); - } else { - final.issues.push({ - origin: "map", - code: "invalid_element", - input, - inst, - key, - issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }); + validator_default.assertOptions( + config3, + { + baseUrl: validators2.spelling("baseURL"), + withXsrfToken: validators2.spelling("withXSRFToken") + }, + true + ); + config3.method = (config3.method || this.defaults.method || "get").toLowerCase(); + let contextHeaders = headers && utils_default.merge(headers.common, headers[config3.method]); + headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => { + delete headers[method]; + }); + config3.headers = AxiosHeaders_default.concat(contextHeaders, headers); + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config3) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional3 = config3.transitional || transitional_default; + const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }); + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + let promise3; + let i = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), void 0]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise3 = Promise.resolve(config3); + while (i < len) { + promise3 = promise3.then(chain[i++], chain[i++]); + } + return promise3; } - } - final.value.set(keyResult.value, valueResult.value); -} -var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Set)) { - payload.issues.push({ - input, - inst, - expected: "set", - code: "invalid_type" - }); - return payload; + len = requestInterceptorChain.length; + let newConfig = config3; + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error99) { + onRejected.call(this, error99); + break; + } } - const proms = []; - payload.value = /* @__PURE__ */ new Set(); - for (const item of input) { - const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleSetResult(result2, payload))); - } else - handleSetResult(result, payload); + try { + promise3 = dispatchRequest.call(this, newConfig); + } catch (error99) { + return Promise.reject(error99); } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleSetResult(result, final) { - if (result.issues.length) { - final.issues.push(...result.issues); - } - final.value.add(result.value); -} -var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { - $ZodType.init(inst, def); - const values = getEnumValues(def.entries); - const valuesSet = new Set(values); - inst._zod.values = valuesSet; - inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (valuesSet.has(input)) { - return payload; + i = 0; + len = responseInterceptorChain.length; + while (i < len) { + promise3 = promise3.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); } - payload.issues.push({ - code: "invalid_value", - values, - input, - inst - }); - return payload; + return promise3; + } + getUri(config3) { + config3 = mergeConfig(this.defaults, config3); + const fullPath = buildFullPath(config3.baseURL, config3.url, config3.allowAbsoluteUrls); + return buildURL(fullPath, config3.params, config3.paramsSerializer); + } +}; +utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) { + Axios.prototype[method] = function(url4, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + url: url4, + data: (config3 || {}).data + }) + ); }; }); -var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { - $ZodType.init(inst, def); - if (def.values.length === 0) { - throw new Error("Cannot create literal schema with no valid values"); +utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return function httpMethod(url4, data, config3) { + return this.request( + mergeConfig(config3 || {}, { + method, + headers: isForm ? { + "Content-Type": "multipart/form-data" + } : {}, + url: url4, + data + }) + ); + }; } - const values = new Set(def.values); - inst._zod.values = values; - inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (values.has(input)) { - return payload; + Axios.prototype[method] = generateHTTPMethod(); + Axios.prototype[method + "Form"] = generateHTTPMethod(true); +}); +var Axios_default = Axios; + +// node_modules/axios/lib/cancel/CancelToken.js +var CancelToken = class _CancelToken { + constructor(executor) { + if (typeof executor !== "function") { + throw new TypeError("executor must be a function."); } - payload.issues.push({ - code: "invalid_value", - values: def.values, - input, - inst + let resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; }); - return payload; - }; -}); -var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input instanceof File) - return payload; - payload.issues.push({ - expected: "file", - code: "invalid_type", - input, - inst + const token = this; + this.promise.then((cancel) => { + if (!token._listeners) return; + let i = token._listeners.length; + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; }); - return payload; - }; -}); -var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - throw new $ZodEncodeError(inst.constructor.name); + this.promise.then = (onfulfilled) => { + let _resolve; + const promise3 = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise3.cancel = function reject() { + token.unsubscribe(_resolve); + }; + return promise3; + }; + executor(function cancel(message2, config3, request2) { + if (token.reason) { + return; + } + token.reason = new CanceledError_default(message2, config3, request2); + resolvePromise(token.reason); + }); + } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; } - const _out = def.transform(payload.value, payload); - if (ctx.async) { - const output = _out instanceof Promise ? _out : Promise.resolve(_out); - return output.then((output2) => { - payload.value = output2; - return payload; - }); + } + /** + * Subscribe to the cancel signal + */ + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; } - if (_out instanceof Promise) { - throw new $ZodAsyncError(); + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; } - payload.value = _out; - return payload; - }; -}); -function handleOptionalResult(result, input) { - if (result.issues.length && input === void 0) { - return { issues: [], value: void 0 }; } - return result; -} -var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - defineLazy(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; - }); - defineLazy(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - if (def.innerType._zod.optin === "optional") { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) - return result.then((r) => handleOptionalResult(r, payload.value)); - return handleOptionalResult(result, payload.value); + /** + * Unsubscribe from the cancel signal + */ + unsubscribe(listener) { + if (!this._listeners) { + return; } - if (payload.value === void 0) { - return payload; + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); } - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => { - $ZodOptional.init(inst, def); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern); - inst._zod.parse = (payload, ctx) => { - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; - }); - defineLazy(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...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); - }; -}); -var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - payload.value = def.defaultValue; - return payload; - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleDefaultResult(result2, def)); - } - return handleDefaultResult(result, def); - }; -}); -function handleDefaultResult(payload, def) { - if (payload.value === void 0) { - payload.value = def.defaultValue; } - return payload; -} -var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.optin = "optional"; - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => { - const v = def.innerType._zod.values; - return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleNonOptionalResult(result2, inst)); - } - return handleNonOptionalResult(result, inst); - }; -}); -function handleNonOptionalResult(payload, inst) { - if (!payload.issues.length && payload.value === void 0) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: payload.value, - inst + toAbortSignal() { + const controller = new AbortController(); + const abort = (err) => { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = () => this.unsubscribe(abort); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new _CancelToken(function executor(c) { + cancel = c; }); + return { + token, + cancel + }; } - return payload; -} -var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - throw new $ZodEncodeError("ZodSuccess"); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.issues.length === 0; - return payload; - }); - } - payload.value = result.issues.length === 0; - return payload; - }; -}); -var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.value; - if (result2.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }, - input: payload.value - }); - payload.issues = []; - } - return payload; - }); - } - payload.value = result.value; - if (result.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) - }, - input: payload.value - }); - payload.issues = []; - } - return payload; - }; -}); -var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - expected: "nan", - code: "invalid_type" - }); - return payload; - } - return payload; +}; +var CancelToken_default = CancelToken; + +// node_modules/axios/lib/helpers/spread.js +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); }; +} + +// node_modules/axios/lib/helpers/isAxiosError.js +function isAxiosError(payload) { + return utils_default.isObject(payload) && payload.isAxiosError === true; +} + +// node_modules/axios/lib/helpers/HttpStatusCode.js +var HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 +}; +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; }); -var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => def.in._zod.values); - defineLazy(inst._zod, "optin", () => def.in._zod.optin); - defineLazy(inst._zod, "optout", () => def.out._zod.optout); - defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - const right = def.out._zod.run(payload, ctx); - if (right instanceof Promise) { - return right.then((right2) => handlePipeResult(right2, def.in, ctx)); - } - return handlePipeResult(right, def.in, ctx); - } - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handlePipeResult(left2, def.out, ctx)); - } - return handlePipeResult(left, def.out, ctx); +var HttpStatusCode_default = HttpStatusCode; + +// node_modules/axios/lib/axios.js +function createInstance(defaultConfig) { + const context3 = new Axios_default(defaultConfig); + const instance = bind(Axios_default.prototype.request, context3); + utils_default.extend(instance, Axios_default.prototype, context3, { allOwnKeys: true }); + utils_default.extend(instance, context3, null, { allOwnKeys: true }); + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); }; -}); -function handlePipeResult(left, next, ctx) { - if (left.issues.length) { - left.aborted = true; - return left; - } - return next._zod.run({ value: left.value, issues: left.issues }, ctx); + return instance; } -var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "values", () => def.in._zod.values); - defineLazy(inst._zod, "optin", () => def.in._zod.optin); - defineLazy(inst._zod, "optout", () => def.out._zod.optout); - defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); - inst._zod.parse = (payload, ctx) => { - const direction = ctx.direction || "forward"; - if (direction === "forward") { - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handleCodecAResult(left2, def, ctx)); - } - return handleCodecAResult(left, def, ctx); +var axios = createInstance(defaults_default); +axios.Axios = Axios_default; +axios.CanceledError = CanceledError_default; +axios.CancelToken = CancelToken_default; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData_default; +axios.AxiosError = AxiosError_default; +axios.Cancel = axios.CanceledError; +axios.all = function all(promises3) { + return Promise.all(promises3); +}; +axios.spread = spread; +axios.isAxiosError = isAxiosError; +axios.mergeConfig = mergeConfig; +axios.AxiosHeaders = AxiosHeaders_default; +axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); +axios.getAdapter = adapters_default.getAdapter; +axios.HttpStatusCode = HttpStatusCode_default; +axios.default = axios; +var axios_default = axios; + +// node_modules/axios/index.js +var { + Axios: Axios2, + AxiosError: AxiosError2, + CanceledError: CanceledError2, + isCancel: isCancel2, + CancelToken: CancelToken2, + VERSION: VERSION2, + all: all2, + Cancel, + isAxiosError: isAxiosError2, + spread: spread2, + toFormData: toFormData2, + AxiosHeaders: AxiosHeaders2, + HttpStatusCode: HttpStatusCode2, + formToJSON, + getAdapter: getAdapter2, + mergeConfig: mergeConfig2 +} = axios_default; + +// node_modules/testing-farm/dist/link.js +import { URL as URL2 } from "url"; +async function performRequest(config3) { + var _a4, _b; + try { + let response = await axios_default.request(Object.assign(Object.assign({}, config3), { headers: Object.assign({ Accept: "application/json" }, (_a4 = config3.headers) !== null && _a4 !== void 0 ? _a4 : {}) })); + return response.data; + } catch (e) { + if (axios_default.isAxiosError(e)) { + throw new Error(JSON.stringify((_b = e.response) === null || _b === void 0 ? void 0 : _b.data)); } else { - const right = def.out._zod.run(payload, ctx); - if (right instanceof Promise) { - return right.then((right2) => handleCodecAResult(right2, def, ctx)); - } - return handleCodecAResult(right, def, ctx); - } - }; -}); -function handleCodecAResult(result, def, ctx) { - if (result.issues.length) { - result.aborted = true; - return result; - } - const direction = ctx.direction || "forward"; - if (direction === "forward") { - const transformed = def.transform(result.value, result); - if (transformed instanceof Promise) { - return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); - } - return handleCodecTxResult(result, transformed, def.out, ctx); - } else { - const transformed = def.reverseTransform(result.value, result); - if (transformed instanceof Promise) { - return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + throw e; } - return handleCodecTxResult(result, transformed, def.in, ctx); } } -function handleCodecTxResult(left, value, nextSchema, ctx) { - if (left.issues.length) { - left.aborted = true; - return left; +var TestingFarmLink = class { + constructor(instance) { + this.instance = instance; } - return nextSchema._zod.run({ value, issues: left.issues }, ctx); -} -var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); - defineLazy(inst._zod, "values", () => def.innerType._zod.values); - defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); - defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then(handleReadonlyResult); - } - return handleReadonlyResult(result); - }; -}); -function handleReadonlyResult(payload) { - payload.value = Object.freeze(payload.value); - return payload; -} -var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { - $ZodType.init(inst, def); - const regexParts = []; - for (const part of def.parts) { - if (typeof part === "object" && part !== null) { - if (!part._zod.pattern) { - throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); - } - const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; - if (!source) - throw new Error(`Invalid template literal part: ${part._zod.traits}`); - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - regexParts.push(source.slice(start, end)); - } else if (part === null || primitiveTypes.has(typeof part)) { - regexParts.push(escapeRegex(`${part}`)); - } else { - throw new Error(`Invalid template literal part: ${part}`); + buildURL(path, searchParams) { + let url4 = new URL2(`${this.instance.pathname}/${path}`, this.instance); + if (searchParams) { + url4.search = new URLSearchParams(searchParams).toString(); } + return url4; } - inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "string") { - payload.issues.push({ - input: payload.value, - inst, - expected: "string", - code: "invalid_type" - }); - return payload; - } - inst._zod.pattern.lastIndex = 0; - if (!inst._zod.pattern.test(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - code: "invalid_format", - format: def.format ?? "template_literal", - pattern: inst._zod.pattern.source - }); - return payload; - } - return payload; - }; -}); -var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { - $ZodType.init(inst, def); - inst._def = def; - inst._zod.def = def; - inst.implement = (func) => { - if (typeof func !== "function") { - throw new Error("implement() must be called with a function"); - } - return function(...args) { - const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; - const result = Reflect.apply(func, this, parsedArgs); - if (inst._def.output) { - return parse(inst._def.output, result); + async get(path, searchParams) { + const url4 = searchParams ? this.buildURL(path, searchParams) : this.buildURL(path); + const config3 = { + url: url4.toString(), + method: "GET" + }; + return this.request(config3); + } + async post(path, data) { + const config3 = { + url: this.buildURL(path).toString(), + method: "POST", + data, + headers: { + "Content-Type": "application/json" } - return result; }; - }; - inst.implementAsync = (func) => { - if (typeof func !== "function") { - throw new Error("implementAsync() must be called with a function"); - } - return async function(...args) { - const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; - const result = await Reflect.apply(func, this, parsedArgs); - if (inst._def.output) { - return await parseAsync(inst._def.output, result); + return this.request(config3); + } + async delete(path, data) { + const config3 = { + url: this.buildURL(path).toString(), + method: "DELETE", + data, + headers: { + "Content-Type": "application/json" } - return result; }; - }; - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "function") { - payload.issues.push({ - code: "invalid_type", - expected: "function", - input: payload.value, - inst - }); - return payload; - } - const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; - if (hasPromiseOutput) { - payload.value = inst.implementAsync(payload.value); - } else { - payload.value = inst.implement(payload.value); - } - return payload; - }; - inst.input = (...args) => { - const F = inst.constructor; - if (Array.isArray(args[0])) { - return new F({ - type: "function", - input: new $ZodTuple({ - type: "tuple", - items: args[0], - rest: args[1] - }), - output: inst._def.output - }); - } - return new F({ - type: "function", - input: args[0], - output: inst._def.output - }); - }; - inst.output = (output) => { - const F = inst.constructor; - return new F({ - type: "function", - input: inst._def.input, - output - }); - }; - return inst; -}); -var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { - $ZodType.init(inst, def); - inst._zod.parse = (payload, ctx) => { - return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); - }; -}); -var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { - $ZodType.init(inst, def); - defineLazy(inst._zod, "innerType", () => def.getter()); - defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); - defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); - defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); - defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); - inst._zod.parse = (payload, ctx) => { - const inner = inst._zod.innerType; - return inner._zod.run(payload, ctx); - }; -}); -var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { - $ZodCheck.init(inst, def); - $ZodType.init(inst, def); - inst._zod.parse = (payload, _) => { - return payload; - }; - inst._zod.check = (payload) => { - const input = payload.value; - const r = def.fn(input); - if (r instanceof Promise) { - return r.then((r2) => handleRefineResult(r2, payload, input, inst)); - } - handleRefineResult(r, payload, input, inst); - return; - }; -}); -function handleRefineResult(result, payload, input, inst) { - if (!result) { - const _iss = { - code: "custom", - input, - inst, - // incorporates params.error into issue reporting - path: [...inst._zod.def.path ?? []], - // incorporates params.error into issue reporting - continue: !inst._zod.def.abort - // params: inst._zod.def.params, - }; - if (inst._zod.def.params) - _iss.params = inst._zod.def.params; - payload.issues.push(issue2(_iss)); - } -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/index.js -var locales_exports = {}; -__export(locales_exports, { - ar: () => ar_default, - az: () => az_default, - be: () => be_default, - bg: () => bg_default, - ca: () => ca_default, - cs: () => cs_default, - da: () => da_default, - de: () => de_default, - en: () => en_default, - eo: () => eo_default, - es: () => es_default, - fa: () => fa_default, - fi: () => fi_default, - fr: () => fr_default, - frCA: () => fr_CA_default, - he: () => he_default, - hu: () => hu_default, - hy: () => hy_default, - id: () => id_default, - is: () => is_default, - it: () => it_default, - ja: () => ja_default, - ka: () => ka_default, - kh: () => kh_default, - km: () => km_default, - ko: () => ko_default, - lt: () => lt_default, - mk: () => mk_default, - ms: () => ms_default, - nl: () => nl_default, - no: () => no_default, - ota: () => ota_default, - pl: () => pl_default, - ps: () => ps_default, - pt: () => pt_default, - ru: () => ru_default, - sl: () => sl_default, - sv: () => sv_default, - ta: () => ta_default, - th: () => th_default, - tr: () => tr_default, - ua: () => ua_default, - uk: () => uk_default, - ur: () => ur_default, - uz: () => uz_default, - vi: () => vi_default, - yo: () => yo_default, - zhCN: () => zh_CN_default, - zhTW: () => zh_TW_default -}); - -// node_modules/testing-farm/node_modules/zod/v4/locales/ar.js -var error2 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + return this.request(config3); } - const FormatDictionary = { - regex: "\u0645\u062F\u062E\u0644", - email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", - url: "\u0631\u0627\u0628\u0637", - emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", - ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", - cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", - cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", - base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", - base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", - json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", - e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", - jwt: "JWT", - template_literal: "\u0645\u062F\u062E\u0644" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue5.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; - } - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue5.values[0])}`; - return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue5.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; - return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue5.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue5.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue5.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue5.prefix}"`; - if (_issue.format === "ends_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; - } - case "not_multiple_of": - return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue5.divisor}`; - case "unrecognized_keys": - return `\u0645\u0639\u0631\u0641${issue5.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue5.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue5.keys, "\u060C ")}`; - case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue5.origin}`; - case "invalid_union": - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; - case "invalid_element": - return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue5.origin}`; - default: - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; - } - }; }; -function ar_default() { - return { - localeError: error2() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/az.js -var error3 = () => { - const Sizable = { - string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "element", verb: "olmal\u0131d\u0131r" }, - set: { unit: "element", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var PublicLink = class extends TestingFarmLink { + async request(config3) { + return performRequest(config3); } - const FormatDictionary = { - regex: "input", - email: "email address", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datetime", - date: "ISO date", - time: "ISO time", - duration: "ISO duration", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded string", - base64url: "base64url-encoded string", - json_string: "JSON string", - e164: "E.164 number", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue5.expected}, daxil olan ${received}`; - } - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue5.values[0])}`; - return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue5.origin ?? "d\u0259y\u0259r"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "element"}`; - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue5.origin ?? "d\u0259y\u0259r"} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue5.origin} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; - if (_issue.format === "ends_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; - if (_issue.format === "includes") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; - if (_issue.format === "regex") - return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; - return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue5.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; - case "unrecognized_keys": - return `Tan\u0131nmayan a\xE7ar${issue5.keys.length > 1 ? "lar" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; - case "invalid_union": - return "Yanl\u0131\u015F d\u0259y\u0259r"; - case "invalid_element": - return `${issue5.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; - default: - return `Yanl\u0131\u015F d\u0259y\u0259r`; - } - }; }; -function az_default() { - return { - localeError: error3() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/be.js -function getBelarusianPlural(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; - } - if (lastDigit === 1) { - return one; - } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; +var ApiKeyLink = class extends TestingFarmLink { + constructor(instance, apiKey) { + super(instance); + this.apiKey = apiKey; } - return many; -} -var error4 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0456\u043C\u0432\u0430\u043B", - few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", - many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u044B", - many: "\u0431\u0430\u0439\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + async request(config3) { + var _a4; + return performRequest(Object.assign(Object.assign({}, config3), { headers: Object.assign(Object.assign({}, (_a4 = config3.headers) !== null && _a4 !== void 0 ? _a4 : {}), { + // https://api.dev.testing-farm.io/docs#/default/request_a_new_test_v0_1_requests_post + // OAuth2: OAuth2PasswordBearer + // The API key for authentication. + // Flow type: password + // Token URL: token + Authorization: `Bearer ${this.apiKey}` + }) })); } - const FormatDictionary = { - regex: "\u0443\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0430\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0447\u0430\u0441", - duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", - cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", - base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", - json_string: "JSON \u0440\u0430\u0434\u043E\u043A", - e164: "\u043D\u0443\u043C\u0430\u0440 E.164", - jwt: "JWT", - template_literal: "\u0443\u0432\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u043B\u0456\u043A", - array: "\u043C\u0430\u0441\u0456\u045E" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue5.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; - } - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue5.values[0])}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const maxValue = Number(issue5.maximum); - const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue5.maximum.toString()} ${unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const minValue = Number(issue5.minimum); - const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue5.minimum.toString()} ${unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue5.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; - case "invalid_element": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue5.origin}`; - default: - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; - } - }; }; -function be_default() { - return { - localeError: error4() - }; -} -// node_modules/testing-farm/node_modules/zod/v4/locales/bg.js -var error5 = () => { - const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0445\u043E\u0434", - email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", - base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", - json_string: "JSON \u043D\u0438\u0437", - e164: "E.164 \u043D\u043E\u043C\u0435\u0440", - jwt: "JWT", - template_literal: "\u0432\u0445\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0438\u0432" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue5.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; - } - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue5.values[0])}`; - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; - let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; - if (_issue.format === "emoji") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "datetime") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "date") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; - if (_issue.format === "time") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "duration") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; - return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue5.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue5.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; - case "invalid_element": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue5.origin}`; - default: - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; - } - }; -}; -function bg_default() { - return { - localeError: error5() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ca.js -var error6 = () => { - const Sizable = { - string: { unit: "car\xE0cters", verb: "contenir" }, - file: { unit: "bytes", verb: "contenir" }, - array: { unit: "elements", verb: "contenir" }, - set: { unit: "elements", verb: "contenir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "entrada", - email: "adre\xE7a electr\xF2nica", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "durada ISO", - ipv4: "adre\xE7a IPv4", - ipv6: "adre\xE7a IPv6", - cidrv4: "rang IPv4", - cidrv6: "rang IPv6", - base64: "cadena codificada en base64", - base64url: "cadena codificada en base64url", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Tipus inv\xE0lid: s'esperava instanceof ${issue5.expected}, s'ha rebut ${received}`; - } - return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue5.values[0])}`; - return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue5.values, " o ")}`; - case "too_big": { - const adj = issue5.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Massa gran: s'esperava que ${issue5.origin ?? "el valor"} contingu\xE9s ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Massa gran: s'esperava que ${issue5.origin ?? "el valor"} fos ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Massa petit: s'esperava que ${issue5.origin} contingu\xE9s ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Massa petit: s'esperava que ${issue5.origin} fos ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; - return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue5.divisor}`; - case "unrecognized_keys": - return `Clau${issue5.keys.length > 1 ? "s" : ""} no reconeguda${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Clau inv\xE0lida a ${issue5.origin}`; - case "invalid_union": - return "Entrada inv\xE0lida"; - // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general - case "invalid_element": - return `Element inv\xE0lid a ${issue5.origin}`; - default: - return `Entrada inv\xE0lida`; - } - }; -}; -function ca_default() { - return { - localeError: error6() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/cs.js -var error7 = () => { - const Sizable = { - string: { unit: "znak\u016F", verb: "m\xEDt" }, - file: { unit: "bajt\u016F", verb: "m\xEDt" }, - array: { unit: "prvk\u016F", verb: "m\xEDt" }, - set: { unit: "prvk\u016F", verb: "m\xEDt" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "regul\xE1rn\xED v\xFDraz", - email: "e-mailov\xE1 adresa", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "datum a \u010Das ve form\xE1tu ISO", - date: "datum ve form\xE1tu ISO", - time: "\u010Das ve form\xE1tu ISO", - duration: "doba trv\xE1n\xED ISO", - ipv4: "IPv4 adresa", - ipv6: "IPv6 adresa", - cidrv4: "rozsah IPv4", - cidrv6: "rozsah IPv6", - base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", - base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", - json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", - e164: "\u010D\xEDslo E.164", - jwt: "JWT", - template_literal: "vstup" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u010D\xEDslo", - string: "\u0159et\u011Bzec", - function: "funkce", - array: "pole" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue5.expected}, obdr\u017Eeno ${received}`; - } - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue5.values[0])}`; - return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue5.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; - } - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue5.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue5.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue5.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; - } - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue5.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; - return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue5.divisor}`; - case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue5.origin}`; - case "invalid_union": - return "Neplatn\xFD vstup"; - case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue5.origin}`; - default: - return `Neplatn\xFD vstup`; - } - }; -}; -function cs_default() { - return { - localeError: error7() - }; -} +// node_modules/testing-farm/node_modules/zod/v4/classic/external.js +var external_exports = {}; +__export(external_exports, { + $brand: () => $brand, + $input: () => $input, + $output: () => $output, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodError: () => ZodError, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + ZodIntersection: () => ZodIntersection, + ZodIssueCode: () => ZodIssueCode, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRealError: () => ZodRealError, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint2, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + clone: () => clone, + codec: () => codec, + coerce: () => coerce_exports, + config: () => config, + core: () => core_exports2, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date3, + decode: () => decode2, + decodeAsync: () => decodeAsync2, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + encode: () => encode4, + encodeAsync: () => encodeAsync2, + endsWith: () => _endsWith, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + flattenError: () => flattenError, + float32: () => float32, + float64: () => float64, + formatError: () => formatError, + fromJSONSchema: () => fromJSONSchema, + function: () => _function, + getErrorMap: () => getErrorMap, + globalRegistry: () => globalRegistry, + gt: () => _gt, + gte: () => _gte, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + includes: () => _includes, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + iso: () => iso_exports, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy, + length: () => _length, + literal: () => literal, + locales: () => locales_exports, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + mac: () => mac2, + map: () => map, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + meta: () => meta2, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + negative: () => _negative, + never: () => never, + nonnegative: () => _nonnegative, + nonoptional: () => nonoptional, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + overwrite: () => _overwrite, + parse: () => parse2, + parseAsync: () => parseAsync2, + partialRecord: () => partialRecord, + pipe: () => pipe, + positive: () => _positive, + prefault: () => prefault, + preprocess: () => preprocess, + prettifyError: () => prettifyError, + promise: () => promise, + property: () => _property, + readonly: () => readonly, + record: () => record, + refine: () => refine, + regex: () => _regex, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode2, + safeDecodeAsync: () => safeDecodeAsync2, + safeEncode: () => safeEncode2, + safeEncodeAsync: () => safeEncodeAsync2, + safeParse: () => safeParse2, + safeParseAsync: () => safeParseAsync2, + set: () => set, + setErrorMap: () => setErrorMap, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + toJSONSchema: () => toJSONSchema, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + transform: () => transform, + treeifyError: () => treeifyError, + trim: () => _trim, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union, + unknown: () => unknown, + uppercase: () => _uppercase, + url: () => url2, + util: () => util_exports, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); -// node_modules/testing-farm/node_modules/zod/v4/locales/da.js -var error8 = () => { - const Sizable = { - string: { unit: "tegn", verb: "havde" }, - file: { unit: "bytes", verb: "havde" }, - array: { unit: "elementer", verb: "indeholdt" }, - set: { unit: "elementer", verb: "indeholdt" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "e-mailadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkesl\xE6t", - date: "ISO-dato", - time: "ISO-klokkesl\xE6t", - duration: "ISO-varighed", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodet streng", - base64url: "base64url-kodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - string: "streng", - number: "tal", - boolean: "boolean", - array: "liste", - object: "objekt", - set: "s\xE6t", - file: "fil" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ugyldigt input: forventede instanceof ${issue5.expected}, fik ${received}`; - } - return `Ugyldigt input: forventede ${expected}, fik ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue5.values[0])}`; - return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) - return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) { - return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `For lille: forventede ${origin2} havde ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ugyldig streng: skal starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: skal ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ugyldig streng: skal indeholde "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${FormatDictionary[_issue.format] ?? issue5.format}`; +// node_modules/testing-farm/node_modules/zod/v4/core/index.js +var core_exports2 = {}; +__export(core_exports2, { + $ZodAny: () => $ZodAny, + $ZodArray: () => $ZodArray, + $ZodAsyncError: () => $ZodAsyncError, + $ZodBase64: () => $ZodBase64, + $ZodBase64URL: () => $ZodBase64URL, + $ZodBigInt: () => $ZodBigInt, + $ZodBigIntFormat: () => $ZodBigIntFormat, + $ZodBoolean: () => $ZodBoolean, + $ZodCIDRv4: () => $ZodCIDRv4, + $ZodCIDRv6: () => $ZodCIDRv6, + $ZodCUID: () => $ZodCUID, + $ZodCUID2: () => $ZodCUID2, + $ZodCatch: () => $ZodCatch, + $ZodCheck: () => $ZodCheck, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat, + $ZodCheckEndsWith: () => $ZodCheckEndsWith, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan, + $ZodCheckIncludes: () => $ZodCheckIncludes, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals, + $ZodCheckLessThan: () => $ZodCheckLessThan, + $ZodCheckLowerCase: () => $ZodCheckLowerCase, + $ZodCheckMaxLength: () => $ZodCheckMaxLength, + $ZodCheckMaxSize: () => $ZodCheckMaxSize, + $ZodCheckMimeType: () => $ZodCheckMimeType, + $ZodCheckMinLength: () => $ZodCheckMinLength, + $ZodCheckMinSize: () => $ZodCheckMinSize, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat, + $ZodCheckOverwrite: () => $ZodCheckOverwrite, + $ZodCheckProperty: () => $ZodCheckProperty, + $ZodCheckRegex: () => $ZodCheckRegex, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals, + $ZodCheckStartsWith: () => $ZodCheckStartsWith, + $ZodCheckStringFormat: () => $ZodCheckStringFormat, + $ZodCheckUpperCase: () => $ZodCheckUpperCase, + $ZodCodec: () => $ZodCodec, + $ZodCustom: () => $ZodCustom, + $ZodCustomStringFormat: () => $ZodCustomStringFormat, + $ZodDate: () => $ZodDate, + $ZodDefault: () => $ZodDefault, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion, + $ZodE164: () => $ZodE164, + $ZodEmail: () => $ZodEmail, + $ZodEmoji: () => $ZodEmoji, + $ZodEncodeError: () => $ZodEncodeError, + $ZodEnum: () => $ZodEnum, + $ZodError: () => $ZodError, + $ZodExactOptional: () => $ZodExactOptional, + $ZodFile: () => $ZodFile, + $ZodFunction: () => $ZodFunction, + $ZodGUID: () => $ZodGUID, + $ZodIPv4: () => $ZodIPv4, + $ZodIPv6: () => $ZodIPv6, + $ZodISODate: () => $ZodISODate, + $ZodISODateTime: () => $ZodISODateTime, + $ZodISODuration: () => $ZodISODuration, + $ZodISOTime: () => $ZodISOTime, + $ZodIntersection: () => $ZodIntersection, + $ZodJWT: () => $ZodJWT, + $ZodKSUID: () => $ZodKSUID, + $ZodLazy: () => $ZodLazy, + $ZodLiteral: () => $ZodLiteral, + $ZodMAC: () => $ZodMAC, + $ZodMap: () => $ZodMap, + $ZodNaN: () => $ZodNaN, + $ZodNanoID: () => $ZodNanoID, + $ZodNever: () => $ZodNever, + $ZodNonOptional: () => $ZodNonOptional, + $ZodNull: () => $ZodNull, + $ZodNullable: () => $ZodNullable, + $ZodNumber: () => $ZodNumber, + $ZodNumberFormat: () => $ZodNumberFormat, + $ZodObject: () => $ZodObject, + $ZodObjectJIT: () => $ZodObjectJIT, + $ZodOptional: () => $ZodOptional, + $ZodPipe: () => $ZodPipe, + $ZodPrefault: () => $ZodPrefault, + $ZodPromise: () => $ZodPromise, + $ZodReadonly: () => $ZodReadonly, + $ZodRealError: () => $ZodRealError, + $ZodRecord: () => $ZodRecord, + $ZodRegistry: () => $ZodRegistry, + $ZodSet: () => $ZodSet, + $ZodString: () => $ZodString, + $ZodStringFormat: () => $ZodStringFormat, + $ZodSuccess: () => $ZodSuccess, + $ZodSymbol: () => $ZodSymbol, + $ZodTemplateLiteral: () => $ZodTemplateLiteral, + $ZodTransform: () => $ZodTransform, + $ZodTuple: () => $ZodTuple, + $ZodType: () => $ZodType, + $ZodULID: () => $ZodULID, + $ZodURL: () => $ZodURL, + $ZodUUID: () => $ZodUUID, + $ZodUndefined: () => $ZodUndefined, + $ZodUnion: () => $ZodUnion, + $ZodUnknown: () => $ZodUnknown, + $ZodVoid: () => $ZodVoid, + $ZodXID: () => $ZodXID, + $ZodXor: () => $ZodXor, + $brand: () => $brand, + $constructor: () => $constructor, + $input: () => $input, + $output: () => $output, + Doc: () => Doc, + JSONSchema: () => json_schema_exports, + JSONSchemaGenerator: () => JSONSchemaGenerator, + NEVER: () => NEVER, + TimePrecision: () => TimePrecision, + _any: () => _any, + _array: () => _array, + _base64: () => _base64, + _base64url: () => _base64url, + _bigint: () => _bigint, + _boolean: () => _boolean, + _catch: () => _catch, + _check: () => _check, + _cidrv4: () => _cidrv4, + _cidrv6: () => _cidrv6, + _coercedBigint: () => _coercedBigint, + _coercedBoolean: () => _coercedBoolean, + _coercedDate: () => _coercedDate, + _coercedNumber: () => _coercedNumber, + _coercedString: () => _coercedString, + _cuid: () => _cuid, + _cuid2: () => _cuid2, + _custom: () => _custom, + _date: () => _date, + _decode: () => _decode, + _decodeAsync: () => _decodeAsync, + _default: () => _default, + _discriminatedUnion: () => _discriminatedUnion, + _e164: () => _e164, + _email: () => _email, + _emoji: () => _emoji2, + _encode: () => _encode, + _encodeAsync: () => _encodeAsync, + _endsWith: () => _endsWith, + _enum: () => _enum, + _file: () => _file, + _float32: () => _float32, + _float64: () => _float64, + _gt: () => _gt, + _gte: () => _gte, + _guid: () => _guid, + _includes: () => _includes, + _int: () => _int, + _int32: () => _int32, + _int64: () => _int64, + _intersection: () => _intersection, + _ipv4: () => _ipv4, + _ipv6: () => _ipv6, + _isoDate: () => _isoDate, + _isoDateTime: () => _isoDateTime, + _isoDuration: () => _isoDuration, + _isoTime: () => _isoTime, + _jwt: () => _jwt, + _ksuid: () => _ksuid, + _lazy: () => _lazy, + _length: () => _length, + _literal: () => _literal, + _lowercase: () => _lowercase, + _lt: () => _lt, + _lte: () => _lte, + _mac: () => _mac, + _map: () => _map, + _max: () => _lte, + _maxLength: () => _maxLength, + _maxSize: () => _maxSize, + _mime: () => _mime, + _min: () => _gte, + _minLength: () => _minLength, + _minSize: () => _minSize, + _multipleOf: () => _multipleOf, + _nan: () => _nan, + _nanoid: () => _nanoid, + _nativeEnum: () => _nativeEnum, + _negative: () => _negative, + _never: () => _never, + _nonnegative: () => _nonnegative, + _nonoptional: () => _nonoptional, + _nonpositive: () => _nonpositive, + _normalize: () => _normalize, + _null: () => _null2, + _nullable: () => _nullable, + _number: () => _number, + _optional: () => _optional, + _overwrite: () => _overwrite, + _parse: () => _parse, + _parseAsync: () => _parseAsync, + _pipe: () => _pipe, + _positive: () => _positive, + _promise: () => _promise, + _property: () => _property, + _readonly: () => _readonly, + _record: () => _record, + _refine: () => _refine, + _regex: () => _regex, + _safeDecode: () => _safeDecode, + _safeDecodeAsync: () => _safeDecodeAsync, + _safeEncode: () => _safeEncode, + _safeEncodeAsync: () => _safeEncodeAsync, + _safeParse: () => _safeParse, + _safeParseAsync: () => _safeParseAsync, + _set: () => _set, + _size: () => _size, + _slugify: () => _slugify, + _startsWith: () => _startsWith, + _string: () => _string, + _stringFormat: () => _stringFormat, + _stringbool: () => _stringbool, + _success: () => _success, + _superRefine: () => _superRefine, + _symbol: () => _symbol, + _templateLiteral: () => _templateLiteral, + _toLowerCase: () => _toLowerCase, + _toUpperCase: () => _toUpperCase, + _transform: () => _transform, + _trim: () => _trim, + _tuple: () => _tuple, + _uint32: () => _uint32, + _uint64: () => _uint64, + _ulid: () => _ulid, + _undefined: () => _undefined2, + _union: () => _union, + _unknown: () => _unknown, + _uppercase: () => _uppercase, + _url: () => _url, + _uuid: () => _uuid, + _uuidv4: () => _uuidv4, + _uuidv6: () => _uuidv6, + _uuidv7: () => _uuidv7, + _void: () => _void, + _xid: () => _xid, + _xor: () => _xor, + clone: () => clone, + config: () => config, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod, + createToJSONSchemaMethod: () => createToJSONSchemaMethod, + decode: () => decode, + decodeAsync: () => decodeAsync, + describe: () => describe, + encode: () => encode3, + encodeAsync: () => encodeAsync, + extractDefs: () => extractDefs, + finalize: () => finalize, + flattenError: () => flattenError, + formatError: () => formatError, + globalConfig: () => globalConfig, + globalRegistry: () => globalRegistry, + initializeContext: () => initializeContext, + isValidBase64: () => isValidBase64, + isValidBase64URL: () => isValidBase64URL, + isValidJWT: () => isValidJWT, + locales: () => locales_exports, + meta: () => meta, + parse: () => parse, + parseAsync: () => parseAsync, + prettifyError: () => prettifyError, + process: () => process2, + regexes: () => regexes_exports, + registry: () => registry, + safeDecode: () => safeDecode, + safeDecodeAsync: () => safeDecodeAsync, + safeEncode: () => safeEncode, + safeEncodeAsync: () => safeEncodeAsync, + safeParse: () => safeParse, + safeParseAsync: () => safeParseAsync, + toDotPath: () => toDotPath, + toJSONSchema: () => toJSONSchema, + treeifyError: () => treeifyError, + util: () => util_exports, + version: () => version +}); + +// node_modules/testing-farm/node_modules/zod/v4/core/core.js +var NEVER = Object.freeze({ + status: "aborted" +}); +// @__NO_SIDE_EFFECTS__ +function $constructor(name, initializer5, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer5(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + if (!(k in inst)) { + inst[k] = proto[k].bind(inst); } - case "not_multiple_of": - return `Ugyldigt tal: skal v\xE6re deleligt med ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8gle i ${issue5.origin}`; - case "invalid_union": - return "Ugyldigt input: matcher ingen af de tilladte typer"; - case "invalid_element": - return `Ugyldig v\xE6rdi i ${issue5.origin}`; - default: - return `Ugyldigt input`; } - }; -}; -function da_default() { - return { - localeError: error8() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/de.js -var error9 = () => { - const Sizable = { - string: { unit: "Zeichen", verb: "zu haben" }, - file: { unit: "Bytes", verb: "zu haben" }, - array: { unit: "Elemente", verb: "zu haben" }, - set: { unit: "Elemente", verb: "zu haben" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "Eingabe", - email: "E-Mail-Adresse", - url: "URL", - emoji: "Emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-Datum und -Uhrzeit", - date: "ISO-Datum", - time: "ISO-Uhrzeit", - duration: "ISO-Dauer", - ipv4: "IPv4-Adresse", - ipv6: "IPv6-Adresse", - cidrv4: "IPv4-Bereich", - cidrv6: "IPv6-Bereich", - base64: "Base64-codierter String", - base64url: "Base64-URL-codierter String", - json_string: "JSON-String", - e164: "E.164-Nummer", - jwt: "JWT", - template_literal: "Eingabe" - }; - const TypeDictionary = { - nan: "NaN", - number: "Zahl", - array: "Array" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ung\xFCltige Eingabe: erwartet instanceof ${issue5.expected}, erhalten ${received}`; - } - return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue5.values[0])}`; - return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Zu gro\xDF: erwartet, dass ${issue5.origin ?? "Wert"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; - return `Zu gro\xDF: erwartet, dass ${issue5.origin ?? "Wert"} ${adj}${issue5.maximum.toString()} ist`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Zu klein: erwartet, dass ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} hat`; - } - return `Zu klein: erwartet, dass ${issue5.origin} ${adj}${issue5.minimum.toString()} ist`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; - if (_issue.format === "ends_with") - return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; - if (_issue.format === "includes") - return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; - if (_issue.format === "regex") - return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; - return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue5.divisor} sein`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue5.origin}`; - case "invalid_union": - return "Ung\xFCltige Eingabe"; - case "invalid_element": - return `Ung\xFCltiger Wert in ${issue5.origin}`; - default: - return `Ung\xFCltige Eingabe`; + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a4; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a4 = inst._zod).deferred ?? (_a4.deferred = []); + for (const fn of inst._zod.deferred) { + fn(); } - }; + 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 $brand = /* @__PURE__ */ Symbol("zod_brand"); +var $ZodAsyncError = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + } }; -function de_default() { - return { - localeError: error9() - }; +var $ZodEncodeError = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; +var globalConfig = {}; +function config(newConfig) { + if (newConfig) + Object.assign(globalConfig, newConfig); + return globalConfig; } -// node_modules/testing-farm/node_modules/zod/v4/locales/en.js -var error10 = () => { - const Sizable = { - string: { unit: "characters", verb: "to have" }, - file: { unit: "bytes", verb: "to have" }, - array: { unit: "items", verb: "to have" }, - set: { unit: "items", verb: "to have" }, - map: { unit: "entries", verb: "to have" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "email address", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datetime", - date: "ISO date", - time: "ISO time", - duration: "ISO duration", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - mac: "MAC address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded string", - base64url: "base64url-encoded string", - json_string: "JSON string", - e164: "E.164 number", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - // Compatibility: "nan" -> "NaN" for display - nan: "NaN" - // All other type names omitted - they fall back to raw values via ?? operator - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - return `Invalid input: expected ${expected}, received ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue5.values[0])}`; - return `Invalid option: expected one of ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Too big: expected ${issue5.origin ?? "value"} to have ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue5.origin ?? "value"} to be ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Too small: expected ${issue5.origin} to have ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Too small: expected ${issue5.origin} to be ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Invalid string: must start with "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Invalid string: must end with "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Invalid string: must include "${_issue.includes}"`; - if (_issue.format === "regex") - return `Invalid string: must match pattern ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue5.format}`; +// node_modules/testing-farm/node_modules/zod/v4/core/util.js +var util_exports = {}; +__export(util_exports, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES, + Class: () => Class, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES, + aborted: () => aborted, + allowsEval: () => allowsEval, + assert: () => assert, + assertEqual: () => assertEqual, + assertIs: () => assertIs, + assertNever: () => assertNever, + assertNotEqual: () => assertNotEqual, + assignProp: () => assignProp, + base64ToUint8Array: () => base64ToUint8Array, + base64urlToUint8Array: () => base64urlToUint8Array, + cached: () => cached, + captureStackTrace: () => captureStackTrace, + cleanEnum: () => cleanEnum, + cleanRegex: () => cleanRegex, + clone: () => clone, + cloneDef: () => cloneDef, + createTransparentProxy: () => createTransparentProxy, + defineLazy: () => defineLazy, + esc: () => esc, + escapeRegex: () => escapeRegex, + extend: () => extend2, + finalizeIssue: () => finalizeIssue, + floatSafeRemainder: () => floatSafeRemainder, + getElementAtPath: () => getElementAtPath, + getEnumValues: () => getEnumValues, + getLengthableOrigin: () => getLengthableOrigin, + getParsedType: () => getParsedType, + getSizableOrigin: () => getSizableOrigin, + hexToUint8Array: () => hexToUint8Array, + isObject: () => isObject2, + isPlainObject: () => isPlainObject2, + issue: () => issue2, + joinValues: () => joinValues, + jsonStringifyReplacer: () => jsonStringifyReplacer, + merge: () => merge2, + mergeDefs: () => mergeDefs, + normalizeParams: () => normalizeParams, + nullish: () => nullish, + numKeys: () => numKeys, + objectClone: () => objectClone, + omit: () => omit, + optionalKeys: () => optionalKeys, + parsedType: () => parsedType, + partial: () => partial, + pick: () => pick, + prefixIssues: () => prefixIssues, + primitiveTypes: () => primitiveTypes, + promiseAllObject: () => promiseAllObject, + propertyKeyTypes: () => propertyKeyTypes, + randomString: () => randomString, + required: () => required, + safeExtend: () => safeExtend, + shallowClone: () => shallowClone, + slugify: () => slugify, + stringifyPrimitive: () => stringifyPrimitive, + uint8ArrayToBase64: () => uint8ArrayToBase64, + uint8ArrayToBase64url: () => uint8ArrayToBase64url, + uint8ArrayToHex: () => uint8ArrayToHex, + unwrapMessage: () => unwrapMessage +}); +function assertEqual(val) { + return val; +} +function assertNotEqual(val) { + return val; +} +function assertIs(_arg) { +} +function assertNever(_x) { + throw new Error("Unexpected value in exhaustive check"); +} +function assert(_) { +} +function getEnumValues(entries) { + const numericValues = Object.values(entries).filter((v) => typeof v === "number"); + const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); + return values; +} +function joinValues(array3, separator = "|") { + return array3.map((val) => stringifyPrimitive(val)).join(separator); +} +function jsonStringifyReplacer(_, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached(getter) { + const set3 = false; + return { + get value() { + if (!set3) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; } - case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue5.divisor}`; - case "unrecognized_keys": - return `Unrecognized key${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Invalid key in ${issue5.origin}`; - case "invalid_union": - return "Invalid input"; - case "invalid_element": - return `Invalid value in ${issue5.origin}`; - default: - return `Invalid input`; + throw new Error("cached value already set"); } }; -}; -function en_default() { - return { - localeError: error10() - }; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/eo.js -var error11 = () => { - const Sizable = { - string: { unit: "karaktrojn", verb: "havi" }, - file: { unit: "bajtojn", verb: "havi" }, - array: { unit: "elementojn", verb: "havi" }, - set: { unit: "elementojn", verb: "havi" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +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 floatSafeRemainder(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepString = step.toString(); + let stepDecCount = (stepString.split(".")[1] || "").length; + if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { + const match2 = stepString.match(/\d?e-(\d?)/); + if (match2?.[1]) { + stepDecCount = Number.parseInt(match2[1]); + } } - const FormatDictionary = { - regex: "enigo", - email: "retadreso", - url: "URL", - emoji: "emo\u011Dio", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datotempo", - date: "ISO-dato", - time: "ISO-tempo", - duration: "ISO-da\u016Dro", - ipv4: "IPv4-adreso", - ipv6: "IPv6-adreso", - cidrv4: "IPv4-rango", - cidrv6: "IPv6-rango", - base64: "64-ume kodita karaktraro", - base64url: "URL-64-ume kodita karaktraro", - json_string: "JSON-karaktraro", - e164: "E.164-nombro", - jwt: "JWT", - template_literal: "enigo" - }; - const TypeDictionary = { - nan: "NaN", - number: "nombro", - array: "tabelo", - null: "senvalora" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Nevalida enigo: atendi\u011Dis instanceof ${issue5.expected}, ricevi\u011Dis ${received}`; - } - return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue5.values[0])}`; - return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Tro granda: atendi\u011Dis ke ${issue5.origin ?? "valoro"} havu ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementojn"}`; - return `Tro granda: atendi\u011Dis ke ${issue5.origin ?? "valoro"} havu ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue5.origin} havu ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Tro malgranda: atendi\u011Dis ke ${issue5.origin} estu ${adj}${issue5.minimum.toString()}`; + const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; + const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); + const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); + return valInt % stepInt / 10 ** decCount; +} +var EVALUATING = /* @__PURE__ */ Symbol("evaluating"); +function defineLazy(object3, key, getter) { + let value = void 0; + Object.defineProperty(object3, key, { + get() { + if (value === EVALUATING) { + return void 0; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; - if (_issue.format === "regex") - return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; - return `Nevalida ${FormatDictionary[_issue.format] ?? issue5.format}`; + if (value === void 0) { + value = EVALUATING; + value = getter(); } - case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue5.divisor}`; - case "unrecognized_keys": - return `Nekonata${issue5.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue5.keys.length > 1 ? "j" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue5.origin}`; - case "invalid_union": - return "Nevalida enigo"; - case "invalid_element": - return `Nevalida valoro en ${issue5.origin}`; - default: - return `Nevalida enigo`; + return value; + }, + set(v) { + Object.defineProperty(object3, key, { + value: v + // configurable: true, + }); + }, + configurable: true + }); +} +function objectClone(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); +} +function assignProp(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); + } + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef(schema) { + return mergeDefs(schema._zod.def); +} +function getElementAtPath(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject(promisesObj) { + const keys = Object.keys(promisesObj); + const promises3 = keys.map((key) => promisesObj[key]); + return Promise.all(promises3).then((results) => { + const resolvedObj = {}; + for (let i = 0; i < keys.length; i++) { + resolvedObj[keys[i]] = results[i]; } - }; + return resolvedObj; + }); +} +function randomString(length = 10) { + const chars = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i = 0; i < length; i++) { + str += chars[Math.floor(Math.random() * chars.length)]; + } + return str; +} +function esc(str) { + return JSON.stringify(str); +} +function slugify(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { }; -function eo_default() { - return { - localeError: error11() - }; +function isObject2(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); } - -// node_modules/testing-farm/node_modules/zod/v4/locales/es.js -var error12 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "tener" }, - file: { unit: "bytes", verb: "tener" }, - array: { unit: "elementos", verb: "tener" }, - set: { unit: "elementos", verb: "tener" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var allowsEval = cached(() => { + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; } - const FormatDictionary = { - regex: "entrada", - email: "direcci\xF3n de correo electr\xF3nico", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "fecha y hora ISO", - date: "fecha ISO", - time: "hora ISO", - duration: "duraci\xF3n ISO", - ipv4: "direcci\xF3n IPv4", - ipv6: "direcci\xF3n IPv6", - cidrv4: "rango IPv4", - cidrv6: "rango IPv6", - base64: "cadena codificada en base64", - base64url: "URL codificada en base64", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN", - string: "texto", - number: "n\xFAmero", - boolean: "booleano", - array: "arreglo", - object: "objeto", - set: "conjunto", - file: "archivo", - date: "fecha", - bigint: "n\xFAmero grande", - symbol: "s\xEDmbolo", - undefined: "indefinido", - null: "nulo", - function: "funci\xF3n", - map: "mapa", - record: "registro", - tuple: "tupla", - enum: "enumeraci\xF3n", - union: "uni\xF3n", - literal: "literal", - promise: "promesa", - void: "vac\xEDo", - never: "nunca", - unknown: "desconocido", - any: "cualquiera" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Entrada inv\xE1lida: se esperaba instanceof ${issue5.expected}, recibido ${received}`; - } - return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + try { + const F = Function; + new F(""); + return true; + } catch (_) { + return false; + } +}); +function isPlainObject2(o) { + if (isObject2(o) === false) + return false; + const ctor = o.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject2(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone(o) { + if (isPlainObject2(o)) + return { ...o }; + if (Array.isArray(o)) + return [...o]; + return o; +} +function numKeys(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +var getParsedType = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; } - case "invalid_value": - if (issue5.values.length === 1) - return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue5.values[0])}`; - return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) - return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue5.maximum.toString()}`; + if (data === null) { + return "null"; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) { - return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue5.minimum.toString()}`; + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; - return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue5.format}`; + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue5.divisor}`; - case "unrecognized_keys": - return `Llave${issue5.keys.length > 1 ? "s" : ""} desconocida${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Llave inv\xE1lida en ${TypeDictionary[issue5.origin] ?? issue5.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido en ${TypeDictionary[issue5.origin] ?? issue5.origin}`; - default: - return `Entrada inv\xE1lida`; - } - }; + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t}`); + } }; -function es_default() { - return { - localeError: error12() - }; +var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]); +var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); +function escapeRegex(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } - -// node_modules/testing-farm/node_modules/zod/v4/locales/fa.js -var error13 = () => { - const Sizable = { - string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +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; } - const FormatDictionary = { - regex: "\u0648\u0631\u0648\u062F\u06CC", - email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", - url: "URL", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", - time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - ipv4: "IPv4 \u0622\u062F\u0631\u0633", - ipv6: "IPv6 \u0622\u062F\u0631\u0633", - cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", - cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", - base64: "base64-encoded \u0631\u0634\u062A\u0647", - base64url: "base64url-encoded \u0631\u0634\u062A\u0647", - json_string: "JSON \u0631\u0634\u062A\u0647", - e164: "E.164 \u0639\u062F\u062F", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u06CC" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0639\u062F\u062F", - array: "\u0622\u0631\u0627\u06CC\u0647" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue5.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; - } - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; - } - case "invalid_value": - if (issue5.values.length === 1) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue5.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; - } - return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue5.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue5.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + delete params.message; + if (typeof params.error === "string") + return { ...params, error: () => params.error }; + return params; +} +function createTransparentProxy(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); + }, + set(_, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); + }, + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); + }, + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); + } + }); +} +function stringifyPrimitive(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys(shape) { + return Object.keys(shape).filter((k) => { + return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; + }); +} +var NUMBER_FORMAT_RANGES = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] +}; +var BIGINT_FORMAT_RANGES = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] +}; +function pick(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); } - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue5.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} \u0628\u0627\u0634\u062F`; + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function omit(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); } - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} \u0628\u0627\u0634\u062F`; + if (!mask[key]) + continue; + delete newShape[key]; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; - } - if (_issue.format === "ends_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; - } - if (_issue.format === "includes") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; - } - if (_issue.format === "regex") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; - } - return `${FormatDictionary[_issue.format] ?? issue5.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + assignProp(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone(schema, def); +} +function extend2(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); } - case "not_multiple_of": - return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue5.divisor} \u0628\u0627\u0634\u062F`; - case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue5.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue5.origin}`; - case "invalid_union": - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; - case "invalid_element": - return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue5.origin}`; - default: - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } - }; -}; -function fa_default() { - return { - localeError: error13() - }; + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); } - -// node_modules/testing-farm/node_modules/zod/v4/locales/fi.js -var error14 = () => { - const Sizable = { - string: { unit: "merkki\xE4", subject: "merkkijonon" }, - file: { unit: "tavua", subject: "tiedoston" }, - array: { unit: "alkiota", subject: "listan" }, - set: { unit: "alkiota", subject: "joukon" }, - number: { unit: "", subject: "luvun" }, - bigint: { unit: "", subject: "suuren kokonaisluvun" }, - int: { unit: "", subject: "kokonaisluvun" }, - date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +function safeExtend(schema, shape) { + if (!isPlainObject2(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); } - const FormatDictionary = { - regex: "s\xE4\xE4nn\xF6llinen lauseke", - email: "s\xE4hk\xF6postiosoite", - url: "URL-osoite", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-aikaleima", - date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", - time: "ISO-aika", - duration: "ISO-kesto", - ipv4: "IPv4-osoite", - ipv6: "IPv6-osoite", - cidrv4: "IPv4-alue", - cidrv6: "IPv6-alue", - base64: "base64-koodattu merkkijono", - base64url: "base64url-koodattu merkkijono", - json_string: "JSON-merkkijono", - e164: "E.164-luku", - jwt: "JWT", - template_literal: "templaattimerkkijono" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Virheellinen tyyppi: odotettiin instanceof ${issue5.expected}, oli ${received}`; + const def = mergeDefs(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp(this, "shape", _shape); + return _shape; + } + }); + return clone(schema, def); +} +function merge2(a, b) { + const def = mergeDefs(a._zod.def, { + get shape() { + const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; + assignProp(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b._zod.def.catchall; + }, + checks: [] + // delete existing checks + }); + return clone(a, def); +} +function partial(Class3, schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; } - return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue5.values[0])}`; - return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue5.maximum.toString()} ${sizing.unit}`.trim(); + } else { + for (const key in oldShape) { + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue5.maximum.toString()}`; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue5.minimum.toString()} ${sizing.unit}`.trim(); + assignProp(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone(schema, def); +} +function required(Class3, schema, mask) { + const def = mergeDefs(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; - if (_issue.format === "regex") { - return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } else { + for (const key in oldShape) { + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); } - return `Virheellinen ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue5.divisor} monikerta`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return "Virheellinen avain tietueessa"; - case "invalid_union": - return "Virheellinen unioni"; - case "invalid_element": - return "Virheellinen arvo joukossa"; - default: - return `Virheellinen sy\xF6te`; + assignProp(this, "shape", shape); + return shape; } - }; -}; -function fi_default() { - return { - localeError: error14() - }; + }); + return clone(schema, def); } - -// node_modules/testing-farm/node_modules/zod/v4/locales/fr.js -var error15 = () => { - const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +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; + } } - const FormatDictionary = { - regex: "entr\xE9e", - email: "adresse e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "date et heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", - jwt: "JWT", - template_literal: "entr\xE9e" - }; - const TypeDictionary = { - nan: "NaN", - number: "nombre", - array: "tableau" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Entr\xE9e invalide : instanceof ${issue5.expected} attendu, ${received} re\xE7u`; - } - return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Entr\xE9e invalide : ${stringifyPrimitive(issue5.values[0])} attendu`; - return `Option invalide : une valeur parmi ${joinValues(issue5.values, "|")} attendue`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Trop grand : ${issue5.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; - return `Trop grand : ${issue5.origin ?? "valeur"} doit \xEAtre ${adj}${issue5.maximum.toString()}`; + return false; +} +function prefixIssues(path, issues) { + return issues.map((iss) => { + var _a4; + (_a4 = iss).path ?? (_a4.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage(message2) { + return typeof message2 === "string" ? message2 : message2?.message; +} +function finalizeIssue(iss, ctx, config3) { + const full = { ...iss, path: iss.path ?? [] }; + if (!iss.message) { + const message2 = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; + full.message = message2; + } + delete full.inst; + delete full.continue; + if (!ctx?.reportInput) { + delete full.input; + } + return full; +} +function getSizableOrigin(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function parsedType(data) { + const t = typeof data; + switch (t) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Trop petit : ${issue5.origin} doit ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Trop petit : ${issue5.origin} doit \xEAtre ${adj}${issue5.minimum.toString()}`; + if (Array.isArray(data)) { + return "array"; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} invalide`; + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; } - case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue5.divisor}`; - case "unrecognized_keys": - return `Cl\xE9${issue5.keys.length > 1 ? "s" : ""} non reconnue${issue5.keys.length > 1 ? "s" : ""} : ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Cl\xE9 invalide dans ${issue5.origin}`; - case "invalid_union": - return "Entr\xE9e invalide"; - case "invalid_element": - return `Valeur invalide dans ${issue5.origin}`; - default: - return `Entr\xE9e invalide`; } - }; -}; -function fr_default() { - return { - localeError: error15() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/fr-CA.js -var error16 = () => { - const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "entr\xE9e", - email: "adresse courriel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "date-heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", - jwt: "JWT", - template_literal: "entr\xE9e" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Entr\xE9e invalide : attendu instanceof ${issue5.expected}, re\xE7u ${received}`; - } - return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue5.values[0])}`; - return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Trop grand : attendu que ${issue5.origin ?? "la valeur"} ait ${adj}${issue5.maximum.toString()} ${sizing.unit}`; - return `Trop grand : attendu que ${issue5.origin ?? "la valeur"} soit ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Trop petit : attendu que ${issue5.origin} ait ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Trop petit : attendu que ${issue5.origin} soit ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} invalide`; - } - case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue5.divisor}`; - case "unrecognized_keys": - return `Cl\xE9${issue5.keys.length > 1 ? "s" : ""} non reconnue${issue5.keys.length > 1 ? "s" : ""} : ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Cl\xE9 invalide dans ${issue5.origin}`; - case "invalid_union": - return "Entr\xE9e invalide"; - case "invalid_element": - return `Valeur invalide dans ${issue5.origin}`; - default: - return `Entr\xE9e invalide`; - } - }; -}; -function fr_CA_default() { - return { - localeError: error16() - }; + return t; +} +function issue2(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum(obj) { + return Object.entries(obj).filter(([k, _]) => { + return Number.isNaN(Number.parseInt(k, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array(base645) { + const binaryString = atob(base645); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return bytes; } +function uint8ArrayToBase64(bytes) { + let binaryString = ""; + for (let i = 0; i < bytes.length; i++) { + binaryString += String.fromCharCode(bytes[i]); + } + return btoa(binaryString); +} +function base64urlToUint8Array(base64url5) { + const base645 = base64url5.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base645.length % 4) % 4); + return base64ToUint8Array(base645 + padding); +} +function uint8ArrayToBase64url(bytes) { + return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array(hex5) { + const cleanHex = hex5.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i = 0; i < cleanHex.length; i += 2) { + bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + } + return bytes; +} +function uint8ArrayToHex(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} +var Class = class { + constructor(..._args) { + } +}; -// node_modules/testing-farm/node_modules/zod/v4/locales/he.js -var error17 = () => { - const TypeNames = { - string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, - number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, - boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, - bigint: { label: "BigInt", gender: "m" }, - date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, - array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, - object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, - null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, - undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, - symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, - function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, - map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, - set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, - file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, - promise: { label: "Promise", gender: "m" }, - NaN: { label: "NaN", gender: "m" }, - unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, - value: { label: "\u05E2\u05E8\u05DA", gender: "m" } - }; - const Sizable = { - string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, - file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } - // no unit - }; - const typeEntry = (t) => t ? TypeNames[t] : void 0; - const typeLabel = (t) => { - const e = typeEntry(t); - if (e) - return e.label; - return t ?? TypeNames.unknown.label; - }; - const withDefinite = (t) => `\u05D4${typeLabel(t)}`; - const verbFor = (t) => { - const e = typeEntry(t); - const gender = e?.gender ?? "m"; - return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; - }; - const getSizing = (origin2) => { - if (!origin2) - return null; - return Sizable[origin2] ?? null; - }; - const FormatDictionary = { - regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, - url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, - emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, - uuid: { label: "UUID", gender: "m" }, - nanoid: { label: "nanoid", gender: "m" }, - guid: { label: "GUID", gender: "m" }, - cuid: { label: "cuid", gender: "m" }, - cuid2: { label: "cuid2", gender: "m" }, - ulid: { label: "ULID", gender: "m" }, - xid: { label: "XID", gender: "m" }, - ksuid: { label: "KSUID", gender: "m" }, - datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, - date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, - time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, - duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, - ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, - ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, - cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, - cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, - base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, - base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, - json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, - e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, - jwt: { label: "JWT", gender: "m" }, - ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expectedKey = issue5.expected; - const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue5.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; - } - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; - } - case "invalid_value": { - if (issue5.values.length === 1) { - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue5.values[0])}`; - } - const stringified = issue5.values.map((v) => stringifyPrimitive(v)); - if (issue5.values.length === 2) { - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; - } - const lastValue = stringified[stringified.length - 1]; - const restValues = stringified.slice(0, -1).join(", "); - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; - } - case "too_big": { - const sizing = getSizing(issue5.origin); - const subject = withDefinite(issue5.origin ?? "value"); - if (issue5.origin === "string") { - return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue5.maximum.toString()} ${sizing?.unit ?? ""} ${issue5.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); - } - if (issue5.origin === "number") { - const comparison = issue5.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue5.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue5.maximum}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; - } - if (issue5.origin === "array" || issue5.origin === "set") { - const verb = issue5.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; - const comparison = issue5.inclusive ? `${issue5.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue5.maximum} ${sizing?.unit ?? ""}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); - } - const adj = issue5.inclusive ? "<=" : "<"; - const be = verbFor(issue5.origin ?? "value"); - if (sizing?.unit) { - return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.maximum.toString()} ${sizing.unit}`; - } - return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const sizing = getSizing(issue5.origin); - const subject = withDefinite(issue5.origin ?? "value"); - if (issue5.origin === "string") { - return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue5.minimum.toString()} ${sizing?.unit ?? ""} ${issue5.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); - } - if (issue5.origin === "number") { - const comparison = issue5.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue5.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue5.minimum}`; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; - } - if (issue5.origin === "array" || issue5.origin === "set") { - const verb = issue5.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; - if (issue5.minimum === 1 && issue5.inclusive) { - const singularPhrase = issue5.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; +// node_modules/testing-farm/node_modules/zod/v4/core/errors.js +var initializer = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); +}; +var $ZodError = $constructor("$ZodError", initializer); +var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error }); +function flattenError(error99, mapper = (issue4) => issue4.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error99.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; +} +function formatError(error99, mapper = (issue4) => issue4.message) { + const fieldErrors = { _errors: [] }; + const processError = (error100) => { + for (const issue4 of error100.issues) { + if (issue4.code === "invalid_union" && issue4.errors.length) { + issue4.errors.map((issues) => processError({ issues })); + } else if (issue4.code === "invalid_key") { + processError({ issues: issue4.issues }); + } else if (issue4.code === "invalid_element") { + processError({ issues: issue4.issues }); + } else if (issue4.path.length === 0) { + fieldErrors._errors.push(mapper(issue4)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue4.path.length) { + const el = issue4.path[i]; + const terminal = i === issue4.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue4)); } - const comparison = issue5.inclusive ? `${issue5.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue5.minimum} ${sizing?.unit ?? ""}`; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); - } - const adj = issue5.inclusive ? ">=" : ">"; - const be = verbFor(issue5.origin ?? "value"); - if (sizing?.unit) { - return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + curr = curr[el]; + i++; } - return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; - const nounEntry = FormatDictionary[_issue.format]; - const noun = nounEntry?.label ?? _issue.format; - const gender = nounEntry?.gender ?? "m"; - const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; - return `${noun} \u05DC\u05D0 ${adjective}`; - } - case "not_multiple_of": - return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue5.divisor}`; - case "unrecognized_keys": - return `\u05DE\u05E4\u05EA\u05D7${issue5.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue5.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": { - return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; - } - case "invalid_union": - return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; - case "invalid_element": { - const place = withDefinite(issue5.origin ?? "array"); - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; } - default: - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } }; -}; -function he_default() { - return { - localeError: error17() - }; + processError(error99); + return fieldErrors; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/hu.js -var error18 = () => { - const Sizable = { - string: { unit: "karakter", verb: "legyen" }, - file: { unit: "byte", verb: "legyen" }, - array: { unit: "elem", verb: "legyen" }, - set: { unit: "elem", verb: "legyen" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "bemenet", - email: "email c\xEDm", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO id\u0151b\xE9lyeg", - date: "ISO d\xE1tum", - time: "ISO id\u0151", - duration: "ISO id\u0151intervallum", - ipv4: "IPv4 c\xEDm", - ipv6: "IPv6 c\xEDm", - cidrv4: "IPv4 tartom\xE1ny", - cidrv6: "IPv6 tartom\xE1ny", - base64: "base64-k\xF3dolt string", - base64url: "base64url-k\xF3dolt string", - json_string: "JSON string", - e164: "E.164 sz\xE1m", - jwt: "JWT", - template_literal: "bemenet" - }; - const TypeDictionary = { - nan: "NaN", - number: "sz\xE1m", - array: "t\xF6mb" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue5.expected}, a kapott \xE9rt\xE9k ${received}`; +function treeifyError(error99, mapper = (issue4) => issue4.message) { + const result = { errors: [] }; + const processError = (error100, path = []) => { + var _a4, _b; + for (const issue4 of error100.issues) { + if (issue4.code === "invalid_union" && issue4.errors.length) { + issue4.errors.map((issues) => processError({ issues }, issue4.path)); + } else if (issue4.code === "invalid_key") { + processError({ issues: issue4.issues }, issue4.path); + } else if (issue4.code === "invalid_element") { + processError({ issues: issue4.issues }, issue4.path); + } else { + const fullpath = [...path, ...issue4.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue4)); + continue; } - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue5.values[0])}`; - return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `T\xFAl nagy: ${issue5.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elem"}`; - return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue5.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue5.origin} m\xE9rete t\xFAl kicsi ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + let curr = result; + let i = 0; + while (i < fullpath.length) { + const el = fullpath[i]; + const terminal = i === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a4 = curr.properties)[el] ?? (_a4[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue4)); + } + i++; } - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue5.origin} t\xFAl kicsi ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; - if (_issue.format === "ends_with") - return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; - if (_issue.format === "includes") - return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; - if (_issue.format === "regex") - return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; - return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue5.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; - case "unrecognized_keys": - return `Ismeretlen kulcs${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue5.origin}`; - case "invalid_union": - return "\xC9rv\xE9nytelen bemenet"; - case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue5.origin}`; - default: - return `\xC9rv\xE9nytelen bemenet`; } }; -}; -function hu_default() { - return { - localeError: error18() - }; + processError(error99); + return result; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/hy.js -function getArmenianPlural(count, one, many) { - return Math.abs(count) === 1 ? one : many; +function toDotPath(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); + } + } + return segs.join(""); } -function withDefiniteArticle(word) { - if (!word) - return ""; - const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; - const lastChar = word[word.length - 1]; - return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); +function prettifyError(error99) { + const lines = []; + const issues = [...error99.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); + for (const issue4 of issues) { + lines.push(`\u2716 ${issue4.message}`); + if (issue4.path?.length) + lines.push(` \u2192 at ${toDotPath(issue4.path)}`); + } + return lines.join("\n"); } -var error19 = () => { - const Sizable = { - string: { - unit: { - one: "\u0576\u0577\u0561\u0576", - many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - file: { - unit: { - one: "\u0562\u0561\u0575\u0569", - many: "\u0562\u0561\u0575\u0569\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - array: { - unit: { - one: "\u057F\u0561\u0580\u0580", - many: "\u057F\u0561\u0580\u0580\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - set: { - unit: { - one: "\u057F\u0561\u0580\u0580", - many: "\u057F\u0561\u0580\u0580\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + +// node_modules/testing-farm/node_modules/zod/v4/core/parse.js +var _parse = (_Err) => (schema, value, _ctx, _params) => { + const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; + const result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) { + throw new $ZodAsyncError(); } - const FormatDictionary = { - regex: "\u0574\u0578\u0582\u057F\u0584", - email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", - url: "URL", - emoji: "\u0567\u0574\u0578\u057B\u056B", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", - date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", - time: "ISO \u056A\u0561\u0574", - duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", - ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", - ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", - cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", - cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", - base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", - base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", - json_string: "JSON \u057F\u0578\u0572", - e164: "E.164 \u0570\u0561\u0574\u0561\u0580", - jwt: "JWT", - template_literal: "\u0574\u0578\u0582\u057F\u0584" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0569\u056B\u057E", - array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue5.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; - } - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue5.values[1])}`; - return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const maxValue = Number(issue5.maximum); - const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue5.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue5.maximum.toString()} ${unit}`; - } - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue5.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const minValue = Number(issue5.minimum); - const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue5.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue5.minimum.toString()} ${unit}`; - } - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue5.origin)} \u056C\u056B\u0576\u056B ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; - if (_issue.format === "ends_with") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; - if (_issue.format === "includes") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; - return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue5.divisor}-\u056B`; - case "unrecognized_keys": - return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue5.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue5.origin)}-\u0578\u0582\u0574`; - case "invalid_union": - return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; - case "invalid_element": - return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue5.origin)}-\u0578\u0582\u0574`; - default: - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; - } - }; + if (result.issues.length) { + const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))); + captureStackTrace(e, _params?.callee); + throw e; + } + return result.value; }; -function hy_default() { - return { - localeError: error19() - }; +var parse = /* @__PURE__ */ _parse($ZodRealError); +var _parseAsync = (_Err) => async (schema, value, _ctx, params) => { + const ctx = _ctx ? Object.assign(_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); + throw e; + } + return result.value; +}; +var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError); +var _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 ? { + success: false, + error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParse = /* @__PURE__ */ _safeParse($ZodRealError); +var _safeParseAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; + let result = schema._zod.run({ value, issues: [] }, ctx); + if (result instanceof Promise) + result = await result; + return result.issues.length ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + } : { success: true, data: result.value }; +}; +var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError); +var _encode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parse(_Err)(schema, value, ctx); +}; +var encode3 = /* @__PURE__ */ _encode($ZodRealError); +var _decode = (_Err) => (schema, value, _ctx) => { + return _parse(_Err)(schema, value, _ctx); +}; +var decode = /* @__PURE__ */ _decode($ZodRealError); +var _encodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _parseAsync(_Err)(schema, value, ctx); +}; +var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError); +var _decodeAsync = (_Err) => async (schema, value, _ctx) => { + return _parseAsync(_Err)(schema, value, _ctx); +}; +var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError); +var _safeEncode = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParse(_Err)(schema, value, ctx); +}; +var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError); +var _safeDecode = (_Err) => (schema, value, _ctx) => { + return _safeParse(_Err)(schema, value, _ctx); +}; +var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError); +var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; + return _safeParseAsync(_Err)(schema, value, ctx); +}; +var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError); +var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => { + return _safeParseAsync(_Err)(schema, value, _ctx); +}; +var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError); + +// node_modules/testing-farm/node_modules/zod/v4/core/regexes.js +var regexes_exports = {}; +__export(regexes_exports, { + base64: () => base64, + base64url: () => base64url, + bigint: () => bigint, + boolean: () => boolean, + browserEmail: () => browserEmail, + cidrv4: () => cidrv4, + cidrv6: () => cidrv6, + cuid: () => cuid, + cuid2: () => cuid2, + date: () => date, + datetime: () => datetime, + domain: () => domain, + duration: () => duration, + e164: () => e164, + email: () => email, + emoji: () => emoji, + extendedDuration: () => extendedDuration, + guid: () => guid, + hex: () => hex, + hostname: () => hostname, + html5Email: () => html5Email, + idnEmail: () => idnEmail, + integer: () => integer, + ipv4: () => ipv4, + ipv6: () => ipv6, + ksuid: () => ksuid, + lowercase: () => lowercase, + mac: () => mac, + md5_base64: () => md5_base64, + md5_base64url: () => md5_base64url, + md5_hex: () => md5_hex, + nanoid: () => nanoid, + null: () => _null, + number: () => number, + rfc5322Email: () => rfc5322Email, + sha1_base64: () => sha1_base64, + sha1_base64url: () => sha1_base64url, + sha1_hex: () => sha1_hex, + sha256_base64: () => sha256_base64, + sha256_base64url: () => sha256_base64url, + sha256_hex: () => sha256_hex, + sha384_base64: () => sha384_base64, + sha384_base64url: () => sha384_base64url, + sha384_hex: () => sha384_hex, + sha512_base64: () => sha512_base64, + sha512_base64url: () => sha512_base64url, + sha512_hex: () => sha512_hex, + string: () => string, + time: () => time, + ulid: () => ulid, + undefined: () => _undefined, + unicodeEmail: () => unicodeEmail, + uppercase: () => uppercase, + uuid: () => uuid, + uuid4: () => uuid4, + uuid6: () => uuid6, + uuid7: () => uuid7, + xid: () => xid +}); +var cuid = /^[cC][^\s-]{8,}$/; +var cuid2 = /^[0-9a-z]+$/; +var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid = /^[0-9a-vA-V]{20}$/; +var ksuid = /^[A-Za-z0-9]{27}$/; +var nanoid = /^[a-zA-Z0-9_-]{21}$/; +var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; +var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; +var uuid = (version3) => { + if (!version3) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); +}; +var uuid4 = /* @__PURE__ */ uuid(4); +var uuid6 = /* @__PURE__ */ uuid(6); +var uuid7 = /* @__PURE__ */ uuid(7); +var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; +var idnEmail = unicodeEmail; +var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji() { + return new RegExp(_emoji, "u"); +} +var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; +var mac = (delimiter) => { + const escapedDelim = escapeRegex(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); +}; +var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url = /^[A-Za-z0-9_-]*$/; +var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; +var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; +var e164 = /^\+[1-9]\d{6,14}$/; +var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; +var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`); +function timeSource(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex2; +} +function time(args) { + return new RegExp(`^${timeSource(args)}$`); +} +function datetime(args) { + const time5 = timeSource({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time5}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource}T(?:${timeRegex})$`); +} +var string = (params) => { + const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex2}$`); +}; +var bigint = /^-?\d+n?$/; +var integer = /^-?\d+$/; +var number = /^-?\d+(?:\.\d+)?$/; +var boolean = /^(?:true|false)$/i; +var _null = /^null$/i; +var _undefined = /^undefined$/i; +var lowercase = /^[^A-Z]*$/; +var uppercase = /^[^a-z]*$/; +var hex = /^[0-9a-fA-F]*$/; +function fixedBase64(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); } +function fixedBase64url(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var md5_hex = /^[0-9a-fA-F]{32}$/; +var md5_base64 = /* @__PURE__ */ fixedBase64(22, "=="); +var md5_base64url = /* @__PURE__ */ fixedBase64url(22); +var sha1_hex = /^[0-9a-fA-F]{40}$/; +var sha1_base64 = /* @__PURE__ */ fixedBase64(27, "="); +var sha1_base64url = /* @__PURE__ */ fixedBase64url(27); +var sha256_hex = /^[0-9a-fA-F]{64}$/; +var sha256_base64 = /* @__PURE__ */ fixedBase64(43, "="); +var sha256_base64url = /* @__PURE__ */ fixedBase64url(43); +var sha384_hex = /^[0-9a-fA-F]{96}$/; +var sha384_base64 = /* @__PURE__ */ fixedBase64(64, ""); +var sha384_base64url = /* @__PURE__ */ fixedBase64url(64); +var sha512_hex = /^[0-9a-fA-F]{128}$/; +var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "=="); +var sha512_base64url = /* @__PURE__ */ fixedBase64url(86); -// node_modules/testing-farm/node_modules/zod/v4/locales/id.js -var error20 = () => { - const Sizable = { - string: { unit: "karakter", verb: "memiliki" }, - file: { unit: "byte", verb: "memiliki" }, - array: { unit: "item", verb: "memiliki" }, - set: { unit: "item", verb: "memiliki" } +// node_modules/testing-farm/node_modules/zod/v4/core/checks.js +var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { + var _a4; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a4 = inst._zod).onattach ?? (_a4.onattach = []); +}); +var numericOriginMap = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "alamat email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tanggal dan waktu format ISO", - date: "tanggal format ISO", - time: "jam format ISO", - duration: "durasi format ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "rentang alamat IPv4", - cidrv6: "rentang alamat IPv6", - base64: "string dengan enkode base64", - base64url: "string dengan enkode base64url", - json_string: "string JSON", - e164: "angka E.164", - jwt: "JWT", - template_literal: "input" +}); +var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck.init(inst, def); + const origin2 = numericOriginMap[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN" +}); +var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a4; + (_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Input tidak valid: diharapkan instanceof ${issue5.expected}, diterima ${received}`; - } - return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Input tidak valid: diharapkan ${stringifyPrimitive(issue5.values[0])}`; - return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Terlalu besar: diharapkan ${issue5.origin ?? "value"} memiliki ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: diharapkan ${issue5.origin ?? "value"} menjadi ${adj}${issue5.maximum.toString()}`; +}); +var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin2 = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin2, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Terlalu kecil: diharapkan ${issue5.origin} memiliki ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); } - return `Terlalu kecil: diharapkan ${issue5.origin} menjadi ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - return `String tidak valid: harus menyertakan "${_issue.includes}"`; - if (_issue.format === "regex") - return `String tidak valid: harus sesuai pola ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} tidak valid`; + return; } - case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue5.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali ${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak valid di ${issue5.origin}`; - case "invalid_union": - return "Input tidak valid"; - case "invalid_element": - return `Nilai tidak valid di ${issue5.origin}`; - default: - return `Input tidak valid`; + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); } }; -}; -function id_default() { - return { - localeError: error20() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/is.js -var error21 = () => { - const Sizable = { - string: { unit: "stafi", verb: "a\xF0 hafa" }, - file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, - array: { unit: "hluti", verb: "a\xF0 hafa" }, - set: { unit: "hluti", verb: "a\xF0 hafa" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "gildi", - email: "netfang", - url: "vefsl\xF3\xF0", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dagsetning og t\xEDmi", - date: "ISO dagsetning", - time: "ISO t\xEDmi", - duration: "ISO t\xEDmalengd", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded strengur", - base64url: "base64url-encoded strengur", - json_string: "JSON strengur", - e164: "E.164 t\xF6lugildi", - jwt: "JWT", - template_literal: "gildi" +}); +var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); + } }; - const TypeDictionary = { - nan: "NaN", - number: "n\xFAmer", - array: "fylki" +}); +var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => { + var _a4; + $ZodCheck.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue5.expected}`; - } - return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue5.values[0])}`; - return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin ?? "gildi"} hafi ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "hluti"}`; - return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin ?? "gildi"} s\xE9 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin} hafi ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin} s\xE9 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; - if (_issue.format === "regex") - return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; - return `Rangt ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue5.divisor}`; - case "unrecognized_keys": - return `\xD3\xFEekkt ${issue5.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Rangur lykill \xED ${issue5.origin}`; - case "invalid_union": - return "Rangt gildi"; - case "invalid_element": - return `Rangt gildi \xED ${issue5.origin}`; - default: - return `Rangt gildi`; - } +}); +var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => { + var _a4; + $ZodCheck.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; -}; -function is_default() { - return { - localeError: error21() +}); +var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => { + var _a4; + $ZodCheck.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/it.js -var error22 = () => { - const Sizable = { - string: { unit: "caratteri", verb: "avere" }, - file: { unit: "byte", verb: "avere" }, - array: { unit: "elementi", verb: "avere" }, - set: { unit: "elementi", verb: "avere" } +}); +var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => { + var _a4; + $ZodCheck.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "indirizzo email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e ora ISO", - date: "data ISO", - time: "ora ISO", - duration: "durata ISO", - ipv4: "indirizzo IPv4", - ipv6: "indirizzo IPv6", - cidrv4: "intervallo IPv4", - cidrv6: "intervallo IPv6", - base64: "stringa codificata in base64", - base64url: "URL codificata in base64", - json_string: "stringa JSON", - e164: "numero E.164", - jwt: "JWT", - template_literal: "input" +}); +var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => { + var _a4; + $ZodCheck.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin2 = getLengthableOrigin(input); + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "numero", - array: "vettore" +}); +var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => { + var _a4; + $ZodCheck.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin2 = getLengthableOrigin(input); + const tooBig = length > def.length; + payload.issues.push({ + origin: origin2, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Input non valido: atteso instanceof ${issue5.expected}, ricevuto ${received}`; - } - return `Input non valido: atteso ${expected}, ricevuto ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Input non valido: atteso ${stringifyPrimitive(issue5.values[0])}`; - return `Opzione non valida: atteso uno tra ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Troppo grande: ${issue5.origin ?? "valore"} deve avere ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementi"}`; - return `Troppo grande: ${issue5.origin ?? "valore"} deve essere ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Troppo piccolo: ${issue5.origin} deve avere ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Troppo piccolo: ${issue5.origin} deve essere ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Stringa non valida: deve terminare con "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Stringa non valida: deve includere "${_issue.includes}"`; - if (_issue.format === "regex") - return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue5.divisor}`; - case "unrecognized_keys": - return `Chiav${issue5.keys.length > 1 ? "i" : "e"} non riconosciut${issue5.keys.length > 1 ? "e" : "a"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Chiave non valida in ${issue5.origin}`; - case "invalid_union": - return "Input non valido"; - case "invalid_element": - return `Valore non valido in ${issue5.origin}`; - default: - return `Input non valido`; +}); +var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => { + var _a4, _b; + $ZodCheck.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); } + }); + if (def.pattern) + (_a4 = inst._zod).check ?? (_a4.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 = () => { + }); +}); +var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); }; -}; -function it_default() { - return { - localeError: error22() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ja.js -var error23 = () => { - const Sizable = { - string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, - file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, - array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, - set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } +}); +var $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase); + $ZodCheckStringFormat.init(inst, def); +}); +var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => { + $ZodCheck.init(inst, def); + const escapedRegex = escapeRegex(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u5165\u529B\u5024", - email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", - url: "URL", - emoji: "\u7D75\u6587\u5B57", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u6642", - date: "ISO\u65E5\u4ED8", - time: "ISO\u6642\u523B", - duration: "ISO\u671F\u9593", - ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", - ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", - cidrv4: "IPv4\u7BC4\u56F2", - cidrv6: "IPv6\u7BC4\u56F2", - base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - json_string: "JSON\u6587\u5B57\u5217", - e164: "E.164\u756A\u53F7", - jwt: "JWT", - template_literal: "\u5165\u529B\u5024" +}); +var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "\u6570\u5024", - array: "\u914D\u5217" +}); +var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue5.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; - } - return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue5.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; - return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue5.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - case "too_big": { - const adj = issue5.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue5.origin ?? "\u5024"}\u306F${issue5.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue5.origin ?? "\u5024"}\u306F${issue5.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - } - case "too_small": { - const adj = issue5.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue5.origin}\u306F${issue5.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue5.origin}\u306F${issue5.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "ends_with") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "includes") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "regex") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u7121\u52B9\u306A\u6570\u5024: ${issue5.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - case "unrecognized_keys": - return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue5.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue5.keys, "\u3001")}`; - case "invalid_key": - return `${issue5.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; - case "invalid_union": - return "\u7121\u52B9\u306A\u5165\u529B"; - case "invalid_element": - return `${issue5.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; - default: - return `\u7121\u52B9\u306A\u5165\u529B`; +}); +function handleCheckPropertyResult(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues(property, result.issues)); + } +} +var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult(result2, payload, def.property)); } + handleCheckPropertyResult(result, payload, def.property); + return; }; -}; -function ja_default() { - return { - localeError: error23() +}); +var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => { + $ZodCheck.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ka.js -var error24 = () => { - const Sizable = { - string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } +}); +var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); + +// node_modules/testing-farm/node_modules/zod/v4/core/doc.js +var Doc = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; } - const FormatDictionary = { - regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", - email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - url: "URL", - emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", - date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", - time: "\u10D3\u10E0\u10DD", - duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", - ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", - cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", - base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", - jwt: "JWT", - template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", - string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", - function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", - array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue5.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; - } - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue5.values[0])}`; - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue5.values, "|")}-\u10D3\u10D0\u10DC`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit}`; - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; - } - if (_issue.format === "ends_with") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; - if (_issue.format === "includes") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; - if (_issue.format === "regex") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue5.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; - case "unrecognized_keys": - return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue5.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue5.origin}-\u10E8\u10D8`; - case "invalid_union": - return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; - case "invalid_element": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue5.origin}-\u10E8\u10D8`; - default: - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + indented(fn) { + this.indent += 1; + fn(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; } - }; + const content = arg; + const lines = content.split("\n").filter((x) => x); + const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); + const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x) => ` ${x}`)]; + return new F(...args, lines.join("\n")); + } }; -function ka_default() { - return { - localeError: error24() - }; -} -// node_modules/testing-farm/node_modules/zod/v4/locales/km.js -var error25 = () => { - const Sizable = { - string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// node_modules/testing-farm/node_modules/zod/v4/core/versions.js +var version = { + major: 4, + minor: 3, + patch: 6 +}; + +// node_modules/testing-farm/node_modules/zod/v4/core/schemas.js +var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { + var _a4; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); } - const FormatDictionary = { - regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", - email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", - url: "URL", - emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", - date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", - time: "\u1798\u17C9\u17C4\u1784 ISO", - duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", - ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", - base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", - json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", - e164: "\u179B\u17C1\u1781 E.164", - jwt: "JWT", - template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u179B\u17C1\u1781", - array: "\u17A2\u17B6\u179A\u17C1 (Array)", - null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue5.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + for (const ch of checks) { + for (const fn of ch._zod.onattach) { + fn(inst); + } + } + if (checks.length === 0) { + (_a4 = inst._zod).deferred ?? (_a4.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks2, ctx) => { + let isAborted = aborted(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.def.when) { + const shouldRun = ch._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; } - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue5.values[0])}`; - return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin} ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; + const currLen = payload.issues.length; + const _ = ch._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError(); } - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin} ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted(payload, currLen); } - if (_issue.format === "ends_with") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; - return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue5.divisor}`; - case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue5.origin}`; - case "invalid_union": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - case "invalid_element": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue5.origin}`; - default: - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - } - }; -}; -function km_default() { - return { - localeError: error25() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/kh.js -function kh_default() { - return km_default(); -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ko.js -var error26 = () => { - const Sizable = { - string: { unit: "\uBB38\uC790", verb: "to have" }, - file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, - array: { unit: "\uAC1C", verb: "to have" }, - set: { unit: "\uAC1C", verb: "to have" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\uC785\uB825", - email: "\uC774\uBA54\uC77C \uC8FC\uC18C", - url: "URL", - emoji: "\uC774\uBAA8\uC9C0", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", - date: "ISO \uB0A0\uC9DC", - time: "ISO \uC2DC\uAC04", - duration: "ISO \uAE30\uAC04", - ipv4: "IPv4 \uC8FC\uC18C", - ipv6: "IPv6 \uC8FC\uC18C", - cidrv4: "IPv4 \uBC94\uC704", - cidrv6: "IPv6 \uBC94\uC704", - base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - json_string: "JSON \uBB38\uC790\uC5F4", - e164: "E.164 \uBC88\uD638", - jwt: "JWT", - template_literal: "\uC785\uB825" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue5.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; - } - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); } - case "invalid_value": - if (issue5.values.length === 1) - return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue5.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue5.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "too_big": { - const adj = issue5.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; - const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue5.origin); - const unit = sizing?.unit ?? "\uC694\uC18C"; - if (sizing) - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue5.maximum.toString()}${unit} ${adj}${suffix}`; - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue5.maximum.toString()} ${adj}${suffix}`; + return payload; + }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted(canary)) { + canary.aborted = true; + return canary; } - case "too_small": { - const adj = issue5.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; - const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue5.origin); - const unit = sizing?.unit ?? "\uC694\uC18C"; - if (sizing) { - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue5.minimum.toString()}${unit} ${adj}${suffix}`; - } - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue5.minimum.toString()} ${adj}${suffix}`; + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; - } - if (_issue.format === "ends_with") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "includes") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "regex") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue5.format}`; + return inst._zod.parse(checkResult, ctx); + }; + inst._zod.run = (payload, ctx) => { + if (ctx.skipChecks) { + return inst._zod.parse(payload, ctx); } - case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue5.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue5.origin}`; - case "invalid_union": - return `\uC798\uBABB\uB41C \uC785\uB825`; - case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue5.origin}`; - default: - return `\uC798\uBABB\uB41C \uC785\uB825`; - } - }; -}; -function ko_default() { - return { - localeError: error26() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/lt.js -var capitalizeFirstCharacter = (text) => { - return text.charAt(0).toUpperCase() + text.slice(1); -}; -function getUnitTypeFromNumber(number8) { - const abs = Math.abs(number8); - const last = abs % 10; - const last2 = abs % 100; - if (last2 >= 11 && last2 <= 19 || last === 0) - return "many"; - if (last === 1) - return "one"; - return "few"; -} -var error27 = () => { - const Sizable = { - string: { - unit: { - one: "simbolis", - few: "simboliai", - many: "simboli\u0173" - }, - verb: { - smaller: { - inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", - notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" - }, - bigger: { - inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", - notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + if (ctx.direction === "backward") { + const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); + if (canary instanceof Promise) { + return canary.then((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); } + return handleCanaryResult(canary, payload, ctx); } - }, - file: { - unit: { - one: "baitas", - few: "baitai", - many: "bait\u0173" - }, - verb: { - smaller: { - inclusive: "turi b\u016Bti ne didesnis kaip", - notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" - }, - bigger: { - inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", - notInclusive: "turi b\u016Bti didesnis kaip" - } + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError(); + return result.then((result2) => runChecks(result2, checks, ctx)); + } + return runChecks(result, checks, ctx); + }; + } + defineLazy(inst, "~standard", () => ({ + validate: (value) => { + try { + const r = safeParse(inst, value); + return r.success ? { value: r.data } : { issues: r.error?.issues }; + } catch (_) { + return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); } }, - array: { - unit: { - one: "element\u0105", - few: "elementus", - many: "element\u0173" - }, - verb: { - smaller: { - inclusive: "turi tur\u0117ti ne daugiau kaip", - notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" - }, - bigger: { - inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", - notInclusive: "turi tur\u0117ti daugiau kaip" - } - } - }, - set: { - unit: { - one: "element\u0105", - few: "elementus", - many: "element\u0173" - }, - verb: { - smaller: { - inclusive: "turi tur\u0117ti ne daugiau kaip", - notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" - }, - bigger: { - inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", - notInclusive: "turi tur\u0117ti daugiau kaip" - } + vendor: "zod", + version: 1 + })); +}); +var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { } - } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; }; - function getSizing(origin2, unitType, inclusive, targetShouldBe) { - const result = Sizable[origin2] ?? null; - if (result === null) - return result; - return { - unit: result.unit[unitType], - verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] +}); +var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat.init(inst, def); + $ZodString.init(inst, def); +}); +var $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid); + $ZodStringFormat.init(inst, def); +}); +var $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 }; - } - const FormatDictionary = { - regex: "\u012Fvestis", - email: "el. pa\u0161to adresas", - url: "URL", - emoji: "jaustukas", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO data ir laikas", - date: "ISO data", - time: "ISO laikas", - duration: "ISO trukm\u0117", - ipv4: "IPv4 adresas", - ipv6: "IPv6 adresas", - cidrv4: "IPv4 tinklo prefiksas (CIDR)", - cidrv6: "IPv6 tinklo prefiksas (CIDR)", - base64: "base64 u\u017Ekoduota eilut\u0117", - base64url: "base64url u\u017Ekoduota eilut\u0117", - json_string: "JSON eilut\u0117", - e164: "E.164 numeris", - jwt: "JWT", - template_literal: "\u012Fvestis" - }; - const TypeDictionary = { - nan: "NaN", - number: "skai\u010Dius", - bigint: "sveikasis skai\u010Dius", - string: "eilut\u0117", - boolean: "login\u0117 reik\u0161m\u0117", - undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", - function: "funkcija", - symbol: "simbolis", - array: "masyvas", - object: "objektas", - null: "nulin\u0117 reik\u0161m\u0117" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue5.expected}`; + const v = versionMap[def.version]; + if (v === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid(v)); + } else + def.pattern ?? (def.pattern = uuid()); + $ZodStringFormat.init(inst, def); +}); +var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email); + $ZodStringFormat.init(inst, def); +}); +var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + const url4 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url4.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); } - return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Privalo b\u016Bti ${stringifyPrimitive(issue5.values[0])}`; - return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue5.values, "|")} pasirinkim\u0173`; - case "too_big": { - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - const sizing = getSizing(issue5.origin, getUnitTypeFromNumber(Number(issue5.maximum)), issue5.inclusive ?? false, "smaller"); - if (sizing?.verb) - return `${capitalizeFirstCharacter(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue5.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; - const adj = issue5.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; - return `${capitalizeFirstCharacter(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue5.maximum.toString()} ${sizing?.unit}`; - } - case "too_small": { - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - const sizing = getSizing(issue5.origin, getUnitTypeFromNumber(Number(issue5.minimum)), issue5.inclusive ?? false, "bigger"); - if (sizing?.verb) - return `${capitalizeFirstCharacter(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue5.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; - const adj = issue5.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; - return `${capitalizeFirstCharacter(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue5.minimum.toString()} ${sizing?.unit}`; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url4.protocol.endsWith(":") ? url4.protocol.slice(0, -1) : url4.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); } - if (_issue.format === "ends_with") - return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; - if (_issue.format === "regex") - return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; - return `Neteisingas ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `Skai\u010Dius privalo b\u016Bti ${issue5.divisor} kartotinis.`; - case "unrecognized_keys": - return `Neatpa\u017Eint${issue5.keys.length > 1 ? "i" : "as"} rakt${issue5.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return "Rastas klaidingas raktas"; - case "invalid_union": - return "Klaidinga \u012Fvestis"; - case "invalid_element": { - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - return `${capitalizeFirstCharacter(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + if (def.normalize) { + payload.value = url4.href; + } else { + payload.value = trimmed; } - default: - return "Klaidinga \u012Fvestis"; + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); } }; -}; -function lt_default() { - return { - localeError: error27() +}); +var $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji()); + $ZodStringFormat.init(inst, def); +}); +var $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid2); + $ZodStringFormat.init(inst, def); +}); +var $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid); + $ZodStringFormat.init(inst, def); +}); +var $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid); + $ZodStringFormat.init(inst, def); +}); +var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date); + $ZodStringFormat.init(inst, def); +}); +var $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time(def)); + $ZodStringFormat.init(inst, def); +}); +var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration); + $ZodStringFormat.init(inst, def); +}); +var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv4); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv4`; +}); +var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv6); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac(def.delimiter)); + $ZodStringFormat.init(inst, def); + inst._zod.bag.format = `mac`; +}); +var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv4); + $ZodStringFormat.init(inst, def); +}); +var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv6); + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } }; +}); +function isValidBase64(data) { + if (data === "") + return true; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } } - -// node_modules/testing-farm/node_modules/zod/v4/locales/mk.js -var error28 = () => { - const Sizable = { - string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } +var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base64); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase64(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function isValidBase64URL(data) { + if (!base64url.test(data)) + return false; + const base645 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base645.padEnd(Math.ceil(base645.length / 4) * 4, "="); + return isValidBase64(padded); +} +var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url); + $ZodStringFormat.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); + }; +}); +var $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e164); + $ZodStringFormat.init(inst, def); +}); +function isValidJWT(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; } - const FormatDictionary = { - regex: "\u0432\u043D\u0435\u0441", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", - url: "URL", - emoji: "\u0435\u043C\u043E\u045F\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0443\u043C", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", - cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", - cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", - base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - json_string: "JSON \u043D\u0438\u0437\u0430", - e164: "E.164 \u0431\u0440\u043E\u0458", - jwt: "JWT", - template_literal: "\u0432\u043D\u0435\u0441" +} +var $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "\u0431\u0440\u043E\u0458", - array: "\u043D\u0438\u0437\u0430" +}); +var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue5.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; - } - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue5.values[0])}`; - return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue5.format}`; +}); +var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { } - case "not_multiple_of": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue5.origin}`; - case "invalid_union": - return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; - case "invalid_element": - return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue5.origin}`; - default: - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + 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) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; }; -}; -function mk_default() { - return { - localeError: error28() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ms.js -var error29 = () => { - const Sizable = { - string: { unit: "aksara", verb: "mempunyai" }, - file: { unit: "bait", verb: "mempunyai" }, - array: { unit: "elemen", verb: "mempunyai" }, - set: { unit: "elemen", verb: "mempunyai" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "alamat e-mel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tarikh masa ISO", - date: "tarikh ISO", - time: "masa ISO", - duration: "tempoh ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "julat IPv4", - cidrv6: "julat IPv6", - base64: "string dikodkan base64", - base64url: "string dikodkan base64url", - json_string: "string JSON", - e164: "nombor E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "nombor" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Input tidak sah: dijangka instanceof ${issue5.expected}, diterima ${received}`; - } - return `Input tidak sah: dijangka ${expected}, diterima ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Input tidak sah: dijangka ${stringifyPrimitive(issue5.values[0])}`; - return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Terlalu besar: dijangka ${issue5.origin ?? "nilai"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: dijangka ${issue5.origin ?? "nilai"} adalah ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Terlalu kecil: dijangka ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: dijangka ${issue5.origin} adalah ${adj}${issue5.minimum.toString()}`; +}); +var $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat.init(inst, def); + $ZodNumber.init(inst, def); +}); +var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = boolean; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - return `String tidak sah: mesti mengandungi "${_issue.includes}"`; - if (_issue.format === "regex") - return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} tidak sah`; + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = bigint; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { } - case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue5.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak sah dalam ${issue5.origin}`; - case "invalid_union": - return "Input tidak sah"; - case "invalid_element": - return `Nilai tidak sah dalam ${issue5.origin}`; - default: - return `Input tidak sah`; - } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; }; -}; -function ms_default() { - return { - localeError: error29() +}); +var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat.init(inst, def); + $ZodBigInt.init(inst, def); +}); +var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/nl.js -var error30 = () => { - const Sizable = { - string: { unit: "tekens", verb: "heeft" }, - file: { unit: "bytes", verb: "heeft" }, - array: { unit: "elementen", verb: "heeft" }, - set: { unit: "elementen", verb: "heeft" } +}); +var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _undefined; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "invoer", - email: "emailadres", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum en tijd", - date: "ISO datum", - time: "ISO tijd", - duration: "ISO duur", - ipv4: "IPv4-adres", - ipv6: "IPv6-adres", - cidrv4: "IPv4-bereik", - cidrv6: "IPv6-bereik", - base64: "base64-gecodeerde tekst", - base64url: "base64 URL-gecodeerde tekst", - json_string: "JSON string", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "invoer" +}); +var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.pattern = _null; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; }; - const TypeDictionary = { - nan: "NaN", - number: "getal" +}); +var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ongeldige invoer: verwacht instanceof ${issue5.expected}, ontving ${received}`; - } - return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue5.values[0])}`; - return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const longName = issue5.origin === "date" ? "laat" : issue5.origin === "string" ? "lang" : "groot"; - if (sizing) - return `Te ${longName}: verwacht dat ${issue5.origin ?? "waarde"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; - return `Te ${longName}: verwacht dat ${issue5.origin ?? "waarde"} ${adj}${issue5.maximum.toString()} is`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const shortName = issue5.origin === "date" ? "vroeg" : issue5.origin === "string" ? "kort" : "klein"; - if (sizing) { - return `Te ${shortName}: verwacht dat ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} ${sizing.verb}`; - } - return `Te ${shortName}: verwacht dat ${issue5.origin} ${adj}${issue5.minimum.toString()} is`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; - } - if (_issue.format === "ends_with") - return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; - if (_issue.format === "includes") - return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; - if (_issue.format === "regex") - return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; - return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue5.format}`; +}); +var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $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) { } - case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue5.divisor} zijn`; - case "unrecognized_keys": - return `Onbekende key${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Ongeldige key in ${issue5.origin}`; - case "invalid_union": - return "Ongeldige invoer"; - case "invalid_element": - return `Ongeldige waarde in ${issue5.origin}`; - default: - return `Ongeldige invoer`; } + const input = payload.value; + const isDate3 = input instanceof Date; + const isValidDate = isDate3 && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate3 ? { received: "Invalid Date" } : {}, + inst + }); + return payload; }; -}; -function nl_default() { - return { - localeError: error30() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/no.js -var error31 = () => { - const Sizable = { - string: { unit: "tegn", verb: "\xE5 ha" }, - file: { unit: "bytes", verb: "\xE5 ha" }, - array: { unit: "elementer", verb: "\xE5 inneholde" }, - set: { unit: "elementer", verb: "\xE5 inneholde" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function handleArrayResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); } - const FormatDictionary = { - regex: "input", - email: "e-postadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkeslett", - date: "ISO-dato", - time: "ISO-klokkeslett", - duration: "ISO-varighet", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spekter", - cidrv6: "IPv6-spekter", - base64: "base64-enkodet streng", - base64url: "base64url-enkodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "tall", - array: "liste" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ugyldig input: forventet instanceof ${issue5.expected}, fikk ${received}`; - } - return `Ugyldig input: forventet ${expected}, fikk ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ugyldig verdi: forventet ${stringifyPrimitive(issue5.values[0])}`; - return `Ugyldig valg: forventet en av ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `For stor(t): forventet ${issue5.origin ?? "value"} til \xE5 ha ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor(t): forventet ${issue5.origin ?? "value"} til \xE5 ha ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `For lite(n): forventet ${issue5.origin} til \xE5 ha ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `For lite(n): forventet ${issue5.origin} til \xE5 ha ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${FormatDictionary[_issue.format] ?? issue5.format}`; + final.value[index] = result.value; +} +var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => { + $ZodType.init(inst, def); + 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 = Array(input.length); + const proms = []; + 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((result2) => handleArrayResult(result2, payload, i))); + } else { + handleArrayResult(result, payload, i); } - case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue5.origin}`; - case "invalid_union": - return "Ugyldig input"; - case "invalid_element": - return `Ugyldig verdi i ${issue5.origin}`; - default: - return `Ugyldig input`; } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; }; -}; -function no_default() { +}); +function handlePropertyResult(result, final, key, input, isOptionalOut) { + if (result.issues.length) { + if (isOptionalOut && !(key in input)) { + return; + } + final.issues.push(...prefixIssues(key, result.issues)); + } + if (result.value === void 0) { + if (key in input) { + final.value[key] = void 0; + } + } else { + final.value[key] = result.value; + } +} +function normalizeDef(def) { + const keys = Object.keys(def.shape); + for (const k of keys) { + if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + } + } + const okeys = optionalKeys(def.shape); return { - localeError: error31() + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) }; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/ota.js -var error32 = () => { - const Sizable = { - string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, - set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +function handleCatchall(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t = _catchall.def.type; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (keySet.has(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((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r, payload, key, input, isOptionalOut); + } } - const FormatDictionary = { - regex: "giren", - email: "epostag\xE2h", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO heng\xE2m\u0131", - date: "ISO tarihi", - time: "ISO zaman\u0131", - duration: "ISO m\xFCddeti", - ipv4: "IPv4 ni\u015F\xE2n\u0131", - ipv6: "IPv6 ni\u015F\xE2n\u0131", - cidrv4: "IPv4 menzili", - cidrv6: "IPv6 menzili", - base64: "base64-\u015Fifreli metin", - base64url: "base64url-\u015Fifreli metin", - json_string: "JSON metin", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "giren" - }; - const TypeDictionary = { - nan: "NaN", - number: "numara", - array: "saf", - null: "gayb" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `F\xE2sit giren: umulan instanceof ${issue5.expected}, al\u0131nan ${received}`; - } - return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `F\xE2sit giren: umulan ${stringifyPrimitive(issue5.values[0])}`; - return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Fazla b\xFCy\xFCk: ${issue5.origin ?? "value"}, ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; - return `Fazla b\xFCy\xFCk: ${issue5.origin ?? "value"}, ${adj}${issue5.maximum.toString()} olmal\u0131yd\u0131.`; + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; + }); +} +var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => { + $ZodType.init(inst, def); + const desc = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Fazla k\xFC\xE7\xFCk: ${issue5.origin}, ${adj}${issue5.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; - } - return `Fazla k\xFC\xE7\xFCk: ${issue5.origin}, ${adj}${issue5.minimum.toString()} olmal\u0131yd\u0131.`; + }); + } + const _normalized = cached(() => normalizeDef(def)); + defineLazy(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v of field.values) + propValues[key].add(v); } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; - if (_issue.format === "ends_with") - return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; - if (_issue.format === "includes") - return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; - if (_issue.format === "regex") - return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; - return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue5.format}`; + } + return propValues; + }); + const isObject4 = isObject2; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject4(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const isOptionalOut = el._zod.optout === "optional"; + const r = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut))); + } else { + handlePropertyResult(r, payload, key, input, isOptionalOut); } - case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue5.divisor} kat\u0131 olmal\u0131yd\u0131.`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} i\xE7in tan\u0131nmayan anahtar var.`; - case "invalid_union": - return "Giren tan\u0131namad\u0131."; - case "invalid_element": - return `${issue5.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; - default: - return `K\u0131ymet tan\u0131namad\u0131.`; } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall(proms, input, payload, ctx, _normalized.value, inst); }; -}; -function ota_default() { - return { - localeError: error32() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ps.js -var error33 = () => { - const Sizable = { - string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, - array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0648\u0631\u0648\u062F\u064A", - email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", - date: "\u0646\u06D0\u067C\u0647", - time: "\u0648\u062E\u062A", - duration: "\u0645\u0648\u062F\u0647", - ipv4: "\u062F IPv4 \u067E\u062A\u0647", - ipv6: "\u062F IPv6 \u067E\u062A\u0647", - cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", - cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", - base64: "base64-encoded \u0645\u062A\u0646", - base64url: "base64url-encoded \u0645\u062A\u0646", - json_string: "JSON \u0645\u062A\u0646", - e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u064A" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0639\u062F\u062F", - array: "\u0627\u0631\u06D0" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue5.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; - } - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; - } - case "invalid_value": - if (issue5.values.length === 1) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue5.values[0])} \u0648\u0627\u06CC`; - } - return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue5.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue5.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; - } - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue5.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} \u0648\u064A`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; - } - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} \u0648\u064A`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; +}); +var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => { + $ZodObject.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached(() => normalizeDef(def)); + const generateFastpass = (shape) => { + const doc = new Doc(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = (key) => { + const k = esc(key); + return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k = esc(key); + const schema = shape[key]; + const isOptionalOut = schema?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } } - if (_issue.format === "ends_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; } - if (_issue.format === "includes") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); } - if (_issue.format === "regex") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; } - return `${FormatDictionary[_issue.format] ?? issue5.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + + `); } - case "not_multiple_of": - return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue5.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; - case "unrecognized_keys": - return `\u0646\u0627\u0633\u0645 ${issue5.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue5.origin} \u06A9\u06D0`; - case "invalid_union": - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; - case "invalid_element": - return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue5.origin} \u06A9\u06D0`; - default: - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn = doc.compile(); + return (payload, ctx) => fn(shape, payload, ctx); }; -}; -function ps_default() { - return { - localeError: error33() + let fastpass; + const isObject4 = isObject2; + const jit = !globalConfig.jitless; + const allowsEval3 = allowsEval; + const fastEnabled = jit && allowsEval3.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject4(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); }; +}); +function handleUnionResults(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r) => !aborted(r)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + }); + return final; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/pl.js -var error34 = () => { - const Sizable = { - string: { unit: "znak\xF3w", verb: "mie\u0107" }, - file: { unit: "bajt\xF3w", verb: "mie\u0107" }, - array: { unit: "element\xF3w", verb: "mie\u0107" }, - set: { unit: "element\xF3w", verb: "mie\u0107" } +var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); + defineLazy(inst._zod, "values", () => { + if (def.options.every((o) => o._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; + }); + defineLazy(inst._zod, "pattern", () => { + if (def.options.every((o) => o._zod.pattern)) { + const patterns = def.options.map((o) => o._zod.pattern); + return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`); + } + return void 0; + }); + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults(results2, payload, inst, ctx); + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function handleExclusiveUnionResults(results, final, inst, ctx) { + const successes = results.filter((r) => r.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; } - const FormatDictionary = { - regex: "wyra\u017Cenie", - email: "adres email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i godzina w formacie ISO", - date: "data w formacie ISO", - time: "godzina w formacie ISO", - duration: "czas trwania ISO", - ipv4: "adres IPv4", - ipv6: "adres IPv6", - cidrv4: "zakres IPv4", - cidrv6: "zakres IPv6", - base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", - base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", - json_string: "ci\u0105g znak\xF3w w formacie JSON", - e164: "liczba E.164", - jwt: "JWT", - template_literal: "wej\u015Bcie" - }; - const TypeDictionary = { - nan: "NaN", - number: "liczba", - array: "tablica" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue5.expected}, otrzymano ${received}`; - } - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; +} +var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => { + $ZodUnion.init(inst, def); + def.inclusive = false; + const single = def.options.length === 1; + const first = def.options[0]._zod.run; + inst._zod.parse = (payload, ctx) => { + if (single) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); } - case "invalid_value": - if (issue5.values.length === 1) - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue5.values[0])}`; - return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + if (!async) + return handleExclusiveUnionResults(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults(results2, payload, inst, ctx); + }); + }; +}); +var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion.init(inst, def); + const _super = inst._zod.parse; + defineLazy(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k, v] of Object.entries(pv)) { + if (!propValues[k]) + propValues[k] = /* @__PURE__ */ new Set(); + for (const val of v) { + propValues[k].add(val); } - return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue5.maximum.toString()}`; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue5.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return propValues; + }); + const disc = cached(() => { + const opts = def.options; + const map3 = /* @__PURE__ */ new Map(); + for (const o of opts) { + const values = o._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); + for (const v of values) { + if (map3.has(v)) { + throw new Error(`Duplicate discriminator value "${String(v)}"`); } - return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; - if (_issue.format === "regex") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; - return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue5.format}`; + map3.set(v, o); } - case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue5.divisor}`; - case "unrecognized_keys": - return `Nierozpoznane klucze${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue5.origin}`; - case "invalid_union": - return "Nieprawid\u0142owe dane wej\u015Bciowe"; - case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue5.origin}`; - default: - return `Nieprawid\u0142owe dane wej\u015Bciowe`; } + return map3; + }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject2(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback) { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + input, + path: [def.discriminator], + inst + }); + return payload; }; -}; -function pl_default() { - return { - localeError: error34() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/pt.js -var error35 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "ter" }, - file: { unit: "bytes", verb: "ter" }, - array: { unit: "itens", verb: "ter" }, - set: { unit: "itens", verb: "ter" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "padr\xE3o", - email: "endere\xE7o de e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "dura\xE7\xE3o ISO", - ipv4: "endere\xE7o IPv4", - ipv6: "endere\xE7o IPv6", - cidrv4: "faixa de IPv4", - cidrv6: "faixa de IPv6", - base64: "texto codificado em base64", - base64url: "URL codificada em base64", - json_string: "texto JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\xFAmero", - null: "nulo" +}); +var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults(payload, left2, right2); + }); + } + return handleIntersectionResults(payload, left, right); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Tipo inv\xE1lido: esperado instanceof ${issue5.expected}, recebido ${received}`; - } - return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; +}); +function mergeValues(a, b) { + if (a === b) { + return { valid: true, data: a }; + } + if (a instanceof Date && b instanceof Date && +a === +b) { + return { valid: true, data: a }; + } + if (isPlainObject2(a) && isPlainObject2(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues(a[key], b[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; } - case "invalid_value": - if (issue5.values.length === 1) - return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue5.values[0])}`; - return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Muito grande: esperado que ${issue5.origin ?? "valor"} tivesse ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Muito grande: esperado que ${issue5.origin ?? "valor"} fosse ${adj}${issue5.maximum.toString()}`; + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Muito pequeno: esperado que ${issue5.origin} tivesse ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Muito pequeno: esperado que ${issue5.origin} fosse ${adj}${issue5.minimum.toString()}`; + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; +} +function handleIntersectionResults(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).l = true; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; - if (_issue.format === "regex") - return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} inv\xE1lido`; + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).r = true; } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue5.divisor}`; - case "unrecognized_keys": - return `Chave${issue5.keys.length > 1 ? "s" : ""} desconhecida${issue5.keys.length > 1 ? "s" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Chave inv\xE1lida em ${issue5.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido em ${issue5.origin}`; - default: - return `Campo inv\xE1lido`; + } else { + result.issues.push(iss); } - }; -}; -function pt_default() { - return { - localeError: error35() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/ru.js -function getRussianPlural(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; } - if (lastDigit === 1) { - return one; + const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; + if (aborted(result)) + return result; + const merged = mergeValues(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); } - return many; + result.value = merged.data; + return result; } -var error36 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0438\u043C\u0432\u043E\u043B", - few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", - many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u0430", - many: "\u0431\u0430\u0439\u0442" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" +var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => { + $ZodType.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u044F", - duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", - base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", - json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0432\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0441\u0438\u0432" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue5.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; - } - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + payload.value = []; + const proms = []; + const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); + const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; + if (!def.rest) { + const tooBig = input.length > items.length; + const tooSmall = input.length < optStart - 1; + if (tooBig || tooSmall) { + payload.issues.push({ + ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, + input, + inst, + origin: "array" + }); + return payload; } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue5.values[0])}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const maxValue = Number(issue5.maximum); - const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue5.maximum.toString()} ${unit}`; - } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue5.maximum.toString()}`; + } + let i = -1; + for (const item of items) { + i++; + if (i >= input.length) { + if (i >= optStart) + continue; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const minValue = Number(issue5.minimum); - const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue5.minimum.toString()} ${unit}`; - } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue5.minimum.toString()}`; + const result = item._zod.run({ + value: input[i], + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); + } else { + handleTupleResult(result, payload, i); } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue5.format}`; + } + if (def.rest) { + const rest = input.slice(items.length); + for (const el of rest) { + i++; + const result = def.rest._zod.run({ + value: el, + issues: [] + }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleTupleResult(result2, payload, i))); + } else { + handleTupleResult(result, payload, i); + } } - case "not_multiple_of": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue5.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue5.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; - case "invalid_element": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue5.origin}`; - default: - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; }; -}; -function ru_default() { - return { - localeError: error36() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/sl.js -var error37 = () => { - const Sizable = { - string: { unit: "znakov", verb: "imeti" }, - file: { unit: "bajtov", verb: "imeti" }, - array: { unit: "elementov", verb: "imeti" }, - set: { unit: "elementov", verb: "imeti" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function handleTupleResult(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues(index, result.issues)); } - const FormatDictionary = { - regex: "vnos", - email: "e-po\u0161tni naslov", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum in \u010Das", - date: "ISO datum", - time: "ISO \u010Das", - duration: "ISO trajanje", - ipv4: "IPv4 naslov", - ipv6: "IPv6 naslov", - cidrv4: "obseg IPv4", - cidrv6: "obseg IPv6", - base64: "base64 kodiran niz", - base64url: "base64url kodiran niz", - json_string: "JSON niz", - e164: "E.164 \u0161tevilka", - jwt: "JWT", - template_literal: "vnos" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0161tevilo", - array: "tabela" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue5.expected}, prejeto ${received}`; + final.value[index] = result.value; +} +var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject2(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[key] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[key] = result.value; + } } - return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue5.values[0])}`; - return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Preveliko: pri\u010Dakovano, da bo ${issue5.origin ?? "vrednost"} imelo ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementov"}`; - return `Preveliko: pri\u010Dakovano, da bo ${issue5.origin ?? "vrednost"} ${adj}${issue5.maximum.toString()}`; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue5.origin} imelo ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); } - return `Premajhno: pri\u010Dakovano, da bo ${issue5.origin} ${adj}${issue5.minimum.toString()}`; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; - return `Neveljaven ${FormatDictionary[_issue.format] ?? issue5.format}`; + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); } - case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue5.divisor}`; - case "unrecognized_keys": - return `Neprepoznan${issue5.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Neveljaven klju\u010D v ${issue5.origin}`; - case "invalid_union": - return "Neveljaven vnos"; - case "invalid_element": - return `Neveljavna vrednost v ${issue5.origin}`; - default: - return "Neveljaven vnos"; - } - }; -}; -function sl_default() { - return { - localeError: error37() - }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/sv.js -var error38 = () => { - const Sizable = { - string: { unit: "tecken", verb: "att ha" }, - file: { unit: "bytes", verb: "att ha" }, - array: { unit: "objekt", verb: "att inneh\xE5lla" }, - set: { unit: "objekt", verb: "att inneh\xE5lla" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "regulj\xE4rt uttryck", - email: "e-postadress", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datum och tid", - date: "ISO-datum", - time: "ISO-tid", - duration: "ISO-varaktighet", - ipv4: "IPv4-intervall", - ipv6: "IPv6-intervall", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodad str\xE4ng", - base64url: "base64url-kodad str\xE4ng", - json_string: "JSON-str\xE4ng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "mall-literal" - }; - const TypeDictionary = { - nan: "NaN", - number: "antal", - array: "lista" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue5.expected}, fick ${received}`; + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); } - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue5.values[0])}`; - return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "element"}`; + const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length; + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } } - return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())), + input: key, + path: [key], + inst + }); + } + continue; } - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues(key, result.issues)); + } + payload.value[keyResult.value] = result.value; } - if (_issue.format === "ends_with") - return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; - return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `Ogiltig nyckel i ${issue5.origin ?? "v\xE4rdet"}`; - case "invalid_union": - return "Ogiltig input"; - case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue5.origin ?? "v\xE4rdet"}`; - default: - return `Ogiltig input`; } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; }; -}; -function sv_default() { - return { - localeError: error38() +}); +var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; }; +}); +function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes.has(typeof key)) { + final.issues.push(...prefixIssues(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); } - -// node_modules/testing-farm/node_modules/zod/v4/locales/ta.js -var error39 = () => { - const Sizable = { - string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } +var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult(result2, payload))); + } else + handleSetResult(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function handleSetResult(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); } - const FormatDictionary = { - regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", - email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", - time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", - ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", - e164: "E.164 \u0B8E\u0BA3\u0BCD", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0B8E\u0BA3\u0BCD", - array: "\u0B85\u0BA3\u0BBF", - null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + final.value.add(result.value); +} +var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => { + $ZodType.init(inst, def); + const values = getEnumValues(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`); + 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; }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue5.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; - } - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue5.values[0])}`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue5.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue5.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin} ${adj}${issue5.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "ends_with") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "includes") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "regex") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue5.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - case "unrecognized_keys": - return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue5.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; - case "invalid_union": - return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; - case "invalid_element": - return `${issue5.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; - default: - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; +}); +var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => { + $ZodType.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; }; -}; -function ta_default() { - return { - localeError: error39() +}); +var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; }; -} - -// node_modules/testing-farm/node_modules/zod/v4/locales/th.js -var error40 = () => { - const Sizable = { - string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } +}); +var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError(); + } + payload.value = _out; + return payload; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function handleOptionalResult(result, input) { + if (result.issues.length && input === void 0) { + return { issues: [], value: void 0 }; } - const FormatDictionary = { - regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", - email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", - url: "URL", - emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", - time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", - ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", - cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", - cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", - base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", - base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", - json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", - e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", - jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", - template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + return result; +} +var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; + }); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r) => handleOptionalResult(r, payload.value)); + return handleOptionalResult(result, payload.value); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); }; - const TypeDictionary = { - nan: "NaN", - number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", - array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", - null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" +}); +var $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => { + $ZodOptional.init(inst, def); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue5.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; - } - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue5.values[0])}`; - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; - if (_issue.format === "regex") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue5.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; - case "unrecognized_keys": - return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue5.keys, ", ")}`; - case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue5.origin}`; - case "invalid_union": - return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; - case "invalid_element": - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue5.origin}`; - default: - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; - } +}); +var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0; + }); + defineLazy(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...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); }; -}; -function th_default() { - return { - localeError: error40() +}); +var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult(result2, def)); + } + return handleDefaultResult(result, def); }; +}); +function handleDefaultResult(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/tr.js -var error41 = () => { +var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.optin = "optional"; + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => { + const v = def.innerType._zod.values; + return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; + }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult(result2, inst)); + } + return handleNonOptionalResult(result, inst); + }; +}); +function handleNonOptionalResult(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; +} +var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; +}); +var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) + }, + input: payload.value + }); + payload.issues = []; + } + return payload; + }; +}); +var $ZodNaN = /* @__PURE__ */ $constructor("$ZodNaN", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; +}); +var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult(right2, def.in, ctx)); + } + return handlePipeResult(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult(left2, def.out, ctx)); + } + return handlePipeResult(left, def.out, ctx); + }; +}); +function handlePipeResult(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues }, ctx); +} +var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "values", () => def.in._zod.values); + defineLazy(inst._zod, "optin", () => def.in._zod.optin); + defineLazy(inst._zod, "optout", () => def.out._zod.optout); + defineLazy(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult(left2, def, ctx)); + } + return handleCodecAResult(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult(right2, def, ctx)); + } + return handleCodecAResult(right, def, ctx); + } + }; +}); +function handleCodecAResult(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx)); + } + return handleCodecTxResult(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx)); + } + return handleCodecTxResult(result, transformed, def.in, ctx); + } +} +function handleCodecTxResult(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); +} +var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy(inst._zod, "values", () => def.innerType._zod.values); + defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult); + } + return handleReadonlyResult(result); + }; +}); +function handleReadonlyResult(payload) { + payload.value = Object.freeze(payload.value); + return payload; +} +var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => { + $ZodType.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes.has(typeof part)) { + regexParts.push(escapeRegex(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); + } + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; +}); +var $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) => { + $ZodType.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse(inst._def.output, result); + } + return result; + }; + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); + } + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync(inst._def.output, result); + } + return result; + }; + }; + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; + } + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; + }; + inst.input = (...args) => { + const F = inst.constructor; + if (Array.isArray(args[0])) { + return new F({ + type: "function", + input: new $ZodTuple({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F = inst.constructor; + return new F({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; +}); +var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => { + $ZodType.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; +}); +var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => { + $ZodType.init(inst, def); + defineLazy(inst._zod, "innerType", () => def.getter()); + defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); + }; +}); +var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => { + $ZodCheck.init(inst, def); + $ZodType.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r = def.fn(input); + if (r instanceof Promise) { + return r.then((r2) => handleRefineResult(r2, payload, input, inst)); + } + handleRefineResult(r, payload, input, inst); + return; + }; +}); +function handleRefineResult(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue2(_iss)); + } +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/index.js +var locales_exports = {}; +__export(locales_exports, { + ar: () => ar_default, + az: () => az_default, + be: () => be_default, + bg: () => bg_default, + ca: () => ca_default, + cs: () => cs_default, + da: () => da_default, + de: () => de_default, + en: () => en_default, + eo: () => eo_default, + es: () => es_default, + fa: () => fa_default, + fi: () => fi_default, + fr: () => fr_default, + frCA: () => fr_CA_default, + he: () => he_default, + hu: () => hu_default, + hy: () => hy_default, + id: () => id_default, + is: () => is_default, + it: () => it_default, + ja: () => ja_default, + ka: () => ka_default, + kh: () => kh_default, + km: () => km_default, + ko: () => ko_default, + lt: () => lt_default, + mk: () => mk_default, + ms: () => ms_default, + nl: () => nl_default, + no: () => no_default, + ota: () => ota_default, + pl: () => pl_default, + ps: () => ps_default, + pt: () => pt_default, + ru: () => ru_default, + sl: () => sl_default, + sv: () => sv_default, + ta: () => ta_default, + th: () => th_default, + tr: () => tr_default, + ua: () => ua_default, + uk: () => uk_default, + ur: () => ur_default, + uz: () => uz_default, + vi: () => vi_default, + yo: () => yo_default, + zhCN: () => zh_CN_default, + zhTW: () => zh_TW_default +}); + +// node_modules/testing-farm/node_modules/zod/v4/locales/ar.js +var error2 = () => { const Sizable = { - string: { unit: "karakter", verb: "olmal\u0131" }, - file: { unit: "bayt", verb: "olmal\u0131" }, - array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, - set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "girdi", - email: "e-posta adresi", - url: "URL", - emoji: "emoji", + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -45126,102 +45294,103 @@ var error41 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO tarih ve saat", - date: "ISO tarih", - time: "ISO saat", - duration: "ISO s\xFCre", - ipv4: "IPv4 adresi", - ipv6: "IPv6 adresi", - cidrv4: "IPv4 aral\u0131\u011F\u0131", - cidrv6: "IPv6 aral\u0131\u011F\u0131", - base64: "base64 ile \u015Fifrelenmi\u015F metin", - base64url: "base64url ile \u015Fifrelenmi\u015F metin", - json_string: "JSON dizesi", - e164: "E.164 say\u0131s\u0131", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", jwt: "JWT", - template_literal: "\u015Eablon dizesi" + template_literal: "\u0645\u062F\u062E\u0644" }; const TypeDictionary = { nan: "NaN" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue5.expected}, al\u0131nan ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue4.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; } - return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue5.values[0])}`; - return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive(issue4.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `\xC7ok b\xFCy\xFCk: beklenen ${issue5.origin ?? "de\u011Fer"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; - return `\xC7ok b\xFCy\xFCk: beklenen ${issue5.origin ?? "de\u011Fer"} ${adj}${issue5.maximum.toString()}`; + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue4.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue4.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue5.origin} ${adj}${issue5.minimum.toString()}`; + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue4.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue4.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; + const _issue = issue4; if (_issue.format === "starts_with") - return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue4.prefix}"`; if (_issue.format === "ends_with") - return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; if (_issue.format === "includes") - return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; if (_issue.format === "regex") - return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; - return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue5.format}`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; } case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue5.divisor} ile tam b\xF6l\xFCnebilmeli`; + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue4.divisor}`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue5.keys.length > 1 ? "lar" : ""}: ${joinValues(issue5.keys, ", ")}`; + return `\u0645\u0639\u0631\u0641${issue4.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue4.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue4.keys, "\u060C ")}`; case "invalid_key": - return `${issue5.origin} i\xE7inde ge\xE7ersiz anahtar`; + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue4.origin}`; case "invalid_union": - return "Ge\xE7ersiz de\u011Fer"; + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; case "invalid_element": - return `${issue5.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue4.origin}`; default: - return `Ge\xE7ersiz de\u011Fer`; + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; } }; }; -function tr_default() { +function ar_default() { return { - localeError: error41() + localeError: error2() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/uk.js -var error42 = () => { +// node_modules/testing-farm/node_modules/zod/v4/locales/az.js +var error3 = () => { const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + regex: "input", + email: "email address", url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + emoji: "emoji", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -45232,221 +45401,259 @@ var error42 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", - date: "\u0434\u0430\u0442\u0430 ISO", - time: "\u0447\u0430\u0441 ISO", - duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", - ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", - ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", - cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", - cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", - base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", - base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", - json_string: "\u0440\u044F\u0434\u043E\u043A JSON", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", jwt: "JWT", - template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + template_literal: "input" }; const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0438\u0432" + nan: "NaN" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue5.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue4.expected}, daxil olan ${received}`; } - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue5.values[0])}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue4.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue5.maximum.toString()}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue4.origin ?? "d\u0259y\u0259r"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue4.origin ?? "d\u0259y\u0259r"} ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin} \u0431\u0443\u0434\u0435 ${adj}${issue5.minimum.toString()}`; + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue4.origin} ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; + const _issue = issue4; if (_issue.format === "starts_with") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; if (_issue.format === "ends_with") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; if (_issue.format === "includes") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; if (_issue.format === "regex") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue5.format}`; + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue5.divisor}`; + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue4.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue5.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue5.keys, ", ")}`; + return `Tan\u0131nmayan a\xE7ar${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue5.origin}`; + return `${issue4.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; case "invalid_union": - return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + return "Yanl\u0131\u015F d\u0259y\u0259r"; case "invalid_element": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue5.origin}`; + return `${issue4.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; default: - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + return `Yanl\u0131\u015F d\u0259y\u0259r`; } }; }; -function uk_default() { +function az_default() { return { - localeError: error42() + localeError: error3() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/ua.js -function ua_default() { - return uk_default(); +// node_modules/testing-farm/node_modules/zod/v4/locales/be.js +function getBelarusianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; } - -// node_modules/testing-farm/node_modules/zod/v4/locales/ur.js -var error43 = () => { +var error4 = () => { const Sizable = { - string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, - file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, - array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, - set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u0627\u0646 \u067E\u0679", - email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", - uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", - nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", - guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", - ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", - xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", - ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", - date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", - time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", - duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", - ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", - ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", - cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", - cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", - base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", - e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", - jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", - template_literal: "\u0627\u0646 \u067E\u0679" + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" }; const TypeDictionary = { nan: "NaN", - number: "\u0646\u0645\u0628\u0631", - array: "\u0622\u0631\u06D2", - null: "\u0646\u0644" + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue5.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue4.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; } - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue5.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue5.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + if (issue4.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive(issue4.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue5.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue5.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue5.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getBelarusianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue4.maximum.toString()} ${unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue5.origin} \u06A9\u06D2 ${adj}${issue5.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + const minValue = Number(issue4.minimum); + const unit = getBelarusianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue4.minimum.toString()} ${unit}`; } - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue5.origin} \u06A9\u0627 ${adj}${issue5.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - } + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; if (_issue.format === "ends_with") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; if (_issue.format === "includes") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; if (_issue.format === "regex") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue5.format}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue5.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue4.divisor}`; case "unrecognized_keys": - return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue5.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue5.keys, "\u060C ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue4.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `${issue5.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue4.origin}`; case "invalid_union": - return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; case "invalid_element": - return `${issue5.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue4.origin}`; default: - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; } }; }; -function ur_default() { +function be_default() { return { - localeError: error43() + localeError: error4() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/uz.js -var error44 = () => { +// node_modules/testing-farm/node_modules/zod/v4/locales/bg.js +var error5 = () => { const Sizable = { - string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, - file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, - array: { unit: "element", verb: "bo\u2018lishi kerak" }, - set: { unit: "element", verb: "bo\u2018lishi kerak" } + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "kirish", - email: "elektron pochta manzili", + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", url: "URL", - emoji: "emoji", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -45457,104 +45664,115 @@ var error44 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO sana va vaqti", - date: "ISO sana", - time: "ISO vaqt", - duration: "ISO davomiylik", - ipv4: "IPv4 manzil", - ipv6: "IPv6 manzil", - mac: "MAC manzil", - cidrv4: "IPv4 diapazon", - cidrv6: "IPv6 diapazon", - base64: "base64 kodlangan satr", - base64url: "base64url kodlangan satr", - json_string: "JSON satr", - e164: "E.164 raqam", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", jwt: "JWT", - template_literal: "kirish" + template_literal: "\u0432\u0445\u043E\u0434" }; const TypeDictionary = { nan: "NaN", - number: "raqam", - array: "massiv" + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue5.expected}, qabul qilingan ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue4.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; } - return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue5.values[0])}`; - return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive(issue4.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `Juda katta: kutilgan ${issue5.origin ?? "qiymat"} ${adj}${issue5.maximum.toString()} ${sizing.unit} ${sizing.verb}`; - return `Juda katta: kutilgan ${issue5.origin ?? "qiymat"} ${adj}${issue5.maximum.toString()}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `Juda kichik: kutilgan ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - return `Juda kichik: kutilgan ${issue5.origin} ${adj}${issue5.minimum.toString()}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } if (_issue.format === "ends_with") - return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; if (_issue.format === "includes") - return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; if (_issue.format === "regex") - return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; - return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue5.format}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `Noto\u2018g\u2018ri raqam: ${issue5.divisor} ning karralisi bo\u2018lishi kerak`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue4.divisor}`; case "unrecognized_keys": - return `Noma\u2019lum kalit${issue5.keys.length > 1 ? "lar" : ""}: ${joinValues(issue5.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue4.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `${issue5.origin} dagi kalit noto\u2018g\u2018ri`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue4.origin}`; case "invalid_union": - return "Noto\u2018g\u2018ri kirish"; + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; case "invalid_element": - return `${issue5.origin} da noto\u2018g\u2018ri qiymat`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue4.origin}`; default: - return `Noto\u2018g\u2018ri kirish`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; } }; }; -function uz_default() { +function bg_default() { return { - localeError: error44() + localeError: error5() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/vi.js -var error45 = () => { +// node_modules/testing-farm/node_modules/zod/v4/locales/ca.js +var error6 = () => { const Sizable = { - string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, - file: { unit: "byte", verb: "c\xF3" }, - array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, - set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u0111\u1EA7u v\xE0o", - email: "\u0111\u1ECBa ch\u1EC9 email", + regex: "entrada", + email: "adre\xE7a electr\xF2nica", url: "URL", emoji: "emoji", uuid: "UUID", @@ -45567,105 +45785,105 @@ var error45 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ng\xE0y gi\u1EDD ISO", - date: "ng\xE0y ISO", - time: "gi\u1EDD ISO", - duration: "kho\u1EA3ng th\u1EDDi gian ISO", - ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", - ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", - cidrv4: "d\u1EA3i IPv4", - cidrv6: "d\u1EA3i IPv6", - base64: "chu\u1ED7i m\xE3 h\xF3a base64", - base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", - json_string: "chu\u1ED7i JSON", - e164: "s\u1ED1 E.164", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", jwt: "JWT", - template_literal: "\u0111\u1EA7u v\xE0o" + template_literal: "entrada" }; const TypeDictionary = { - nan: "NaN", - number: "s\u1ED1", - array: "m\u1EA3ng" + nan: "NaN" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue5.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue4.expected}, s'ha rebut ${received}`; } - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue5.values[0])}`; - return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue4.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue4.values, " o ")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue4.origin); if (sizing) - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue5.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue5.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue5.maximum.toString()}`; + return `Massa gran: s'esperava que ${issue4.origin ?? "el valor"} contingu\xE9s ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue4.origin ?? "el valor"} fos ${adj} ${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + return `Massa petit: s'esperava que ${issue4.origin} contingu\xE9s ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; } - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue5.origin} ${adj}${issue5.minimum.toString()}`; + return `Massa petit: s'esperava que ${issue4.origin} fos ${adj} ${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } if (_issue.format === "ends_with") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; if (_issue.format === "includes") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; if (_issue.format === "regex") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} kh\xF4ng h\u1EE3p l\u1EC7`; + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue5.divisor}`; + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue4.divisor}`; case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue5.keys, ", ")}`; + return `Clau${issue4.keys.length > 1 ? "s" : ""} no reconeguda${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue5.origin}`; + return `Clau inv\xE0lida a ${issue4.origin}`; case "invalid_union": - return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + return "Entrada inv\xE0lida"; + // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general case "invalid_element": - return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue5.origin}`; + return `Element inv\xE0lid a ${issue4.origin}`; default: - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + return `Entrada inv\xE0lida`; } }; }; -function vi_default() { +function ca_default() { return { - localeError: error45() + localeError: error6() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/zh-CN.js -var error46 = () => { +// node_modules/testing-farm/node_modules/zod/v4/locales/cs.js +var error7 = () => { const Sizable = { - string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, - file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, - array: { unit: "\u9879", verb: "\u5305\u542B" }, - set: { unit: "\u9879", verb: "\u5305\u542B" } + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u8F93\u5165", - email: "\u7535\u5B50\u90AE\u4EF6", + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", url: "URL", - emoji: "\u8868\u60C5\u7B26\u53F7", + emoji: "emoji", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -45676,104 +45894,106 @@ var error46 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO\u65E5\u671F\u65F6\u95F4", - date: "ISO\u65E5\u671F", - time: "ISO\u65F6\u95F4", - duration: "ISO\u65F6\u957F", - ipv4: "IPv4\u5730\u5740", - ipv6: "IPv6\u5730\u5740", - cidrv4: "IPv4\u7F51\u6BB5", - cidrv6: "IPv6\u7F51\u6BB5", - base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", - base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", - json_string: "JSON\u5B57\u7B26\u4E32", - e164: "E.164\u53F7\u7801", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", jwt: "JWT", - template_literal: "\u8F93\u5165" + template_literal: "vstup" }; const TypeDictionary = { nan: "NaN", - number: "\u6570\u5B57", - array: "\u6570\u7EC4", - null: "\u7A7A\u503C(null)" + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue5.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue4.expected}, obdr\u017Eeno ${received}`; } - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue5.values[0])}`; - return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue4.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue5.origin ?? "\u503C"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue5.origin ?? "\u503C"} ${adj}${issue5.maximum.toString()}`; + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue4.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue4.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue4.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue4.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue5.origin} ${adj}${issue5.minimum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue4.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; + const _issue = issue4; if (_issue.format === "starts_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; if (_issue.format === "ends_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; if (_issue.format === "includes") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; if (_issue.format === "regex") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; - return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue5.format}`; + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue5.divisor} \u7684\u500D\u6570`; + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue4.divisor}`; case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue5.keys, ", ")}`; + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `${issue5.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + return `Neplatn\xFD kl\xED\u010D v ${issue4.origin}`; case "invalid_union": - return "\u65E0\u6548\u8F93\u5165"; + return "Neplatn\xFD vstup"; case "invalid_element": - return `${issue5.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + return `Neplatn\xE1 hodnota v ${issue4.origin}`; default: - return `\u65E0\u6548\u8F93\u5165`; + return `Neplatn\xFD vstup`; } }; }; -function zh_CN_default() { +function cs_default() { return { - localeError: error46() + localeError: error7() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/zh-TW.js -var error47 = () => { +// node_modules/testing-farm/node_modules/zod/v4/locales/da.js +var error8 = () => { const Sizable = { - string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, - file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, - array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, - set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u8F38\u5165", - email: "\u90F5\u4EF6\u5730\u5740", + regex: "input", + email: "e-mailadresse", url: "URL", emoji: "emoji", uuid: "UUID", @@ -45786,104 +46006,112 @@ var error47 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO \u65E5\u671F\u6642\u9593", - date: "ISO \u65E5\u671F", - time: "ISO \u6642\u9593", - duration: "ISO \u671F\u9593", - ipv4: "IPv4 \u4F4D\u5740", - ipv6: "IPv6 \u4F4D\u5740", - cidrv4: "IPv4 \u7BC4\u570D", - cidrv6: "IPv6 \u7BC4\u570D", - base64: "base64 \u7DE8\u78BC\u5B57\u4E32", - base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", - json_string: "JSON \u5B57\u4E32", - e164: "E.164 \u6578\u503C", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", jwt: "JWT", - template_literal: "\u8F38\u5165" + template_literal: "input" }; const TypeDictionary = { - nan: "NaN" + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue5.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ugyldigt input: forventede instanceof ${issue4.expected}, fik ${received}`; } - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + return `Ugyldigt input: forventede ${expected}, fik ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue5.values[0])}`; - return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive(issue4.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; if (sizing) - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue5.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue5.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue5.maximum.toString()}`; + return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; if (sizing) { - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue5.origin} \u61C9\u70BA ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; } - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue5.origin} \u61C9\u70BA ${adj}${issue5.minimum.toString()}`; + return `For lille: forventede ${origin2} havde ${adj} ${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; - } + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; if (_issue.format === "ends_with") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; if (_issue.format === "includes") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; if (_issue.format === "regex") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; - return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue5.format}`; + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue5.divisor} \u7684\u500D\u6578`; + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue4.divisor}`; case "unrecognized_keys": - return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue5.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue5.keys, "\u3001")}`; + return `${issue4.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `${issue5.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + return `Ugyldig n\xF8gle i ${issue4.origin}`; case "invalid_union": - return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + return "Ugyldigt input: matcher ingen af de tilladte typer"; case "invalid_element": - return `${issue5.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + return `Ugyldig v\xE6rdi i ${issue4.origin}`; default: - return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + return `Ugyldigt input`; } }; }; -function zh_TW_default() { +function da_default() { return { - localeError: error47() + localeError: error8() }; } -// node_modules/testing-farm/node_modules/zod/v4/locales/yo.js -var error48 = () => { +// node_modules/testing-farm/node_modules/zod/v4/locales/de.js +var error9 = () => { const Sizable = { - string: { unit: "\xE0mi", verb: "n\xED" }, - file: { unit: "bytes", verb: "n\xED" }, - array: { unit: "nkan", verb: "n\xED" }, - set: { unit: "nkan", verb: "n\xED" } + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", - email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + regex: "Eingabe", + email: "E-Mail-Adresse", url: "URL", - emoji: "emoji", + emoji: "Emoji", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -45894,30938 +46122,20171 @@ var error48 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "\xE0k\xF3k\xF2 ISO", - date: "\u1ECDj\u1ECD\u0301 ISO", - time: "\xE0k\xF3k\xF2 ISO", - duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", - ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", - ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", - cidrv4: "\xE0gb\xE8gb\xE8 IPv4", - cidrv6: "\xE0gb\xE8gb\xE8 IPv6", - base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", - base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", - json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", - e164: "n\u1ECD\u0301mb\xE0 E.164", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", jwt: "JWT", - template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + template_literal: "Eingabe" }; const TypeDictionary = { nan: "NaN", - number: "n\u1ECD\u0301mb\xE0", - array: "akop\u1ECD" + number: "Zahl", + array: "Array" }; - return (issue5) => { - switch (issue5.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType(issue5.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue5.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue4.expected}, erhalten ${received}`; } - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; } case "invalid_value": - if (issue5.values.length === 1) - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue5.values[0])}`; - return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue5.values, "|")}`; + if (issue4.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue4.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue4.values, "|")}`; case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue5.origin ?? "iye"} ${sizing.verb} ${adj}${issue5.maximum} ${sizing.unit}`; - return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue5.maximum}`; + return `Zu gro\xDF: erwartet, dass ${issue4.origin ?? "Wert"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue4.origin ?? "Wert"} ${adj}${issue4.maximum.toString()} ist`; } case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum} ${sizing.unit}`; - return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue5.minimum}`; + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue4.origin} ${adj}${issue4.minimum.toString()} ist`; } case "invalid_format": { - const _issue = issue5; + const _issue = issue4; if (_issue.format === "starts_with") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; if (_issue.format === "ends_with") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; if (_issue.format === "includes") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; if (_issue.format === "regex") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; - return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue5.format}`; + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue5.divisor}`; + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue4.divisor} sein`; case "unrecognized_keys": - return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue5.keys, ", ")}`; + return `${issue4.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue4.keys, ", ")}`; case "invalid_key": - return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue5.origin}`; + return `Ung\xFCltiger Schl\xFCssel in ${issue4.origin}`; case "invalid_union": - return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + return "Ung\xFCltige Eingabe"; case "invalid_element": - return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue5.origin}`; + return `Ung\xFCltiger Wert in ${issue4.origin}`; default: - return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + return `Ung\xFCltige Eingabe`; } }; }; -function yo_default() { +function de_default() { return { - localeError: error48() + localeError: error9() }; } -// node_modules/testing-farm/node_modules/zod/v4/core/registries.js -var _a; -var $output = /* @__PURE__ */ Symbol("ZodOutput"); -var $input = /* @__PURE__ */ Symbol("ZodInput"); -var $ZodRegistry = class { - constructor() { - this._map = /* @__PURE__ */ new WeakMap(); - this._idmap = /* @__PURE__ */ new Map(); +// node_modules/testing-farm/node_modules/zod/v4/locales/en.js +var error10 = () => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - add(schema, ..._meta) { - const meta6 = _meta[0]; - this._map.set(schema, meta6); - if (meta6 && typeof meta6 === "object" && "id" in meta6) { - this._idmap.set(meta6.id, schema); + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue4.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Too big: expected ${issue4.origin ?? "value"} to have ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue4.origin ?? "value"} to be ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Too small: expected ${issue4.origin} to have ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue4.origin} to be ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue4.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue4.origin}`; + case "invalid_union": + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue4.origin}`; + default: + return `Invalid input`; } - return this; - } - clear() { - this._map = /* @__PURE__ */ new WeakMap(); - this._idmap = /* @__PURE__ */ new Map(); - return this; + }; +}; +function en_default() { + return { + localeError: error10() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/eo.js +var error11 = () => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - remove(schema) { - const meta6 = this._map.get(schema); - if (meta6 && typeof meta6 === "object" && "id" in meta6) { - this._idmap.delete(meta6.id); + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue4.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue4.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue4.origin ?? "valoro"} havu ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue4.origin ?? "valoro"} havu ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue4.origin} havu ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue4.origin} estu ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue4.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue4.keys.length > 1 ? "j" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue4.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue4.origin}`; + default: + return `Nevalida enigo`; } - this._map.delete(schema); - return this; + }; +}; +function eo_default() { + return { + localeError: error11() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/es.js +var error12 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - get(schema) { - const p = schema._zod.parent; - if (p) { - const pm = { ...this.get(p) ?? {} }; - delete pm.id; - const f = { ...pm, ...this._map.get(schema) }; - return Object.keys(f).length ? f : void 0; + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue4.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue4.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Llave${issue4.keys.length > 1 ? "s" : ""} desconocida${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + default: + return `Entrada inv\xE1lida`; } - return this._map.get(schema); - } - has(schema) { - return this._map.has(schema); - } + }; }; -function registry() { - return new $ZodRegistry(); +function es_default() { + return { + localeError: error12() + }; } -(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry()); -var globalRegistry = globalThis.__zod_globalRegistry; -// node_modules/testing-farm/node_modules/zod/v4/core/api.js -// @__NO_SIDE_EFFECTS__ -function _string(Class4, params) { - return new Class4({ - type: "string", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedString(Class4, params) { - return new Class4({ - type: "string", - coerce: true, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _email(Class4, params) { - return new Class4({ - type: "string", - format: "email", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _guid(Class4, params) { - return new Class4({ - type: "string", - format: "guid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuid(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuidv4(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v4", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuidv6(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v6", - ...normalizeParams(params) - }); +// node_modules/testing-farm/node_modules/zod/v4/locales/fa.js +var error13 = () => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue4.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue4.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive(issue4.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues(issue4.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue4.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue4.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${FormatDictionary[_issue.format] ?? issue4.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue4.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue4.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue4.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue4.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + }; +}; +function fa_default() { + return { + localeError: error13() + }; } -// @__NO_SIDE_EFFECTS__ -function _uuidv7(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v7", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _url(Class4, params) { - return new Class4({ - type: "string", - format: "url", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _emoji2(Class4, params) { - return new Class4({ - type: "string", - format: "emoji", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _nanoid(Class4, params) { - return new Class4({ - type: "string", - format: "nanoid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _cuid(Class4, params) { - return new Class4({ - type: "string", - format: "cuid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _cuid2(Class4, params) { - return new Class4({ - type: "string", - format: "cuid2", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _ulid(Class4, params) { - return new Class4({ - type: "string", - format: "ulid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _xid(Class4, params) { - return new Class4({ - type: "string", - format: "xid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _ksuid(Class4, params) { - return new Class4({ - type: "string", - format: "ksuid", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _ipv4(Class4, params) { - return new Class4({ - type: "string", - format: "ipv4", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _ipv6(Class4, params) { - return new Class4({ - type: "string", - format: "ipv6", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _mac(Class4, params) { - return new Class4({ - type: "string", - format: "mac", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _cidrv4(Class4, params) { - return new Class4({ - type: "string", - format: "cidrv4", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _cidrv6(Class4, params) { - return new Class4({ - type: "string", - format: "cidrv6", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _base64(Class4, params) { - return new Class4({ - type: "string", - format: "base64", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _base64url(Class4, params) { - return new Class4({ - type: "string", - format: "base64url", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _e164(Class4, params) { - return new Class4({ - type: "string", - format: "e164", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _jwt(Class4, params) { - return new Class4({ - type: "string", - format: "jwt", - check: "string_format", - abort: false, - ...normalizeParams(params) - }); -} -var TimePrecision = { - Any: null, - Minute: -1, - Second: 0, - Millisecond: 3, - Microsecond: 6 + +// node_modules/testing-farm/node_modules/zod/v4/locales/fi.js +var error14 = () => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue4.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue4.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue4.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue4.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue4.divisor} monikerta`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; + } + }; }; -// @__NO_SIDE_EFFECTS__ -function _isoDateTime(Class4, params) { - return new Class4({ - type: "string", - format: "datetime", - check: "string_format", - offset: false, - local: false, - precision: null, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _isoDate(Class4, params) { - return new Class4({ - type: "string", - format: "date", - check: "string_format", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _isoTime(Class4, params) { - return new Class4({ - type: "string", - format: "time", - check: "string_format", - precision: null, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _isoDuration(Class4, params) { - return new Class4({ - type: "string", - format: "duration", - check: "string_format", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _number(Class4, params) { - return new Class4({ - type: "number", - checks: [], - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedNumber(Class4, params) { - return new Class4({ - type: "number", - coerce: true, - checks: [], - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _int(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "safeint", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _float32(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "float32", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _float64(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "float64", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _int32(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "int32", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uint32(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "uint32", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _boolean(Class4, params) { - return new Class4({ - type: "boolean", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedBoolean(Class4, params) { - return new Class4({ - type: "boolean", - coerce: true, - ...normalizeParams(params) - }); +function fi_default() { + return { + localeError: error14() + }; } -// @__NO_SIDE_EFFECTS__ -function _bigint(Class4, params) { - return new Class4({ - type: "bigint", - ...normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/fr.js +var error15 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombre", + array: "tableau" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entr\xE9e invalide : instanceof ${issue4.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue4.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue4.values, "|")} attendue`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop grand : ${issue4.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue4.origin ?? "valeur"} doit \xEAtre ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Trop petit : ${issue4.origin} doit ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : ${issue4.origin} doit \xEAtre ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue4.keys.length > 1 ? "s" : ""} non reconnue${issue4.keys.length > 1 ? "s" : ""} : ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue4.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue4.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_default() { + return { + localeError: error15() + }; } -// @__NO_SIDE_EFFECTS__ -function _coercedBigint(Class4, params) { - return new Class4({ - type: "bigint", - coerce: true, - ...normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/fr-CA.js +var error16 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue4.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue4.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop grand : attendu que ${issue4.origin ?? "la valeur"} ait ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue4.origin ?? "la valeur"} soit ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Trop petit : attendu que ${issue4.origin} ait ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue4.origin} soit ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue4.keys.length > 1 ? "s" : ""} non reconnue${issue4.keys.length > 1 ? "s" : ""} : ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue4.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue4.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_CA_default() { + return { + localeError: error16() + }; } -// @__NO_SIDE_EFFECTS__ -function _int64(Class4, params) { - return new Class4({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "int64", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uint64(Class4, params) { - return new Class4({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "uint64", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _symbol(Class4, params) { - return new Class4({ - type: "symbol", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _undefined2(Class4, params) { - return new Class4({ - type: "undefined", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _null2(Class4, params) { - return new Class4({ - type: "null", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _any(Class4) { - return new Class4({ - type: "any" - }); -} -// @__NO_SIDE_EFFECTS__ -function _unknown(Class4) { - return new Class4({ - type: "unknown" - }); -} -// @__NO_SIDE_EFFECTS__ -function _never(Class4, params) { - return new Class4({ - type: "never", - ...normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/he.js +var error17 = () => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = (t) => t ? TypeNames[t] : void 0; + const typeLabel = (t) => { + const e = typeEntry(t); + if (e) + return e.label; + return t ?? TypeNames.unknown.label; + }; + const withDefinite = (t) => `\u05D4${typeLabel(t)}`; + const verbFor = (t) => { + const e = typeEntry(t); + const gender = e?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }; + const getSizing = (origin2) => { + if (!origin2) + return null; + return Sizable[origin2] ?? null; + }; + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expectedKey = issue4.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue4.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue4.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive(issue4.values[0])}`; + } + const stringified = issue4.values.map((v) => stringifyPrimitive(v)); + if (issue4.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue4.origin); + const subject = withDefinite(issue4.origin ?? "value"); + if (issue4.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue4.maximum.toString()} ${sizing?.unit ?? ""} ${issue4.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue4.origin === "number") { + const comparison = issue4.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue4.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue4.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue4.origin === "array" || issue4.origin === "set") { + const verb = issue4.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue4.inclusive ? `${issue4.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue4.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue4.inclusive ? "<=" : "<"; + const be = verbFor(issue4.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue4.origin); + const subject = withDefinite(issue4.origin ?? "value"); + if (issue4.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue4.minimum.toString()} ${sizing?.unit ?? ""} ${issue4.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue4.origin === "number") { + const comparison = issue4.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue4.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue4.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue4.origin === "array" || issue4.origin === "set") { + const verb = issue4.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue4.minimum === 1 && issue4.inclusive) { + const singularPhrase = issue4.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue4.inclusive ? `${issue4.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue4.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue4.inclusive ? ">=" : ">"; + const be = verbFor(issue4.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue4.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue4.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue4.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue4.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; +}; +function he_default() { + return { + localeError: error17() + }; } -// @__NO_SIDE_EFFECTS__ -function _void(Class4, params) { - return new Class4({ - type: "void", - ...normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/hu.js +var error18 = () => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue4.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue4.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `T\xFAl nagy: ${issue4.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue4.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue4.origin} m\xE9rete t\xFAl kicsi ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue4.origin} t\xFAl kicsi ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue4.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue4.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue4.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; +}; +function hu_default() { + return { + localeError: error18() + }; } -// @__NO_SIDE_EFFECTS__ -function _date(Class4, params) { - return new Class4({ - type: "date", - ...normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/hy.js +function getArmenianPlural(count, one, many) { + return Math.abs(count) === 1 ? one : many; } -// @__NO_SIDE_EFFECTS__ -function _coercedDate(Class4, params) { - return new Class4({ - type: "date", - coerce: true, - ...normalizeParams(params) - }); +function withDefiniteArticle(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); } -// @__NO_SIDE_EFFECTS__ -function _nan(Class4, params) { - return new Class4({ - type: "nan", - ...normalizeParams(params) - }); +var error19 = () => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + }, + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue4.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive(issue4.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getArmenianPlural(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue4.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.minimum); + const unit = getArmenianPlural(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue4.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle(issue4.origin)} \u056C\u056B\u0576\u056B ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue4.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue4.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle(issue4.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle(issue4.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + } + }; +}; +function hy_default() { + return { + localeError: error19() + }; } -// @__NO_SIDE_EFFECTS__ -function _lt(value, params) { - return new $ZodCheckLessThan({ - check: "less_than", - ...normalizeParams(params), - value, - inclusive: false - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/id.js +var error20 = () => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue4.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue4.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue4.origin ?? "value"} memiliki ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue4.origin ?? "value"} menjadi ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue4.origin} memiliki ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue4.origin} menjadi ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue4.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue4.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue4.origin}`; + default: + return `Input tidak valid`; + } + }; +}; +function id_default() { + return { + localeError: error20() + }; } -// @__NO_SIDE_EFFECTS__ -function _lte(value, params) { - return new $ZodCheckLessThan({ - check: "less_than", - ...normalizeParams(params), - value, - inclusive: true - }); -} -// @__NO_SIDE_EFFECTS__ -function _gt(value, params) { - return new $ZodCheckGreaterThan({ - check: "greater_than", - ...normalizeParams(params), - value, - inclusive: false - }); -} -// @__NO_SIDE_EFFECTS__ -function _gte(value, params) { - return new $ZodCheckGreaterThan({ - check: "greater_than", - ...normalizeParams(params), - value, - inclusive: true - }); -} -// @__NO_SIDE_EFFECTS__ -function _positive(params) { - return /* @__PURE__ */ _gt(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _negative(params) { - return /* @__PURE__ */ _lt(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _nonpositive(params) { - return /* @__PURE__ */ _lte(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _nonnegative(params) { - return /* @__PURE__ */ _gte(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _multipleOf(value, params) { - return new $ZodCheckMultipleOf({ - check: "multiple_of", - ...normalizeParams(params), - value - }); -} -// @__NO_SIDE_EFFECTS__ -function _maxSize(maximum, params) { - return new $ZodCheckMaxSize({ - check: "max_size", - ...normalizeParams(params), - maximum - }); -} -// @__NO_SIDE_EFFECTS__ -function _minSize(minimum, params) { - return new $ZodCheckMinSize({ - check: "min_size", - ...normalizeParams(params), - minimum - }); -} -// @__NO_SIDE_EFFECTS__ -function _size(size, params) { - return new $ZodCheckSizeEquals({ - check: "size_equals", - ...normalizeParams(params), - size - }); -} -// @__NO_SIDE_EFFECTS__ -function _maxLength(maximum, params) { - const ch = new $ZodCheckMaxLength({ - check: "max_length", - ...normalizeParams(params), - maximum - }); - return ch; -} -// @__NO_SIDE_EFFECTS__ -function _minLength(minimum, params) { - return new $ZodCheckMinLength({ - check: "min_length", - ...normalizeParams(params), - minimum - }); -} -// @__NO_SIDE_EFFECTS__ -function _length(length, params) { - return new $ZodCheckLengthEquals({ - check: "length_equals", - ...normalizeParams(params), - length - }); -} -// @__NO_SIDE_EFFECTS__ -function _regex(pattern, params) { - return new $ZodCheckRegex({ - check: "string_format", - format: "regex", - ...normalizeParams(params), - pattern - }); -} -// @__NO_SIDE_EFFECTS__ -function _lowercase(params) { - return new $ZodCheckLowerCase({ - check: "string_format", - format: "lowercase", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uppercase(params) { - return new $ZodCheckUpperCase({ - check: "string_format", - format: "uppercase", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _includes(includes, params) { - return new $ZodCheckIncludes({ - check: "string_format", - format: "includes", - ...normalizeParams(params), - includes - }); -} -// @__NO_SIDE_EFFECTS__ -function _startsWith(prefix, params) { - return new $ZodCheckStartsWith({ - check: "string_format", - format: "starts_with", - ...normalizeParams(params), - prefix - }); -} -// @__NO_SIDE_EFFECTS__ -function _endsWith(suffix, params) { - return new $ZodCheckEndsWith({ - check: "string_format", - format: "ends_with", - ...normalizeParams(params), - suffix - }); -} -// @__NO_SIDE_EFFECTS__ -function _property(property, schema, params) { - return new $ZodCheckProperty({ - check: "property", - property, - schema, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _mime(types, params) { - return new $ZodCheckMimeType({ - check: "mime_type", - mime: types, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _overwrite(tx) { - return new $ZodCheckOverwrite({ - check: "overwrite", - tx - }); -} -// @__NO_SIDE_EFFECTS__ -function _normalize(form) { - return /* @__PURE__ */ _overwrite((input) => input.normalize(form)); -} -// @__NO_SIDE_EFFECTS__ -function _trim() { - return /* @__PURE__ */ _overwrite((input) => input.trim()); -} -// @__NO_SIDE_EFFECTS__ -function _toLowerCase() { - return /* @__PURE__ */ _overwrite((input) => input.toLowerCase()); -} -// @__NO_SIDE_EFFECTS__ -function _toUpperCase() { - return /* @__PURE__ */ _overwrite((input) => input.toUpperCase()); -} -// @__NO_SIDE_EFFECTS__ -function _slugify() { - return /* @__PURE__ */ _overwrite((input) => slugify(input)); -} -// @__NO_SIDE_EFFECTS__ -function _array(Class4, element, params) { - return new Class4({ - type: "array", - element, - // get element() { - // return element; - // }, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _union(Class4, options, params) { - return new Class4({ - type: "union", - options, - ...normalizeParams(params) - }); -} -function _xor(Class4, options, params) { - return new Class4({ - type: "union", - options, - inclusive: false, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _discriminatedUnion(Class4, discriminator, options, params) { - return new Class4({ - type: "union", - options, - discriminator, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _intersection(Class4, left, right) { - return new Class4({ - type: "intersection", - left, - right - }); -} -// @__NO_SIDE_EFFECTS__ -function _tuple(Class4, items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new Class4({ - type: "tuple", - items, - rest, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _record(Class4, keyType, valueType, params) { - return new Class4({ - type: "record", - keyType, - valueType, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _map(Class4, keyType, valueType, params) { - return new Class4({ - type: "map", - keyType, - valueType, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _set(Class4, valueType, params) { - return new Class4({ - type: "set", - valueType, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _enum(Class4, values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new Class4({ - type: "enum", - entries, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _nativeEnum(Class4, entries, params) { - return new Class4({ - type: "enum", - entries, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _literal(Class4, value, params) { - return new Class4({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _file(Class4, params) { - return new Class4({ - type: "file", - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _transform(Class4, fn) { - return new Class4({ - type: "transform", - transform: fn - }); -} -// @__NO_SIDE_EFFECTS__ -function _optional(Class4, innerType) { - return new Class4({ - type: "optional", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _nullable(Class4, innerType) { - return new Class4({ - type: "nullable", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _default(Class4, innerType, defaultValue) { - return new Class4({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); - } - }); -} -// @__NO_SIDE_EFFECTS__ -function _nonoptional(Class4, innerType, params) { - return new Class4({ - type: "nonoptional", - innerType, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _success(Class4, innerType) { - return new Class4({ - type: "success", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _catch(Class4, innerType, catchValue) { - return new Class4({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue - }); -} -// @__NO_SIDE_EFFECTS__ -function _pipe(Class4, in_, out) { - return new Class4({ - type: "pipe", - in: in_, - out - }); -} -// @__NO_SIDE_EFFECTS__ -function _readonly(Class4, innerType) { - return new Class4({ - type: "readonly", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _templateLiteral(Class4, parts, params) { - return new Class4({ - type: "template_literal", - parts, - ...normalizeParams(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _lazy(Class4, getter) { - return new Class4({ - type: "lazy", - getter - }); -} -// @__NO_SIDE_EFFECTS__ -function _promise(Class4, innerType) { - return new Class4({ - type: "promise", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _custom(Class4, fn, _params) { - const norm = normalizeParams(_params); - norm.abort ?? (norm.abort = true); - const schema = new Class4({ - type: "custom", - check: "custom", - fn, - ...norm - }); - return schema; -} -// @__NO_SIDE_EFFECTS__ -function _refine(Class4, fn, _params) { - const schema = new Class4({ - type: "custom", - check: "custom", - fn, - ...normalizeParams(_params) - }); - return schema; -} -// @__NO_SIDE_EFFECTS__ -function _superRefine(fn) { - const ch = /* @__PURE__ */ _check((payload) => { - payload.addIssue = (issue5) => { - if (typeof issue5 === "string") { - payload.issues.push(issue2(issue5, payload.value, ch._zod.def)); - } else { - const _issue = issue5; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = ch); - _issue.continue ?? (_issue.continue = !ch._zod.def.abort); - payload.issues.push(issue2(_issue)); + +// node_modules/testing-farm/node_modules/zod/v4/locales/is.js +var error21 = () => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue4.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; } - }; - return fn(payload.value, payload); - }); - return ch; -} -// @__NO_SIDE_EFFECTS__ -function _check(fn, params) { - const ch = new $ZodCheck({ - check: "custom", - ...normalizeParams(params) - }); - ch._zod.check = fn; - return ch; -} -// @__NO_SIDE_EFFECTS__ -function describe(description) { - const ch = new $ZodCheck({ check: "describe" }); - ch._zod.onattach = [ - (inst) => { - const existing = globalRegistry.get(inst) ?? {}; - globalRegistry.add(inst, { ...existing, description }); + case "invalid_value": + if (issue4.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive(issue4.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin ?? "gildi"} hafi ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin ?? "gildi"} s\xE9 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin} hafi ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin} s\xE9 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue4.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue4.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue4.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue4.origin}`; + default: + return `Rangt gildi`; } - ]; - ch._zod.check = () => { }; - return ch; -} -// @__NO_SIDE_EFFECTS__ -function meta(metadata) { - const ch = new $ZodCheck({ check: "meta" }); - ch._zod.onattach = [ - (inst) => { - const existing = globalRegistry.get(inst) ?? {}; - globalRegistry.add(inst, { ...existing, ...metadata }); - } - ]; - ch._zod.check = () => { +}; +function is_default() { + return { + localeError: error21() }; - return ch; } -// @__NO_SIDE_EFFECTS__ -function _stringbool(Classes, _params) { - const params = normalizeParams(_params); - let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; - let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; - if (params.case !== "sensitive") { - truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); - falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); + +// node_modules/testing-farm/node_modules/zod/v4/locales/it.js +var error22 = () => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const truthySet = new Set(truthyArray); - const falsySet = new Set(falsyArray); - const _Codec = Classes.Codec ?? $ZodCodec; - const _Boolean = Classes.Boolean ?? $ZodBoolean; - const _String = Classes.String ?? $ZodString; - const stringSchema = new _String({ type: "string", error: params.error }); - const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); - const codec4 = new _Codec({ - type: "pipe", - in: stringSchema, - out: booleanSchema, - transform: ((input, payload) => { - let data = input; - if (params.case !== "sensitive") - data = data.toLowerCase(); - if (truthySet.has(data)) { - return true; - } else if (falsySet.has(data)) { - return false; - } else { - payload.issues.push({ - code: "invalid_value", - expected: "stringbool", - values: [...truthySet, ...falsySet], - input: payload.value, - inst: codec4, - continue: false - }); - return {}; + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input non valido: atteso instanceof ${issue4.expected}, ricevuto ${received}`; + } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; } - }), - reverseTransform: ((input, _payload) => { - if (input === true) { - return truthyArray[0] || "true"; - } else { - return falsyArray[0] || "false"; + case "invalid_value": + if (issue4.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue4.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Troppo grande: ${issue4.origin ?? "valore"} deve avere ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue4.origin ?? "valore"} deve essere ${adj}${issue4.maximum.toString()}`; } - }), - error: params.error - }); - return codec4; -} -// @__NO_SIDE_EFFECTS__ -function _stringFormat(Class4, format2, fnOrRegex, _params = {}) { - const params = normalizeParams(_params); - const def = { - ...normalizeParams(_params), - check: "string_format", - type: "string", - format: format2, - fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), - ...params + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Troppo piccolo: ${issue4.origin} deve avere ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue4.origin} deve essere ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue4.divisor}`; + case "unrecognized_keys": + return `Chiav${issue4.keys.length > 1 ? "i" : "e"} non riconosciut${issue4.keys.length > 1 ? "e" : "a"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue4.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue4.origin}`; + default: + return `Input non valido`; + } }; - if (fnOrRegex instanceof RegExp) { - def.pattern = fnOrRegex; - } - const inst = new Class4(def); - return inst; -} - -// node_modules/testing-farm/node_modules/zod/v4/core/to-json-schema.js -function initializeContext(params) { - let target = params?.target ?? "draft-2020-12"; - if (target === "draft-4") - target = "draft-04"; - if (target === "draft-7") - target = "draft-07"; +}; +function it_default() { return { - processors: params.processors ?? {}, - metadataRegistry: params?.metadata ?? globalRegistry, - target, - unrepresentable: params?.unrepresentable ?? "throw", - override: params?.override ?? (() => { - }), - io: params?.io ?? "output", - counter: 0, - seen: /* @__PURE__ */ new Map(), - cycles: params?.cycles ?? "ref", - reused: params?.reused ?? "inline", - external: params?.external ?? void 0 + localeError: error22() }; } -function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { - var _a5; - const def = schema._zod.def; - const seen = ctx.seen.get(schema); - if (seen) { - seen.count++; - const isCycle = _params.schemaPath.includes(schema); - if (isCycle) { - seen.cycle = _params.path; - } - return seen.schema; + +// node_modules/testing-farm/node_modules/zod/v4/locales/ja.js +var error23 = () => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; - ctx.seen.set(schema, result); - const overrideSchema = schema._zod.toJSONSchema?.(); - if (overrideSchema) { - result.schema = overrideSchema; - } else { - const params = { - ..._params, - schemaPath: [..._params.schemaPath, schema], - path: _params.path - }; - if (schema._zod.processJSONSchema) { - schema._zod.processJSONSchema(ctx, result.schema, params); - } else { - const _json = result.schema; - const processor = ctx.processors[def.type]; - if (!processor) { - throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue4.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; } - processor(schema, ctx, _json, params); - } - const parent = schema._zod.parent; - if (parent) { - if (!result.ref) - result.ref = parent; - process2(parent, ctx, params); - ctx.seen.get(parent).isParent = true; - } - } - const meta6 = ctx.metadataRegistry.get(schema); - if (meta6) - Object.assign(result.schema, meta6); - if (ctx.io === "input" && isTransforming(schema)) { - delete result.schema.examples; - delete result.schema.default; - } - if (ctx.io === "input" && result.schema._prefault) - (_a5 = result.schema).default ?? (_a5.default = result.schema._prefault); - delete result.schema._prefault; - const _result = ctx.seen.get(schema); - return _result.schema; -} -function extractDefs(ctx, schema) { - const root = ctx.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const idToSchema = /* @__PURE__ */ new Map(); - for (const entry of ctx.seen.entries()) { - const id = ctx.metadataRegistry.get(entry[0])?.id; - if (id) { - const existing = idToSchema.get(id); - if (existing && existing !== entry[0]) { - throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + case "invalid_value": + if (issue4.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue4.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue4.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue4.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue4.origin ?? "\u5024"}\u306F${issue4.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue4.origin ?? "\u5024"}\u306F${issue4.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } - idToSchema.set(id, entry[0]); - } - } - const makeURI = (entry) => { - const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; - if (ctx.external) { - const externalId = ctx.external.registry.get(entry[0])?.id; - const uriGenerator = ctx.external.uri ?? ((id2) => id2); - if (externalId) { - return { ref: uriGenerator(externalId) }; + case "too_small": { + const adj = issue4.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue4.origin}\u306F${issue4.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue4.origin}\u306F${issue4.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } - const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; - entry[1].defId = id; - return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; - } - if (entry[1] === root) { - return { ref: "#" }; + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue4.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue4.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue4.keys, "\u3001")}`; + case "invalid_key": + return `${issue4.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue4.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; } - const uriPrefix = `#`; - const defUriPrefix = `${uriPrefix}/${defsSegment}/`; - const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; - return { defId, ref: defUriPrefix + defId }; }; - const extractToDef = (entry) => { - if (entry[1].schema.$ref) { - return; - } - const seen = entry[1]; - const { ref, defId } = makeURI(entry); - seen.def = { ...seen.schema }; - if (defId) - seen.defId = defId; - const schema2 = seen.schema; - for (const key in schema2) { - delete schema2[key]; - } - schema2.$ref = ref; +}; +function ja_default() { + return { + localeError: error23() }; - if (ctx.cycles === "throw") { - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (seen.cycle) { - throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ +} -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); - } - } - } - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (schema === entry[0]) { - extractToDef(entry); - continue; - } - if (ctx.external) { - const ext = ctx.external.registry.get(entry[0])?.id; - if (schema !== entry[0] && ext) { - extractToDef(entry); - continue; - } - } - const id = ctx.metadataRegistry.get(entry[0])?.id; - if (id) { - extractToDef(entry); - continue; - } - if (seen.cycle) { - extractToDef(entry); - continue; - } - if (seen.count > 1) { - if (ctx.reused === "ref") { - extractToDef(entry); - continue; - } - } +// node_modules/testing-farm/node_modules/zod/v4/locales/ka.js +var error24 = () => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } -} -function finalize(ctx, schema) { - const root = ctx.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const flattenRef = (zodSchema) => { - const seen = ctx.seen.get(zodSchema); - if (seen.ref === null) - return; - const schema2 = seen.def ?? seen.schema; - const _cached = { ...schema2 }; - const ref = seen.ref; - seen.ref = null; - if (ref) { - flattenRef(ref); - const refSeen = ctx.seen.get(ref); - const refSchema = refSeen.schema; - if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { - schema2.allOf = schema2.allOf ?? []; - schema2.allOf.push(refSchema); - } else { - Object.assign(schema2, refSchema); - } - Object.assign(schema2, _cached); - const isParentRef = zodSchema._zod.parent === ref; - if (isParentRef) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (!(key in _cached)) { - delete schema2[key]; - } + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue4.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; } + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; } - if (refSchema.$ref && refSeen.def) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { - delete schema2[key]; - } + case "invalid_value": + if (issue4.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive(issue4.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues(issue4.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue4.minimum.toString()}`; } - } - const parent = zodSchema._zod.parent; - if (parent && parent !== ref) { - flattenRef(parent); - const parentSeen = ctx.seen.get(parent); - if (parentSeen?.schema.$ref) { - schema2.$ref = parentSeen.schema.$ref; - if (parentSeen.def) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { - delete schema2[key]; - } - } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue4.format}`; } + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue4.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue4.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue4.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue4.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; } - ctx.override({ - zodSchema, - jsonSchema: schema2, - path: seen.path ?? [] - }); }; - for (const entry of [...ctx.seen.entries()].reverse()) { - flattenRef(entry[0]); - } - const result = {}; - if (ctx.target === "draft-2020-12") { - result.$schema = "https://json-schema.org/draft/2020-12/schema"; - } else if (ctx.target === "draft-07") { - result.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (ctx.target === "draft-04") { - result.$schema = "http://json-schema.org/draft-04/schema#"; - } else if (ctx.target === "openapi-3.0") { - } else { - } - if (ctx.external?.uri) { - const id = ctx.external.registry.get(schema)?.id; - if (!id) - throw new Error("Schema is missing an `id` property"); - result.$id = ctx.external.uri(id); +}; +function ka_default() { + return { + localeError: error24() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/km.js +var error25 = () => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - Object.assign(result, root.def ?? root.schema); - const defs = ctx.external?.defs ?? {}; - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (seen.def && seen.defId) { - defs[seen.defId] = seen.def; - } - } - if (ctx.external) { - } else { - if (Object.keys(defs).length > 0) { - if (ctx.target === "draft-2020-12") { - result.$defs = defs; - } else { - result.definitions = defs; + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue4.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; } - } - } - try { - const finalized = JSON.parse(JSON.stringify(result)); - Object.defineProperty(finalized, "~standard", { - value: { - ...schema["~standard"], - jsonSchema: { - input: createStandardJSONSchemaMethod(schema, "input", ctx.processors), - output: createStandardJSONSchemaMethod(schema, "output", ctx.processors) + case "invalid_value": + if (issue4.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive(issue4.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin} ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; } - }, - enumerable: false, - writable: false - }); - return finalized; - } catch (_err) { - throw new Error("Error converting schema to JSON."); - } -} -function isTransforming(_schema, _ctx) { - const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; - if (ctx.seen.has(_schema)) - return false; - ctx.seen.add(_schema); - const def = _schema._zod.def; - if (def.type === "transform") - return true; - if (def.type === "array") - return isTransforming(def.element, ctx); - if (def.type === "set") - return isTransforming(def.valueType, ctx); - if (def.type === "lazy") - return isTransforming(def.getter(), ctx); - if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { - return isTransforming(def.innerType, ctx); - } - if (def.type === "intersection") { - return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); - } - if (def.type === "record" || def.type === "map") { - return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); - } - if (def.type === "pipe") { - return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); - } - if (def.type === "object") { - for (const key in def.shape) { - if (isTransforming(def.shape[key], ctx)) - return true; - } - return false; - } - if (def.type === "union") { - for (const option of def.options) { - if (isTransforming(option, ctx)) - return true; - } - return false; - } - if (def.type === "tuple") { - for (const item of def.items) { - if (isTransforming(item, ctx)) - return true; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin} ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue4.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue4.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; } - if (def.rest && isTransforming(def.rest, ctx)) - return true; - return false; - } - return false; -} -var createToJSONSchemaMethod = (schema, processors = {}) => (params) => { - const ctx = initializeContext({ ...params, processors }); - process2(schema, ctx); - extractDefs(ctx, schema); - return finalize(ctx, schema); -}; -var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => { - const { libraryOptions, target } = params ?? {}; - const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); - process2(schema, ctx); - extractDefs(ctx, schema); - return finalize(ctx, schema); + }; }; +function km_default() { + return { + localeError: error25() + }; +} -// node_modules/testing-farm/node_modules/zod/v4/core/json-schema-processors.js -var formatMap = { - guid: "uuid", - url: "uri", - datetime: "date-time", - json_string: "json-string", - regex: "" - // do not set -}; -var stringProcessor = (schema, ctx, _json, _params) => { - const json4 = _json; - json4.type = "string"; - const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; - if (typeof minimum === "number") - json4.minLength = minimum; - if (typeof maximum === "number") - json4.maxLength = maximum; - if (format2) { - json4.format = formatMap[format2] ?? format2; - if (json4.format === "") - delete json4.format; - if (format2 === "time") { - delete json4.format; - } - } - if (contentEncoding) - json4.contentEncoding = contentEncoding; - if (patterns && patterns.size > 0) { - const regexes = [...patterns]; - if (regexes.length === 1) - json4.pattern = regexes[0].source; - else if (regexes.length > 1) { - json4.allOf = [ - ...regexes.map((regex2) => ({ - ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, - pattern: regex2.source - })) - ]; - } - } -}; -var numberProcessor = (schema, ctx, _json, _params) => { - const json4 = _json; - const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; - if (typeof format2 === "string" && format2.includes("int")) - json4.type = "integer"; - else - json4.type = "number"; - if (typeof exclusiveMinimum === "number") { - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json4.minimum = exclusiveMinimum; - json4.exclusiveMinimum = true; - } else { - json4.exclusiveMinimum = exclusiveMinimum; - } - } - if (typeof minimum === "number") { - json4.minimum = minimum; - if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { - if (exclusiveMinimum >= minimum) - delete json4.minimum; - else - delete json4.exclusiveMinimum; - } - } - if (typeof exclusiveMaximum === "number") { - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json4.maximum = exclusiveMaximum; - json4.exclusiveMaximum = true; - } else { - json4.exclusiveMaximum = exclusiveMaximum; - } +// node_modules/testing-farm/node_modules/zod/v4/locales/kh.js +function kh_default() { + return km_default(); +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/ko.js +var error26 = () => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - if (typeof maximum === "number") { - json4.maximum = maximum; - if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { - if (exclusiveMaximum <= maximum) - delete json4.maximum; - else - delete json4.exclusiveMaximum; + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue4.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue4.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue4.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue4.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue4.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue4.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue4.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue4.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue4.minimum.toString()}${unit} ${adj}${suffix}`; + } + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue4.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; + } + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue4.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue4.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue4.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; } - } - if (typeof multipleOf === "number") - json4.multipleOf = multipleOf; -}; -var booleanProcessor = (_schema, _ctx, json4, _params) => { - json4.type = "boolean"; -}; -var bigintProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("BigInt cannot be represented in JSON Schema"); - } -}; -var symbolProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Symbols cannot be represented in JSON Schema"); - } -}; -var nullProcessor = (_schema, ctx, json4, _params) => { - if (ctx.target === "openapi-3.0") { - json4.type = "string"; - json4.nullable = true; - json4.enum = [null]; - } else { - json4.type = "null"; - } -}; -var undefinedProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Undefined cannot be represented in JSON Schema"); - } -}; -var voidProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Void cannot be represented in JSON Schema"); - } -}; -var neverProcessor = (_schema, _ctx, json4, _params) => { - json4.not = {}; -}; -var anyProcessor = (_schema, _ctx, _json, _params) => { -}; -var unknownProcessor = (_schema, _ctx, _json, _params) => { -}; -var dateProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Date cannot be represented in JSON Schema"); - } + }; }; -var enumProcessor = (schema, _ctx, json4, _params) => { - const def = schema._zod.def; - const values = getEnumValues(def.entries); - if (values.every((v) => typeof v === "number")) - json4.type = "number"; - if (values.every((v) => typeof v === "string")) - json4.type = "string"; - json4.enum = values; +function ko_default() { + return { + localeError: error26() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/lt.js +var capitalizeFirstCharacter = (text) => { + return text.charAt(0).toUpperCase() + text.slice(1); }; -var literalProcessor = (schema, ctx, json4, _params) => { - const def = schema._zod.def; - const vals = []; - for (const val of def.values) { - if (val === void 0) { - if (ctx.unrepresentable === "throw") { - throw new Error("Literal `undefined` cannot be represented in JSON Schema"); - } else { +function getUnitTypeFromNumber(number7) { + const abs = Math.abs(number7); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +var error27 = () => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } } - } else if (typeof val === "bigint") { - if (ctx.unrepresentable === "throw") { - throw new Error("BigInt literals cannot be represented in JSON Schema"); - } else { - vals.push(Number(val)); + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } } - } else { - vals.push(val); - } - } - if (vals.length === 0) { - } else if (vals.length === 1) { - const val = vals[0]; - json4.type = val === null ? "null" : typeof val; - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json4.enum = [val]; - } else { - json4.const = val; } - } else { - if (vals.every((v) => typeof v === "number")) - json4.type = "number"; - if (vals.every((v) => typeof v === "string")) - json4.type = "string"; - if (vals.every((v) => typeof v === "boolean")) - json4.type = "boolean"; - if (vals.every((v) => v === null)) - json4.type = "null"; - json4.enum = vals; - } -}; -var nanProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("NaN cannot be represented in JSON Schema"); - } -}; -var templateLiteralProcessor = (schema, _ctx, json4, _params) => { - const _json = json4; - const pattern = schema._zod.pattern; - if (!pattern) - throw new Error("Pattern not found in template literal"); - _json.type = "string"; - _json.pattern = pattern.source; -}; -var fileProcessor = (schema, _ctx, json4, _params) => { - const _json = json4; - const file4 = { - type: "string", - format: "binary", - contentEncoding: "binary" }; - const { minimum, maximum, mime } = schema._zod.bag; - if (minimum !== void 0) - file4.minLength = minimum; - if (maximum !== void 0) - file4.maxLength = maximum; - if (mime) { - if (mime.length === 1) { - file4.contentMediaType = mime[0]; - Object.assign(_json, file4); - } else { - Object.assign(_json, file4); - _json.anyOf = mime.map((m) => ({ contentMediaType: m })); - } - } else { - Object.assign(_json, file4); - } -}; -var successProcessor = (_schema, _ctx, json4, _params) => { - json4.type = "boolean"; -}; -var customProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Custom types cannot be represented in JSON Schema"); - } -}; -var functionProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Function types cannot be represented in JSON Schema"); - } -}; -var transformProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Transforms cannot be represented in JSON Schema"); - } -}; -var mapProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Map cannot be represented in JSON Schema"); + function getSizing(origin2, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin2] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; } -}; -var setProcessor = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Set cannot be represented in JSON Schema"); - } -}; -var arrayProcessor = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json4.minItems = minimum; - if (typeof maximum === "number") - json4.maxItems = maximum; - json4.type = "array"; - json4.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); -}; -var objectProcessor = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - json4.type = "object"; - json4.properties = {}; - const shape = def.shape; - for (const key in shape) { - json4.properties[key] = process2(shape[key], ctx, { - ...params, - path: [...params.path, "properties", key] - }); - } - const allKeys = new Set(Object.keys(shape)); - const requiredKeys = new Set([...allKeys].filter((key) => { - const v = def.shape[key]._zod; - if (ctx.io === "input") { - return v.optin === void 0; - } else { - return v.optout === void 0; + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue4.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive(issue4.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue4.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + const sizing = getSizing(issue4.origin, getUnitTypeFromNumber(Number(issue4.maximum)), issue4.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue4.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue4.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue4.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + const sizing = getSizing(issue4.origin, getUnitTypeFromNumber(Number(issue4.minimum)), issue4.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue4.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue4.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue4.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue4.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue4.keys.length > 1 ? "i" : "as"} rakt${issue4.keys.length > 1 ? "ai" : "as"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + return `${capitalizeFirstCharacter(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; } - })); - if (requiredKeys.size > 0) { - json4.required = Array.from(requiredKeys); - } - if (def.catchall?._zod.def.type === "never") { - json4.additionalProperties = false; - } else if (!def.catchall) { - if (ctx.io === "output") - json4.additionalProperties = false; - } else if (def.catchall) { - json4.additionalProperties = process2(def.catchall, ctx, { - ...params, - path: [...params.path, "additionalProperties"] - }); - } + }; }; -var unionProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - const isExclusive = def.inclusive === false; - const options = def.options.map((x, i) => process2(x, ctx, { - ...params, - path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] - })); - if (isExclusive) { - json4.oneOf = options; - } else { - json4.anyOf = options; +function lt_default() { + return { + localeError: error27() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/mk.js +var error28 = () => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } -}; -var intersectionProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - const a = process2(def.left, ctx, { - ...params, - path: [...params.path, "allOf", 0] - }); - const b = process2(def.right, ctx, { - ...params, - path: [...params.path, "allOf", 1] - }); - const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; - const allOf = [ - ...isSimpleIntersection(a) ? a.allOf : [a], - ...isSimpleIntersection(b) ? b.allOf : [b] - ]; - json4.allOf = allOf; -}; -var tupleProcessor = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - json4.type = "array"; - const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; - const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; - const prefixItems = def.items.map((x, i) => process2(x, ctx, { - ...params, - path: [...params.path, prefixPath, i] - })); - const rest = def.rest ? process2(def.rest, ctx, { - ...params, - path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] - }) : null; - if (ctx.target === "draft-2020-12") { - json4.prefixItems = prefixItems; - if (rest) { - json4.items = rest; - } - } else if (ctx.target === "openapi-3.0") { - json4.items = { - anyOf: prefixItems - }; - if (rest) { - json4.items.anyOf.push(rest); - } - json4.minItems = prefixItems.length; - if (!rest) { - json4.maxItems = prefixItems.length; - } - } else { - json4.items = prefixItems; - if (rest) { - json4.additionalItems = rest; + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue4.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue4.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue4.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue4.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; } - } - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json4.minItems = minimum; - if (typeof maximum === "number") - json4.maxItems = maximum; + }; }; -var recordProcessor = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - json4.type = "object"; - const keyType = def.keyType; - const keyBag = keyType._zod.bag; - const patterns = keyBag?.patterns; - if (def.mode === "loose" && patterns && patterns.size > 0) { - const valueSchema = process2(def.valueType, ctx, { - ...params, - path: [...params.path, "patternProperties", "*"] - }); - json4.patternProperties = {}; - for (const pattern of patterns) { - json4.patternProperties[pattern.source] = valueSchema; - } - } else { - if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { - json4.propertyNames = process2(def.keyType, ctx, { - ...params, - path: [...params.path, "propertyNames"] - }); - } - json4.additionalProperties = process2(def.valueType, ctx, { - ...params, - path: [...params.path, "additionalProperties"] - }); +function mk_default() { + return { + localeError: error28() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/ms.js +var error29 = () => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const keyValues = keyType._zod.values; - if (keyValues) { - const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number"); - if (validKeyValues.length > 0) { - json4.required = validKeyValues; + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input tidak sah: dijangka instanceof ${issue4.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue4.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue4.origin ?? "nilai"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue4.origin ?? "nilai"} adalah ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue4.origin} adalah ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue4.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue4.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue4.origin}`; + default: + return `Input tidak sah`; } - } + }; }; -var nullableProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - const inner = process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - if (ctx.target === "openapi-3.0") { - seen.ref = def.innerType; - json4.nullable = true; - } else { - json4.anyOf = [inner, { type: "null" }]; +function ms_default() { + return { + localeError: error29() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/nl.js +var error30 = () => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" + }; + const TypeDictionary = { + nan: "NaN", + number: "getal" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue4.expected}, ontving ${received}`; + } + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue4.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const longName = issue4.origin === "date" ? "laat" : issue4.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue4.origin ?? "waarde"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue4.origin ?? "waarde"} ${adj}${issue4.maximum.toString()} is`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const shortName = issue4.origin === "date" ? "vroeg" : issue4.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Te ${shortName}: verwacht dat ${issue4.origin} ${adj}${issue4.minimum.toString()} is`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue4.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue4.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue4.origin}`; + default: + return `Ongeldige invoer`; + } + }; }; -var nonoptionalProcessor = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var defaultProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - json4.default = JSON.parse(JSON.stringify(def.defaultValue)); -}; -var prefaultProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - if (ctx.io === "input") - json4._prefault = JSON.parse(JSON.stringify(def.defaultValue)); -}; -var catchProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - let catchValue; - try { - catchValue = def.catchValue(void 0); - } catch { - throw new Error("Dynamic catch values are not supported in JSON Schema"); +function nl_default() { + return { + localeError: error30() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/no.js +var error31 = () => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - json4.default = catchValue; -}; -var pipeProcessor = (schema, ctx, _json, params) => { - const def = schema._zod.def; - const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; - process2(innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = innerType; -}; -var readonlyProcessor = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - json4.readOnly = true; -}; -var promiseProcessor = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var optionalProcessor = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process2(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var lazyProcessor = (schema, ctx, _json, params) => { - const innerType = schema._zod.innerType; - process2(innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = innerType; -}; -var allProcessors = { - string: stringProcessor, - number: numberProcessor, - boolean: booleanProcessor, - bigint: bigintProcessor, - symbol: symbolProcessor, - null: nullProcessor, - undefined: undefinedProcessor, - void: voidProcessor, - never: neverProcessor, - any: anyProcessor, - unknown: unknownProcessor, - date: dateProcessor, - enum: enumProcessor, - literal: literalProcessor, - nan: nanProcessor, - template_literal: templateLiteralProcessor, - file: fileProcessor, - success: successProcessor, - custom: customProcessor, - function: functionProcessor, - transform: transformProcessor, - map: mapProcessor, - set: setProcessor, - array: arrayProcessor, - object: objectProcessor, - union: unionProcessor, - intersection: intersectionProcessor, - tuple: tupleProcessor, - record: recordProcessor, - nullable: nullableProcessor, - nonoptional: nonoptionalProcessor, - default: defaultProcessor, - prefault: prefaultProcessor, - catch: catchProcessor, - pipe: pipeProcessor, - readonly: readonlyProcessor, - promise: promiseProcessor, - optional: optionalProcessor, - lazy: lazyProcessor -}; -function toJSONSchema(input, params) { - if ("_idmap" in input) { - const registry4 = input; - const ctx2 = initializeContext({ ...params, processors: allProcessors }); - const defs = {}; - for (const entry of registry4._idmap.entries()) { - const [_, schema] = entry; - process2(schema, ctx2); - } - const schemas = {}; - const external = { - registry: registry4, - uri: params?.uri, - defs - }; - ctx2.external = external; - for (const entry of registry4._idmap.entries()) { - const [key, schema] = entry; - extractDefs(ctx2, schema); - schemas[key] = finalize(ctx2, schema); - } - if (Object.keys(defs).length > 0) { - const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; - schemas.__shared = { - [defsSegment]: defs - }; + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ugyldig input: forventet instanceof ${issue4.expected}, fikk ${received}`; + } + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue4.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `For stor(t): forventet ${issue4.origin ?? "value"} til \xE5 ha ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue4.origin ?? "value"} til \xE5 ha ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `For lite(n): forventet ${issue4.origin} til \xE5 ha ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `For lite(n): forventet ${issue4.origin} til \xE5 ha ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue4.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue4.origin}`; + default: + return `Ugyldig input`; } - return { schemas }; - } - const ctx = initializeContext({ ...params, processors: allProcessors }); - process2(input, ctx); - extractDefs(ctx, input); - return finalize(ctx, input); + }; +}; +function no_default() { + return { + localeError: error31() + }; } -// node_modules/testing-farm/node_modules/zod/v4/core/json-schema-generator.js -var JSONSchemaGenerator = class { - /** @deprecated Access via ctx instead */ - get metadataRegistry() { - return this.ctx.metadataRegistry; - } - /** @deprecated Access via ctx instead */ - get target() { - return this.ctx.target; - } - /** @deprecated Access via ctx instead */ - get unrepresentable() { - return this.ctx.unrepresentable; - } - /** @deprecated Access via ctx instead */ - get override() { - return this.ctx.override; - } - /** @deprecated Access via ctx instead */ - get io() { - return this.ctx.io; - } - /** @deprecated Access via ctx instead */ - get counter() { - return this.ctx.counter; - } - set counter(value) { - this.ctx.counter = value; - } - /** @deprecated Access via ctx instead */ - get seen() { - return this.ctx.seen; - } - constructor(params) { - let normalizedTarget = params?.target ?? "draft-2020-12"; - if (normalizedTarget === "draft-4") - normalizedTarget = "draft-04"; - if (normalizedTarget === "draft-7") - normalizedTarget = "draft-07"; - this.ctx = initializeContext({ - processors: allProcessors, - target: normalizedTarget, - ...params?.metadata && { metadata: params.metadata }, - ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, - ...params?.override && { override: params.override }, - ...params?.io && { io: params.io } - }); - } - /** - * Process a schema to prepare it for JSON Schema generation. - * This must be called before emit(). - */ - process(schema, _params = { path: [], schemaPath: [] }) { - return process2(schema, this.ctx, _params); +// node_modules/testing-farm/node_modules/zod/v4/locales/ota.js +var error32 = () => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - /** - * Emit the final JSON Schema after processing. - * Must call process() first. - */ - emit(schema, _params) { - if (_params) { - if (_params.cycles) - this.ctx.cycles = _params.cycles; - if (_params.reused) - this.ctx.reused = _params.reused; - if (_params.external) - this.ctx.external = _params.external; + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue4.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue4.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue4.origin ?? "value"}, ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue4.origin ?? "value"}, ${adj}${issue4.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue4.origin}, ${adj}${issue4.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue4.origin}, ${adj}${issue4.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue4.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue4.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; } - extractDefs(this.ctx, schema); - const result = finalize(this.ctx, schema); - const { "~standard": _, ...plainResult } = result; - return plainResult; + }; +}; +function ota_default() { + return { + localeError: error32() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/ps.js +var error33 = () => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u064A", + email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", + date: "\u0646\u06D0\u067C\u0647", + time: "\u0648\u062E\u062A", + duration: "\u0645\u0648\u062F\u0647", + ipv4: "\u062F IPv4 \u067E\u062A\u0647", + ipv6: "\u062F IPv6 \u067E\u062A\u0647", + cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", + cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", + base64: "base64-encoded \u0645\u062A\u0646", + base64url: "base64url-encoded \u0645\u062A\u0646", + json_string: "JSON \u0645\u062A\u0646", + e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u064A" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0627\u0631\u06D0" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue4.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue4.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue4.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue4.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue4.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue4.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${FormatDictionary[_issue.format] ?? issue4.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue4.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue4.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue4.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue4.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + } + }; }; +function ps_default() { + return { + localeError: error33() + }; +} -// node_modules/testing-farm/node_modules/zod/v4/core/json-schema.js -var json_schema_exports = {}; +// node_modules/testing-farm/node_modules/zod/v4/locales/pl.js +var error34 = () => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue4.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue4.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue4.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue4.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue4.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue4.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; + } + }; +}; +function pl_default() { + return { + localeError: error34() + }; +} -// node_modules/testing-farm/node_modules/zod/v4/classic/schemas.js -var schemas_exports2 = {}; -__export(schemas_exports2, { - ZodAny: () => ZodAny, - ZodArray: () => ZodArray, - ZodBase64: () => ZodBase64, - ZodBase64URL: () => ZodBase64URL, - ZodBigInt: () => ZodBigInt, - ZodBigIntFormat: () => ZodBigIntFormat, - ZodBoolean: () => ZodBoolean, - ZodCIDRv4: () => ZodCIDRv4, - ZodCIDRv6: () => ZodCIDRv6, - ZodCUID: () => ZodCUID, - ZodCUID2: () => ZodCUID2, - ZodCatch: () => ZodCatch, - ZodCodec: () => ZodCodec, - ZodCustom: () => ZodCustom, - ZodCustomStringFormat: () => ZodCustomStringFormat, - ZodDate: () => ZodDate, - ZodDefault: () => ZodDefault, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, - ZodE164: () => ZodE164, - ZodEmail: () => ZodEmail, - ZodEmoji: () => ZodEmoji, - ZodEnum: () => ZodEnum, - ZodExactOptional: () => ZodExactOptional, - ZodFile: () => ZodFile, - ZodFunction: () => ZodFunction, - ZodGUID: () => ZodGUID, - ZodIPv4: () => ZodIPv4, - ZodIPv6: () => ZodIPv6, - ZodIntersection: () => ZodIntersection, - ZodJWT: () => ZodJWT, - ZodKSUID: () => ZodKSUID, - ZodLazy: () => ZodLazy, - ZodLiteral: () => ZodLiteral, - ZodMAC: () => ZodMAC, - ZodMap: () => ZodMap, - ZodNaN: () => ZodNaN, - ZodNanoID: () => ZodNanoID, - ZodNever: () => ZodNever, - ZodNonOptional: () => ZodNonOptional, - ZodNull: () => ZodNull, - ZodNullable: () => ZodNullable, - ZodNumber: () => ZodNumber, - ZodNumberFormat: () => ZodNumberFormat, - ZodObject: () => ZodObject, - ZodOptional: () => ZodOptional, - ZodPipe: () => ZodPipe, - ZodPrefault: () => ZodPrefault, - ZodPromise: () => ZodPromise, - ZodReadonly: () => ZodReadonly, - ZodRecord: () => ZodRecord, - ZodSet: () => ZodSet, - ZodString: () => ZodString, - ZodStringFormat: () => ZodStringFormat, - ZodSuccess: () => ZodSuccess, - ZodSymbol: () => ZodSymbol, - ZodTemplateLiteral: () => ZodTemplateLiteral, - ZodTransform: () => ZodTransform, - ZodTuple: () => ZodTuple, - ZodType: () => ZodType, - ZodULID: () => ZodULID, - ZodURL: () => ZodURL, - ZodUUID: () => ZodUUID, - ZodUndefined: () => ZodUndefined, - ZodUnion: () => ZodUnion, - ZodUnknown: () => ZodUnknown, - ZodVoid: () => ZodVoid, - ZodXID: () => ZodXID, - ZodXor: () => ZodXor, - _ZodString: () => _ZodString, - _default: () => _default2, - _function: () => _function, - any: () => any, - array: () => array, - base64: () => base642, - base64url: () => base64url2, - bigint: () => bigint2, - boolean: () => boolean2, - catch: () => _catch2, - check: () => check, - cidrv4: () => cidrv42, - cidrv6: () => cidrv62, - codec: () => codec, - cuid: () => cuid3, - cuid2: () => cuid22, - custom: () => custom, - date: () => date3, - describe: () => describe2, - discriminatedUnion: () => discriminatedUnion, - e164: () => e1642, - email: () => email2, - emoji: () => emoji2, - enum: () => _enum2, - exactOptional: () => exactOptional, - file: () => file, - float32: () => float32, - float64: () => float64, - function: () => _function, - guid: () => guid2, - hash: () => hash, - hex: () => hex2, - hostname: () => hostname2, - httpUrl: () => httpUrl, - instanceof: () => _instanceof, - int: () => int, - int32: () => int32, - int64: () => int64, - intersection: () => intersection, - ipv4: () => ipv42, - ipv6: () => ipv62, - json: () => json, - jwt: () => jwt, - keyof: () => keyof, - ksuid: () => ksuid2, - lazy: () => lazy, - literal: () => literal, - looseObject: () => looseObject, - looseRecord: () => looseRecord, - mac: () => mac2, - map: () => map, - meta: () => meta2, - nan: () => nan, - nanoid: () => nanoid2, - nativeEnum: () => nativeEnum, - never: () => never, - nonoptional: () => nonoptional, - null: () => _null3, - nullable: () => nullable, - nullish: () => nullish2, - number: () => number2, - object: () => object, - optional: () => optional, - partialRecord: () => partialRecord, - pipe: () => pipe, - prefault: () => prefault, - preprocess: () => preprocess, - promise: () => promise, - readonly: () => readonly, - record: () => record, - refine: () => refine, - set: () => set, - strictObject: () => strictObject, - string: () => string2, - stringFormat: () => stringFormat, - stringbool: () => stringbool, - success: () => success, - superRefine: () => superRefine, - symbol: () => symbol, - templateLiteral: () => templateLiteral, - transform: () => transform, - tuple: () => tuple, - uint32: () => uint32, - uint64: () => uint64, - ulid: () => ulid2, - undefined: () => _undefined3, - union: () => union, - unknown: () => unknown, - url: () => url2, - uuid: () => uuid2, - uuidv4: () => uuidv4, - uuidv6: () => uuidv6, - uuidv7: () => uuidv7, - void: () => _void2, - xid: () => xid2, - xor: () => xor -}); - -// node_modules/testing-farm/node_modules/zod/v4/classic/checks.js -var checks_exports2 = {}; -__export(checks_exports2, { - endsWith: () => _endsWith, - gt: () => _gt, - gte: () => _gte, - includes: () => _includes, - length: () => _length, - lowercase: () => _lowercase, - lt: () => _lt, - lte: () => _lte, - maxLength: () => _maxLength, - maxSize: () => _maxSize, - mime: () => _mime, - minLength: () => _minLength, - minSize: () => _minSize, - multipleOf: () => _multipleOf, - negative: () => _negative, - nonnegative: () => _nonnegative, - nonpositive: () => _nonpositive, - normalize: () => _normalize, - overwrite: () => _overwrite, - positive: () => _positive, - property: () => _property, - regex: () => _regex, - size: () => _size, - slugify: () => _slugify, - startsWith: () => _startsWith, - toLowerCase: () => _toLowerCase, - toUpperCase: () => _toUpperCase, - trim: () => _trim, - uppercase: () => _uppercase -}); - -// node_modules/testing-farm/node_modules/zod/v4/classic/iso.js -var iso_exports = {}; -__export(iso_exports, { - ZodISODate: () => ZodISODate, - ZodISODateTime: () => ZodISODateTime, - ZodISODuration: () => ZodISODuration, - ZodISOTime: () => ZodISOTime, - date: () => date2, - datetime: () => datetime2, - duration: () => duration2, - time: () => time2 -}); -var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { - $ZodISODateTime.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function datetime2(params) { - return _isoDateTime(ZodISODateTime, params); -} -var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { - $ZodISODate.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function date2(params) { - return _isoDate(ZodISODate, params); -} -var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { - $ZodISOTime.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function time2(params) { - return _isoTime(ZodISOTime, params); -} -var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { - $ZodISODuration.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function duration2(params) { - return _isoDuration(ZodISODuration, params); +// node_modules/testing-farm/node_modules/zod/v4/locales/pt.js +var error35 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue4.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue4.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Muito grande: esperado que ${issue4.origin ?? "valor"} tivesse ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue4.origin ?? "valor"} fosse ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue4.origin} tivesse ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue4.origin} fosse ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Chave${issue4.keys.length > 1 ? "s" : ""} desconhecida${issue4.keys.length > 1 ? "s" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue4.origin}`; + default: + return `Campo inv\xE1lido`; + } + }; +}; +function pt_default() { + return { + localeError: error35() + }; } -// node_modules/testing-farm/node_modules/zod/v4/classic/errors.js -var initializer2 = (inst, issues) => { - $ZodError.init(inst, issues); - inst.name = "ZodError"; - Object.defineProperties(inst, { - format: { - value: (mapper) => formatError(inst, mapper) - // enumerable: false, +// node_modules/testing-farm/node_modules/zod/v4/locales/ru.js +function getRussianPlural(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; + } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; +} +var error36 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" }, - flatten: { - value: (mapper) => flattenError(inst, mapper) - // enumerable: false, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" }, - addIssue: { - value: (issue5) => { - inst.issues.push(issue5); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); - } - // enumerable: false, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" }, - addIssues: { - value: (issues2) => { - inst.issues.push(...issues2); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue4.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; + } + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; } - // enumerable: false, - }, - isEmpty: { - get() { - return inst.issues.length === 0; + case "invalid_value": + if (issue4.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive(issue4.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue4.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue4.maximum.toString()}`; } - // enumerable: false, + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.minimum); + const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue4.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue4.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue4.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue4.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; } - }); + }; }; -var ZodError = $constructor("ZodError", initializer2); -var ZodRealError = $constructor("ZodError", initializer2, { - Parent: Error -}); - -// node_modules/testing-farm/node_modules/zod/v4/classic/parse.js -var parse2 = /* @__PURE__ */ _parse(ZodRealError); -var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); -var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); -var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); -var encode4 = /* @__PURE__ */ _encode(ZodRealError); -var decode2 = /* @__PURE__ */ _decode(ZodRealError); -var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); -var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); -var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); -var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); -var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); -var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); +function ru_default() { + return { + localeError: error36() + }; +} -// node_modules/testing-farm/node_modules/zod/v4/classic/schemas.js -var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { - $ZodType.init(inst, def); - Object.assign(inst["~standard"], { - jsonSchema: { - input: createStandardJSONSchemaMethod(inst, "input"), - output: createStandardJSONSchemaMethod(inst, "output") - } - }); - inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); - inst.def = def; - inst.type = def.type; - Object.defineProperty(inst, "_def", { value: def }); - inst.check = (...checks) => { - return inst.clone(util_exports.mergeDefs(def, { - checks: [ - ...def.checks ?? [], - ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) - ] - }), { - parent: true - }); +// node_modules/testing-farm/node_modules/zod/v4/locales/sl.js +var error37 = () => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } }; - inst.with = inst.check; - inst.clone = (def2, params) => clone(inst, def2, params); - inst.brand = () => inst; - inst.register = ((reg, meta6) => { - reg.add(inst, meta6); - return inst; - }); - inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); - inst.safeParse = (data, params) => safeParse2(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); - inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); - inst.spa = inst.safeParseAsync; - inst.encode = (data, params) => encode4(inst, data, params); - inst.decode = (data, params) => decode2(inst, data, params); - inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); - inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); - inst.safeEncode = (data, params) => safeEncode2(inst, data, params); - inst.safeDecode = (data, params) => safeDecode2(inst, data, params); - inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); - inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); - inst.refine = (check4, params) => inst.check(refine(check4, params)); - inst.superRefine = (refinement) => inst.check(superRefine(refinement)); - inst.overwrite = (fn) => inst.check(_overwrite(fn)); - inst.optional = () => optional(inst); - inst.exactOptional = () => exactOptional(inst); - inst.nullable = () => nullable(inst); - inst.nullish = () => optional(nullable(inst)); - inst.nonoptional = (params) => nonoptional(inst, params); - inst.array = () => array(inst); - inst.or = (arg) => union([inst, arg]); - inst.and = (arg) => intersection(inst, arg); - inst.transform = (tx) => pipe(inst, transform(tx)); - inst.default = (def2) => _default2(inst, def2); - inst.prefault = (def2) => prefault(inst, def2); - inst.catch = (params) => _catch2(inst, params); - inst.pipe = (target) => pipe(inst, target); - inst.readonly = () => readonly(inst); - inst.describe = (description) => { - const cl = inst.clone(); - globalRegistry.add(cl, { description }); - return cl; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" }; - Object.defineProperty(inst, "description", { - get() { - return globalRegistry.get(inst)?.description; - }, - configurable: true - }); - inst.meta = (...args) => { - if (args.length === 0) { - return globalRegistry.get(inst); + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue4.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue4.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue4.origin ?? "vrednost"} imelo ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue4.origin ?? "vrednost"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue4.origin} imelo ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue4.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue4.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue4.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue4.origin}`; + default: + return "Neveljaven vnos"; } - const cl = inst.clone(); - globalRegistry.add(cl, args[0]); - return cl; }; - inst.isOptional = () => inst.safeParse(void 0).success; - inst.isNullable = () => inst.safeParse(null).success; - inst.apply = (fn) => fn(inst); - return inst; -}); -var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { - $ZodString.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => stringProcessor(inst, ctx, json4, params); - const bag = inst._zod.bag; - inst.format = bag.format ?? null; - inst.minLength = bag.minimum ?? null; - inst.maxLength = bag.maximum ?? null; - inst.regex = (...args) => inst.check(_regex(...args)); - inst.includes = (...args) => inst.check(_includes(...args)); - inst.startsWith = (...args) => inst.check(_startsWith(...args)); - inst.endsWith = (...args) => inst.check(_endsWith(...args)); - inst.min = (...args) => inst.check(_minLength(...args)); - inst.max = (...args) => inst.check(_maxLength(...args)); - inst.length = (...args) => inst.check(_length(...args)); - inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); - inst.lowercase = (params) => inst.check(_lowercase(params)); - inst.uppercase = (params) => inst.check(_uppercase(params)); - inst.trim = () => inst.check(_trim()); - inst.normalize = (...args) => inst.check(_normalize(...args)); - inst.toLowerCase = () => inst.check(_toLowerCase()); - inst.toUpperCase = () => inst.check(_toUpperCase()); - inst.slugify = () => inst.check(_slugify()); -}); -var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { - $ZodString.init(inst, def); - _ZodString.init(inst, def); - inst.email = (params) => inst.check(_email(ZodEmail, params)); - inst.url = (params) => inst.check(_url(ZodURL, params)); - inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); - inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); - inst.guid = (params) => inst.check(_guid(ZodGUID, params)); - inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); - inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); - inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); - inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); - inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); - inst.guid = (params) => inst.check(_guid(ZodGUID, params)); - inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); - inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); - inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); - inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); - inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); - inst.xid = (params) => inst.check(_xid(ZodXID, params)); - inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); - inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); - inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); - inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); - inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); - inst.e164 = (params) => inst.check(_e164(ZodE164, params)); - inst.datetime = (params) => inst.check(datetime2(params)); - inst.date = (params) => inst.check(date2(params)); - inst.time = (params) => inst.check(time2(params)); - inst.duration = (params) => inst.check(duration2(params)); -}); -function string2(params) { - return _string(ZodString, params); -} -var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { - $ZodStringFormat.init(inst, def); - _ZodString.init(inst, def); -}); -var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { - $ZodEmail.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function email2(params) { - return _email(ZodEmail, params); -} -var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { - $ZodGUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function guid2(params) { - return _guid(ZodGUID, params); -} -var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { - $ZodUUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function uuid2(params) { - return _uuid(ZodUUID, params); -} -function uuidv4(params) { - return _uuidv4(ZodUUID, params); -} -function uuidv6(params) { - return _uuidv6(ZodUUID, params); -} -function uuidv7(params) { - return _uuidv7(ZodUUID, params); -} -var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { - $ZodURL.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function url2(params) { - return _url(ZodURL, params); -} -function httpUrl(params) { - return _url(ZodURL, { - protocol: /^https?$/, - hostname: regexes_exports.domain, - ...util_exports.normalizeParams(params) - }); -} -var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { - $ZodEmoji.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function emoji2(params) { - return _emoji2(ZodEmoji, params); -} -var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { - $ZodNanoID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function nanoid2(params) { - return _nanoid(ZodNanoID, params); +}; +function sl_default() { + return { + localeError: error37() + }; } -var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { - $ZodCUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function cuid3(params) { - return _cuid(ZodCUID, params); + +// node_modules/testing-farm/node_modules/zod/v4/locales/sv.js +var error38 = () => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue4.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue4.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue4.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue4.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; + } + }; +}; +function sv_default() { + return { + localeError: error38() + }; } -var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { - $ZodCUID2.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function cuid22(params) { - return _cuid2(ZodCUID2, params); + +// node_modules/testing-farm/node_modules/zod/v4/locales/ta.js +var error39 = () => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue4.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive(issue4.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues(issue4.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue4.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin} ${adj}${issue4.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue4.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue4.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue4.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } + }; +}; +function ta_default() { + return { + localeError: error39() + }; } -var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { - $ZodULID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function ulid2(params) { - return _ulid(ZodULID, params); + +// node_modules/testing-farm/node_modules/zod/v4/locales/th.js +var error40 = () => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue4.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive(issue4.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue4.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue4.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue4.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; +}; +function th_default() { + return { + localeError: error40() + }; } -var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { - $ZodXID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function xid2(params) { - return _xid(ZodXID, params); -} -var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { - $ZodKSUID.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function ksuid2(params) { - return _ksuid(ZodKSUID, params); -} -var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { - $ZodIPv4.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function ipv42(params) { - return _ipv4(ZodIPv4, params); -} -var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { - $ZodMAC.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function mac2(params) { - return _mac(ZodMAC, params); -} -var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { - $ZodIPv6.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function ipv62(params) { - return _ipv6(ZodIPv6, params); -} -var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { - $ZodCIDRv4.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function cidrv42(params) { - return _cidrv4(ZodCIDRv4, params); -} -var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { - $ZodCIDRv6.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function cidrv62(params) { - return _cidrv6(ZodCIDRv6, params); -} -var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { - $ZodBase64.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function base642(params) { - return _base64(ZodBase64, params); -} -var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { - $ZodBase64URL.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function base64url2(params) { - return _base64url(ZodBase64URL, params); -} -var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { - $ZodE164.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function e1642(params) { - return _e164(ZodE164, params); -} -var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { - $ZodJWT.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function jwt(params) { - return _jwt(ZodJWT, params); -} -var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { - $ZodCustomStringFormat.init(inst, def); - ZodStringFormat.init(inst, def); -}); -function stringFormat(format2, fnOrRegex, _params = {}) { - return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params); -} -function hostname2(_params) { - return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); -} -function hex2(_params) { - return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); -} -function hash(alg, params) { - const enc = params?.enc ?? "hex"; - const format2 = `${alg}_${enc}`; - const regex2 = regexes_exports[format2]; - if (!regex2) - throw new Error(`Unrecognized hash format: ${format2}`); - return _stringFormat(ZodCustomStringFormat, format2, regex2, params); -} -var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { - $ZodNumber.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => numberProcessor(inst, ctx, json4, params); - inst.gt = (value, params) => inst.check(_gt(value, params)); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.lt = (value, params) => inst.check(_lt(value, params)); - inst.lte = (value, params) => inst.check(_lte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - inst.int = (params) => inst.check(int(params)); - inst.safe = (params) => inst.check(int(params)); - inst.positive = (params) => inst.check(_gt(0, params)); - inst.nonnegative = (params) => inst.check(_gte(0, params)); - inst.negative = (params) => inst.check(_lt(0, params)); - inst.nonpositive = (params) => inst.check(_lte(0, params)); - inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); - inst.step = (value, params) => inst.check(_multipleOf(value, params)); - inst.finite = () => inst; - const bag = inst._zod.bag; - inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; - inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; - inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); - inst.isFinite = true; - inst.format = bag.format ?? null; -}); -function number2(params) { - return _number(ZodNumber, params); -} -var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { - $ZodNumberFormat.init(inst, def); - ZodNumber.init(inst, def); -}); -function int(params) { - return _int(ZodNumberFormat, params); -} -function float32(params) { - return _float32(ZodNumberFormat, params); -} -function float64(params) { - return _float64(ZodNumberFormat, params); -} -function int32(params) { - return _int32(ZodNumberFormat, params); -} -function uint32(params) { - return _uint32(ZodNumberFormat, params); -} -var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { - $ZodBoolean.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => booleanProcessor(inst, ctx, json4, params); -}); -function boolean2(params) { - return _boolean(ZodBoolean, params); -} -var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { - $ZodBigInt.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => bigintProcessor(inst, ctx, json4, params); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.gt = (value, params) => inst.check(_gt(value, params)); - inst.gte = (value, params) => inst.check(_gte(value, params)); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.lt = (value, params) => inst.check(_lt(value, params)); - inst.lte = (value, params) => inst.check(_lte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - inst.positive = (params) => inst.check(_gt(BigInt(0), params)); - inst.negative = (params) => inst.check(_lt(BigInt(0), params)); - inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); - inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); - inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); - const bag = inst._zod.bag; - inst.minValue = bag.minimum ?? null; - inst.maxValue = bag.maximum ?? null; - inst.format = bag.format ?? null; -}); -function bigint2(params) { - return _bigint(ZodBigInt, params); -} -var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { - $ZodBigIntFormat.init(inst, def); - ZodBigInt.init(inst, def); -}); -function int64(params) { - return _int64(ZodBigIntFormat, params); -} -function uint64(params) { - return _uint64(ZodBigIntFormat, params); -} -var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { - $ZodSymbol.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => symbolProcessor(inst, ctx, json4, params); -}); -function symbol(params) { - return _symbol(ZodSymbol, params); -} -var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { - $ZodUndefined.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => undefinedProcessor(inst, ctx, json4, params); -}); -function _undefined3(params) { - return _undefined2(ZodUndefined, params); -} -var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { - $ZodNull.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nullProcessor(inst, ctx, json4, params); -}); -function _null3(params) { - return _null2(ZodNull, params); -} -var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { - $ZodAny.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => anyProcessor(inst, ctx, json4, params); -}); -function any() { - return _any(ZodAny); -} -var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { - $ZodUnknown.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => unknownProcessor(inst, ctx, json4, params); -}); -function unknown() { - return _unknown(ZodUnknown); -} -var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { - $ZodNever.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => neverProcessor(inst, ctx, json4, params); -}); -function never(params) { - return _never(ZodNever, params); -} -var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { - $ZodVoid.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => voidProcessor(inst, ctx, json4, params); -}); -function _void2(params) { - return _void(ZodVoid, params); -} -var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { - $ZodDate.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => dateProcessor(inst, ctx, json4, params); - inst.min = (value, params) => inst.check(_gte(value, params)); - inst.max = (value, params) => inst.check(_lte(value, params)); - const c = inst._zod.bag; - inst.minDate = c.minimum ? new Date(c.minimum) : null; - inst.maxDate = c.maximum ? new Date(c.maximum) : null; -}); -function date3(params) { - return _date(ZodDate, params); -} -var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { - $ZodArray.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => arrayProcessor(inst, ctx, json4, params); - inst.element = def.element; - inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); - inst.nonempty = (params) => inst.check(_minLength(1, params)); - inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); - inst.length = (len, params) => inst.check(_length(len, params)); - inst.unwrap = () => inst.element; -}); -function array(element, params) { - return _array(ZodArray, element, params); -} -function keyof(schema) { - const shape = schema._zod.def.shape; - return _enum2(Object.keys(shape)); -} -var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { - $ZodObjectJIT.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => objectProcessor(inst, ctx, json4, params); - util_exports.defineLazy(inst, "shape", () => { - return def.shape; - }); - inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); - inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); - inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); - inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); - inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); - inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); - inst.extend = (incoming) => { - return util_exports.extend(inst, incoming); + +// node_modules/testing-farm/node_modules/zod/v4/locales/tr.js +var error41 = () => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } }; - inst.safeExtend = (incoming) => { - return util_exports.safeExtend(inst, incoming); + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" }; - inst.merge = (other) => util_exports.merge(inst, other); - inst.pick = (mask) => util_exports.pick(inst, mask); - inst.omit = (mask) => util_exports.omit(inst, mask); - inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); - inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); -}); -function object(shape, params) { - const def = { - type: "object", - shape: shape ?? {}, - ...util_exports.normalizeParams(params) + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue4.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue4.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue4.origin ?? "de\u011Fer"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue4.origin ?? "de\u011Fer"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue4.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue4.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; +}; +function tr_default() { + return { + localeError: error41() }; - return new ZodObject(def); -} -function strictObject(shape, params) { - return new ZodObject({ - type: "object", - shape, - catchall: never(), - ...util_exports.normalizeParams(params) - }); -} -function looseObject(shape, params) { - return new ZodObject({ - type: "object", - shape, - catchall: unknown(), - ...util_exports.normalizeParams(params) - }); -} -var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { - $ZodUnion.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor(inst, ctx, json4, params); - inst.options = def.options; -}); -function union(options, params) { - return new ZodUnion({ - type: "union", - options, - ...util_exports.normalizeParams(params) - }); } -var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { - ZodUnion.init(inst, def); - $ZodXor.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor(inst, ctx, json4, params); - inst.options = def.options; -}); -function xor(options, params) { - return new ZodXor({ - type: "union", - options, - inclusive: false, - ...util_exports.normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/uk.js +var error42 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue4.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive(issue4.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin} \u0431\u0443\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue4.origin}`; + case "invalid_union": + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; + case "invalid_element": + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue4.origin}`; + default: + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; + } + }; +}; +function uk_default() { + return { + localeError: error42() + }; } -var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { - ZodUnion.init(inst, def); - $ZodDiscriminatedUnion.init(inst, def); -}); -function discriminatedUnion(discriminator, options, params) { - return new ZodDiscriminatedUnion({ - type: "union", - options, - discriminator, - ...util_exports.normalizeParams(params) - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/ua.js +function ua_default() { + return uk_default(); } -var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { - $ZodIntersection.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => intersectionProcessor(inst, ctx, json4, params); -}); -function intersection(left, right) { - return new ZodIntersection({ - type: "intersection", - left, - right - }); -} -var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { - $ZodTuple.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => tupleProcessor(inst, ctx, json4, params); - inst.rest = (rest) => inst.clone({ - ...inst._zod.def, - rest - }); -}); -function tuple(items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new ZodTuple({ - type: "tuple", - items, - rest, - ...util_exports.normalizeParams(params) - }); -} -var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { - $ZodRecord.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => recordProcessor(inst, ctx, json4, params); - inst.keyType = def.keyType; - inst.valueType = def.valueType; -}); -function record(keyType, valueType, params) { - return new ZodRecord({ - type: "record", - keyType, - valueType, - ...util_exports.normalizeParams(params) - }); -} -function partialRecord(keyType, valueType, params) { - const k = clone(keyType); - k._zod.values = void 0; - return new ZodRecord({ - type: "record", - keyType: k, - valueType, - ...util_exports.normalizeParams(params) - }); -} -function looseRecord(keyType, valueType, params) { - return new ZodRecord({ - type: "record", - keyType, - valueType, - mode: "loose", - ...util_exports.normalizeParams(params) - }); -} -var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { - $ZodMap.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => mapProcessor(inst, ctx, json4, params); - inst.keyType = def.keyType; - inst.valueType = def.valueType; - inst.min = (...args) => inst.check(_minSize(...args)); - inst.nonempty = (params) => inst.check(_minSize(1, params)); - inst.max = (...args) => inst.check(_maxSize(...args)); - inst.size = (...args) => inst.check(_size(...args)); -}); -function map(keyType, valueType, params) { - return new ZodMap({ - type: "map", - keyType, - valueType, - ...util_exports.normalizeParams(params) - }); -} -var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { - $ZodSet.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => setProcessor(inst, ctx, json4, params); - inst.min = (...args) => inst.check(_minSize(...args)); - inst.nonempty = (params) => inst.check(_minSize(1, params)); - inst.max = (...args) => inst.check(_maxSize(...args)); - inst.size = (...args) => inst.check(_size(...args)); -}); -function set(valueType, params) { - return new ZodSet({ - type: "set", - valueType, - ...util_exports.normalizeParams(params) - }); -} -var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { - $ZodEnum.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => enumProcessor(inst, ctx, json4, params); - inst.enum = def.entries; - inst.options = Object.values(def.entries); - const keys = new Set(Object.keys(def.entries)); - inst.extract = (values, params) => { - const newEntries = {}; - for (const value of values) { - if (keys.has(value)) { - newEntries[value] = def.entries[value]; - } else - throw new Error(`Key ${value} not found in enum`); - } - return new ZodEnum({ - ...def, - checks: [], - ...util_exports.normalizeParams(params), - entries: newEntries - }); + +// node_modules/testing-farm/node_modules/zod/v4/locales/ur.js +var error43 = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } }; - inst.exclude = (values, params) => { - const newEntries = { ...def.entries }; - for (const value of values) { - if (keys.has(value)) { - delete newEntries[value]; - } else - throw new Error(`Key ${value} not found in enum`); - } - return new ZodEnum({ - ...def, - checks: [], - ...util_exports.normalizeParams(params), - entries: newEntries - }); + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" }; -}); -function _enum2(values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new ZodEnum({ - type: "enum", - entries, - ...util_exports.normalizeParams(params) - }); -} -function nativeEnum(entries, params) { - return new ZodEnum({ - type: "enum", - entries, - ...util_exports.normalizeParams(params) - }); -} -var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { - $ZodLiteral.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => literalProcessor(inst, ctx, json4, params); - inst.values = new Set(def.values); - Object.defineProperty(inst, "value", { - get() { - if (def.values.length > 1) { - throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + const TypeDictionary = { + nan: "NaN", + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue4.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + } + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; } - return def.values[0]; - } - }); -}); -function literal(value, params) { - return new ZodLiteral({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...util_exports.normalizeParams(params) - }); -} -var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { - $ZodFile.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => fileProcessor(inst, ctx, json4, params); - inst.min = (size, params) => inst.check(_minSize(size, params)); - inst.max = (size, params) => inst.check(_maxSize(size, params)); - inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); -}); -function file(params) { - return _file(ZodFile, params); -} -var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { - $ZodTransform.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => transformProcessor(inst, ctx, json4, params); - inst._zod.parse = (payload, _ctx) => { - if (_ctx.direction === "backward") { - throw new $ZodEncodeError(inst.constructor.name); - } - payload.addIssue = (issue5) => { - if (typeof issue5 === "string") { - payload.issues.push(util_exports.issue(issue5, payload.value, def)); - } else { - const _issue = issue5; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = inst); - payload.issues.push(util_exports.issue(_issue)); + case "invalid_value": + if (issue4.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue4.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue4.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue4.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue4.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue4.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } - }; - const output = def.transform(payload.value, payload); - if (output instanceof Promise) { - return output.then((output2) => { - payload.value = output2; - return payload; - }); + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue4.origin} \u06A9\u06D2 ${adj}${issue4.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + } + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue4.origin} \u06A9\u0627 ${adj}${issue4.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + } + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue4.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + case "unrecognized_keys": + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue4.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue4.keys, "\u060C ")}`; + case "invalid_key": + return `${issue4.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + case "invalid_union": + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; + case "invalid_element": + return `${issue4.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + default: + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; } - payload.value = output; - return payload; }; -}); -function transform(fn) { - return new ZodTransform({ - type: "transform", - transform: fn - }); -} -var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { - $ZodOptional.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => optionalProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function optional(innerType) { - return new ZodOptional({ - type: "optional", - innerType - }); -} -var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { - $ZodExactOptional.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => optionalProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function exactOptional(innerType) { - return new ZodExactOptional({ - type: "optional", - innerType - }); -} -var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { - $ZodNullable.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nullableProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nullable(innerType) { - return new ZodNullable({ - type: "nullable", - innerType - }); -} -function nullish2(innerType) { - return optional(nullable(innerType)); +}; +function ur_default() { + return { + localeError: error43() + }; } -var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { - $ZodDefault.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => defaultProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeDefault = inst.unwrap; -}); -function _default2(innerType, defaultValue) { - return new ZodDefault({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + +// node_modules/testing-farm/node_modules/zod/v4/locales/uz.js +var error44 = () => { + const Sizable = { + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", + jwt: "JWT", + template_literal: "kirish" + }; + const TypeDictionary = { + nan: "NaN", + number: "raqam", + array: "massiv" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue4.expected}, qabul qilingan ${received}`; + } + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive(issue4.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Juda katta: kutilgan ${issue4.origin ?? "qiymat"} ${adj}${issue4.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue4.origin ?? "qiymat"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Juda kichik: kutilgan ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + return `Juda kichik: kutilgan ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; + if (_issue.format === "ends_with") + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; + if (_issue.format === "includes") + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Noto\u2018g\u2018ri raqam: ${issue4.divisor} ning karralisi bo\u2018lishi kerak`; + case "unrecognized_keys": + return `Noma\u2019lum kalit${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} dagi kalit noto\u2018g\u2018ri`; + case "invalid_union": + return "Noto\u2018g\u2018ri kirish"; + case "invalid_element": + return `${issue4.origin} da noto\u2018g\u2018ri qiymat`; + default: + return `Noto\u2018g\u2018ri kirish`; } - }); + }; +}; +function uz_default() { + return { + localeError: error44() + }; } -var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { - $ZodPrefault.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => prefaultProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function prefault(innerType, defaultValue) { - return new ZodPrefault({ - type: "prefault", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + +// node_modules/testing-farm/node_modules/zod/v4/locales/vi.js +var error45 = () => { + const Sizable = { + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", + jwt: "JWT", + template_literal: "\u0111\u1EA7u v\xE0o" + }; + const TypeDictionary = { + nan: "NaN", + number: "s\u1ED1", + array: "m\u1EA3ng" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue4.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue4.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue4.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue4.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; + if (_issue.format === "regex") + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} kh\xF4ng h\u1EE3p l\u1EC7`; + } + case "not_multiple_of": + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue4.divisor}`; + case "unrecognized_keys": + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue4.origin}`; + case "invalid_union": + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; + case "invalid_element": + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue4.origin}`; + default: + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; } - }); + }; +}; +function vi_default() { + return { + localeError: error45() + }; } -var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { - $ZodNonOptional.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nonoptionalProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nonoptional(innerType, params) { - return new ZodNonOptional({ - type: "nonoptional", - innerType, - ...util_exports.normalizeParams(params) + +// node_modules/testing-farm/node_modules/zod/v4/locales/zh-CN.js +var error46 = () => { + const Sizable = { + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", + url: "URL", + emoji: "\u8868\u60C5\u7B26\u53F7", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", + jwt: "JWT", + template_literal: "\u8F93\u5165" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue4.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue4.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue4.origin ?? "\u503C"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue4.origin ?? "\u503C"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; + if (_issue.format === "ends_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; + if (_issue.format === "includes") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue4.divisor} \u7684\u500D\u6570`; + case "unrecognized_keys": + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + case "invalid_union": + return "\u65E0\u6548\u8F93\u5165"; + case "invalid_element": + return `${issue4.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + default: + return `\u65E0\u6548\u8F93\u5165`; + } + }; +}; +function zh_CN_default() { + return { + localeError: error46() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/zh-TW.js +var error47 = () => { + const Sizable = { + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", + jwt: "JWT", + template_literal: "\u8F38\u5165" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue4.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue4.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue4.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue4.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue4.origin} \u61C9\u70BA ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue4.origin} \u61C9\u70BA ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } + if (_issue.format === "ends_with") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; + if (_issue.format === "includes") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue4.divisor} \u7684\u500D\u6578`; + case "unrecognized_keys": + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue4.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue4.keys, "\u3001")}`; + case "invalid_key": + return `${issue4.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + case "invalid_union": + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; + case "invalid_element": + return `${issue4.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + default: + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; + } + }; +}; +function zh_TW_default() { + return { + localeError: error47() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/locales/yo.js +var error48 = () => { + const Sizable = { + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", + jwt: "JWT", + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue4.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive(issue4.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue4.origin ?? "iye"} ${sizing.verb} ${adj}${issue4.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue4.maximum}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue4.minimum}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue4.divisor}`; + case "unrecognized_keys": + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues(issue4.keys, ", ")}`; + case "invalid_key": + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue4.origin}`; + case "invalid_union": + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + case "invalid_element": + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue4.origin}`; + default: + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; + } + }; +}; +function yo_default() { + return { + localeError: error48() + }; +} + +// node_modules/testing-farm/node_modules/zod/v4/core/registries.js +var _a; +var $output = /* @__PURE__ */ Symbol("ZodOutput"); +var $input = /* @__PURE__ */ Symbol("ZodInput"); +var $ZodRegistry = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta5 = _meta[0]; + this._map.set(schema, meta5); + if (meta5 && typeof meta5 === "object" && "id" in meta5) { + this._idmap.set(meta5.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta5 = this._map.get(schema); + if (meta5 && typeof meta5 === "object" && "id" in meta5) { + this._idmap.delete(meta5.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p = schema._zod.parent; + if (p) { + const pm = { ...this.get(p) ?? {} }; + delete pm.id; + const f = { ...pm, ...this._map.get(schema) }; + return Object.keys(f).length ? f : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } +}; +function registry() { + return new $ZodRegistry(); +} +(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry()); +var globalRegistry = globalThis.__zod_globalRegistry; + +// node_modules/testing-farm/node_modules/zod/v4/core/api.js +// @__NO_SIDE_EFFECTS__ +function _string(Class3, params) { + return new Class3({ + type: "string", + ...normalizeParams(params) }); } -var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { - $ZodSuccess.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => successProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function success(innerType) { - return new ZodSuccess({ - type: "success", - innerType +// @__NO_SIDE_EFFECTS__ +function _coercedString(Class3, params) { + return new Class3({ + type: "string", + coerce: true, + ...normalizeParams(params) }); } -var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { - $ZodCatch.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => catchProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeCatch = inst.unwrap; -}); -function _catch2(innerType, catchValue) { - return new ZodCatch({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue +// @__NO_SIDE_EFFECTS__ +function _email(Class3, params) { + return new Class3({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams(params) }); } -var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { - $ZodNaN.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nanProcessor(inst, ctx, json4, params); -}); -function nan(params) { - return _nan(ZodNaN, params); +// @__NO_SIDE_EFFECTS__ +function _guid(Class3, params) { + return new Class3({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { - $ZodPipe.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => pipeProcessor(inst, ctx, json4, params); - inst.in = def.in; - inst.out = def.out; -}); -function pipe(in_, out) { - return new ZodPipe({ - type: "pipe", - in: in_, - out - // ...util.normalizeParams(params), +// @__NO_SIDE_EFFECTS__ +function _uuid(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams(params) }); } -var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { - ZodPipe.init(inst, def); - $ZodCodec.init(inst, def); -}); -function codec(in_, out, params) { - return new ZodCodec({ - type: "pipe", - in: in_, - out, - transform: params.decode, - reverseTransform: params.encode +// @__NO_SIDE_EFFECTS__ +function _uuidv4(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams(params) }); } -var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { - $ZodReadonly.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => readonlyProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function readonly(innerType) { - return new ZodReadonly({ - type: "readonly", - innerType +// @__NO_SIDE_EFFECTS__ +function _uuidv6(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams(params) }); } -var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { - $ZodTemplateLiteral.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => templateLiteralProcessor(inst, ctx, json4, params); -}); -function templateLiteral(parts, params) { - return new ZodTemplateLiteral({ - type: "template_literal", - parts, - ...util_exports.normalizeParams(params) +// @__NO_SIDE_EFFECTS__ +function _uuidv7(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams(params) }); } -var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { - $ZodLazy.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => lazyProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.getter(); -}); -function lazy(getter) { - return new ZodLazy({ - type: "lazy", - getter +// @__NO_SIDE_EFFECTS__ +function _url(Class3, params) { + return new Class3({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams(params) }); } -var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { - $ZodPromise.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => promiseProcessor(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function promise(innerType) { - return new ZodPromise({ - type: "promise", - innerType +// @__NO_SIDE_EFFECTS__ +function _emoji2(Class3, params) { + return new Class3({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams(params) }); } -var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { - $ZodFunction.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => functionProcessor(inst, ctx, json4, params); -}); -function _function(params) { - return new ZodFunction({ - type: "function", - input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), - output: params?.output ?? unknown() +// @__NO_SIDE_EFFECTS__ +function _nanoid(Class3, params) { + return new Class3({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams(params) }); } -var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { - $ZodCustom.init(inst, def); - ZodType.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => customProcessor(inst, ctx, json4, params); -}); -function check(fn) { - const ch = new $ZodCheck({ - check: "custom" - // ...util.normalizeParams(params), +// @__NO_SIDE_EFFECTS__ +function _cuid(Class3, params) { + return new Class3({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams(params) }); - ch._zod.check = fn; - return ch; } -function custom(fn, _params) { - return _custom(ZodCustom, fn ?? (() => true), _params); +// @__NO_SIDE_EFFECTS__ +function _cuid2(Class3, params) { + return new Class3({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -function refine(fn, _params = {}) { - return _refine(ZodCustom, fn, _params); +// @__NO_SIDE_EFFECTS__ +function _ulid(Class3, params) { + return new Class3({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -function superRefine(fn) { - return _superRefine(fn); +// @__NO_SIDE_EFFECTS__ +function _xid(Class3, params) { + return new Class3({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -var describe2 = describe; -var meta2 = meta; -function _instanceof(cls, params = {}) { - const inst = new ZodCustom({ - type: "custom", - check: "custom", - fn: (data) => data instanceof cls, - abort: true, - ...util_exports.normalizeParams(params) +// @__NO_SIDE_EFFECTS__ +function _ksuid(Class3, params) { + return new Class3({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams(params) }); - inst._zod.bag.Class = cls; - inst._zod.check = (payload) => { - if (!(payload.value instanceof cls)) { - payload.issues.push({ - code: "invalid_type", - expected: cls.name, - input: payload.value, - inst, - path: [...inst._zod.def.path ?? []] - }); - } - }; - return inst; } -var stringbool = (...args) => _stringbool({ - Codec: ZodCodec, - Boolean: ZodBoolean, - String: ZodString -}, ...args); -function json(params) { - const jsonSchema = lazy(() => { - return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); +// @__NO_SIDE_EFFECTS__ +function _ipv4(Class3, params) { + return new Class3({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams(params) }); - return jsonSchema; } -function preprocess(fn, schema) { - return pipe(transform(fn), schema); +// @__NO_SIDE_EFFECTS__ +function _ipv6(Class3, params) { + return new Class3({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } - -// node_modules/testing-farm/node_modules/zod/v4/classic/compat.js -var ZodIssueCode = { - invalid_type: "invalid_type", - too_big: "too_big", - too_small: "too_small", - invalid_format: "invalid_format", - not_multiple_of: "not_multiple_of", - unrecognized_keys: "unrecognized_keys", - invalid_union: "invalid_union", - invalid_key: "invalid_key", - invalid_element: "invalid_element", - invalid_value: "invalid_value", - custom: "custom" -}; -function setErrorMap(map4) { - config({ - customError: map4 +// @__NO_SIDE_EFFECTS__ +function _mac(Class3, params) { + return new Class3({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams(params) }); } -function getErrorMap() { - return config().customError; +// @__NO_SIDE_EFFECTS__ +function _cidrv4(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -var ZodFirstPartyTypeKind; -/* @__PURE__ */ (function(ZodFirstPartyTypeKind4) { -})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); - -// node_modules/testing-farm/node_modules/zod/v4/classic/from-json-schema.js -var z = { - ...schemas_exports2, - ...checks_exports2, - iso: iso_exports -}; -var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ - // Schema identification - "$schema", - "$ref", - "$defs", - "definitions", - // Core schema keywords - "$id", - "id", - "$comment", - "$anchor", - "$vocabulary", - "$dynamicRef", - "$dynamicAnchor", - // Type - "type", - "enum", - "const", - // Composition - "anyOf", - "oneOf", - "allOf", - "not", - // Object - "properties", - "required", - "additionalProperties", - "patternProperties", - "propertyNames", - "minProperties", - "maxProperties", - // Array - "items", - "prefixItems", - "additionalItems", - "minItems", - "maxItems", - "uniqueItems", - "contains", - "minContains", - "maxContains", - // String - "minLength", - "maxLength", - "pattern", - "format", - // Number - "minimum", - "maximum", - "exclusiveMinimum", - "exclusiveMaximum", - "multipleOf", - // Already handled metadata - "description", - "default", - // Content - "contentEncoding", - "contentMediaType", - "contentSchema", - // Unsupported (error-throwing) - "unevaluatedItems", - "unevaluatedProperties", - "if", - "then", - "else", - "dependentSchemas", - "dependentRequired", - // OpenAPI - "nullable", - "readOnly" -]); -function detectVersion(schema, defaultTarget) { - const $schema = schema.$schema; - if ($schema === "https://json-schema.org/draft/2020-12/schema") { - return "draft-2020-12"; - } - if ($schema === "http://json-schema.org/draft-07/schema#") { - return "draft-7"; - } - if ($schema === "http://json-schema.org/draft-04/schema#") { - return "draft-4"; - } - return defaultTarget ?? "draft-2020-12"; +// @__NO_SIDE_EFFECTS__ +function _cidrv6(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -function resolveRef(ref, ctx) { - if (!ref.startsWith("#")) { - throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); - } - const path = ref.slice(1).split("/").filter(Boolean); - if (path.length === 0) { - return ctx.rootSchema; - } - const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; - if (path[0] === defsKey) { - const key = path[1]; - if (!key || !ctx.defs[key]) { - throw new Error(`Reference not found: ${ref}`); - } - return ctx.defs[key]; - } - throw new Error(`Reference not found: ${ref}`); +// @__NO_SIDE_EFFECTS__ +function _base64(Class3, params) { + return new Class3({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -function convertBaseSchema(schema, ctx) { - if (schema.not !== void 0) { - if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { - return z.never(); - } - throw new Error("not is not supported in Zod (except { not: {} } for never)"); - } - if (schema.unevaluatedItems !== void 0) { - throw new Error("unevaluatedItems is not supported"); - } - if (schema.unevaluatedProperties !== void 0) { - throw new Error("unevaluatedProperties is not supported"); - } - if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { - throw new Error("Conditional schemas (if/then/else) are not supported"); - } - if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { - throw new Error("dependentSchemas and dependentRequired are not supported"); - } - if (schema.$ref) { - const refPath = schema.$ref; - if (ctx.refs.has(refPath)) { - return ctx.refs.get(refPath); - } - if (ctx.processing.has(refPath)) { - return z.lazy(() => { - if (!ctx.refs.has(refPath)) { - throw new Error(`Circular reference not resolved: ${refPath}`); - } - return ctx.refs.get(refPath); - }); - } - ctx.processing.add(refPath); - const resolved = resolveRef(refPath, ctx); - const zodSchema2 = convertSchema(resolved, ctx); - ctx.refs.set(refPath, zodSchema2); - ctx.processing.delete(refPath); - return zodSchema2; - } - if (schema.enum !== void 0) { - const enumValues = schema.enum; - if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { - return z.null(); - } - if (enumValues.length === 0) { - return z.never(); - } - if (enumValues.length === 1) { - return z.literal(enumValues[0]); - } - if (enumValues.every((v) => typeof v === "string")) { - return z.enum(enumValues); - } - const literalSchemas = enumValues.map((v) => z.literal(v)); - if (literalSchemas.length < 2) { - return literalSchemas[0]; - } - return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); - } - if (schema.const !== void 0) { - return z.literal(schema.const); - } - const type = schema.type; - if (Array.isArray(type)) { - const typeSchemas = type.map((t) => { - const typeSchema = { ...schema, type: t }; - return convertBaseSchema(typeSchema, ctx); - }); - if (typeSchemas.length === 0) { - return z.never(); - } - if (typeSchemas.length === 1) { - return typeSchemas[0]; - } - return z.union(typeSchemas); - } - if (!type) { - return z.any(); - } - let zodSchema; - switch (type) { - case "string": { - let stringSchema = z.string(); - if (schema.format) { - const format2 = schema.format; - if (format2 === "email") { - stringSchema = stringSchema.check(z.email()); - } else if (format2 === "uri" || format2 === "uri-reference") { - stringSchema = stringSchema.check(z.url()); - } else if (format2 === "uuid" || format2 === "guid") { - stringSchema = stringSchema.check(z.uuid()); - } else if (format2 === "date-time") { - stringSchema = stringSchema.check(z.iso.datetime()); - } else if (format2 === "date") { - stringSchema = stringSchema.check(z.iso.date()); - } else if (format2 === "time") { - stringSchema = stringSchema.check(z.iso.time()); - } else if (format2 === "duration") { - stringSchema = stringSchema.check(z.iso.duration()); - } else if (format2 === "ipv4") { - stringSchema = stringSchema.check(z.ipv4()); - } else if (format2 === "ipv6") { - stringSchema = stringSchema.check(z.ipv6()); - } else if (format2 === "mac") { - stringSchema = stringSchema.check(z.mac()); - } else if (format2 === "cidr") { - stringSchema = stringSchema.check(z.cidrv4()); - } else if (format2 === "cidr-v6") { - stringSchema = stringSchema.check(z.cidrv6()); - } else if (format2 === "base64") { - stringSchema = stringSchema.check(z.base64()); - } else if (format2 === "base64url") { - stringSchema = stringSchema.check(z.base64url()); - } else if (format2 === "e164") { - stringSchema = stringSchema.check(z.e164()); - } else if (format2 === "jwt") { - stringSchema = stringSchema.check(z.jwt()); - } else if (format2 === "emoji") { - stringSchema = stringSchema.check(z.emoji()); - } else if (format2 === "nanoid") { - stringSchema = stringSchema.check(z.nanoid()); - } else if (format2 === "cuid") { - stringSchema = stringSchema.check(z.cuid()); - } else if (format2 === "cuid2") { - stringSchema = stringSchema.check(z.cuid2()); - } else if (format2 === "ulid") { - stringSchema = stringSchema.check(z.ulid()); - } else if (format2 === "xid") { - stringSchema = stringSchema.check(z.xid()); - } else if (format2 === "ksuid") { - stringSchema = stringSchema.check(z.ksuid()); - } - } - if (typeof schema.minLength === "number") { - stringSchema = stringSchema.min(schema.minLength); - } - if (typeof schema.maxLength === "number") { - stringSchema = stringSchema.max(schema.maxLength); - } - if (schema.pattern) { - stringSchema = stringSchema.regex(new RegExp(schema.pattern)); - } - zodSchema = stringSchema; - break; - } - case "number": - case "integer": { - let numberSchema = type === "integer" ? z.number().int() : z.number(); - if (typeof schema.minimum === "number") { - numberSchema = numberSchema.min(schema.minimum); - } - if (typeof schema.maximum === "number") { - numberSchema = numberSchema.max(schema.maximum); - } - if (typeof schema.exclusiveMinimum === "number") { - numberSchema = numberSchema.gt(schema.exclusiveMinimum); - } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { - numberSchema = numberSchema.gt(schema.minimum); - } - if (typeof schema.exclusiveMaximum === "number") { - numberSchema = numberSchema.lt(schema.exclusiveMaximum); - } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { - numberSchema = numberSchema.lt(schema.maximum); - } - if (typeof schema.multipleOf === "number") { - numberSchema = numberSchema.multipleOf(schema.multipleOf); - } - zodSchema = numberSchema; - break; - } - case "boolean": { - zodSchema = z.boolean(); - break; - } - case "null": { - zodSchema = z.null(); - break; - } - case "object": { - const shape = {}; - const properties = schema.properties || {}; - const requiredSet = new Set(schema.required || []); - for (const [key, propSchema] of Object.entries(properties)) { - const propZodSchema = convertSchema(propSchema, ctx); - shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); - } - if (schema.propertyNames) { - const keySchema = convertSchema(schema.propertyNames, ctx); - const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any(); - if (Object.keys(shape).length === 0) { - zodSchema = z.record(keySchema, valueSchema); - break; - } - const objectSchema2 = z.object(shape).passthrough(); - const recordSchema = z.looseRecord(keySchema, valueSchema); - zodSchema = z.intersection(objectSchema2, recordSchema); - break; - } - if (schema.patternProperties) { - const patternProps = schema.patternProperties; - const patternKeys = Object.keys(patternProps); - const looseRecords = []; - for (const pattern of patternKeys) { - const patternValue = convertSchema(patternProps[pattern], ctx); - const keySchema = z.string().regex(new RegExp(pattern)); - looseRecords.push(z.looseRecord(keySchema, patternValue)); - } - const schemasToIntersect = []; - if (Object.keys(shape).length > 0) { - schemasToIntersect.push(z.object(shape).passthrough()); - } - schemasToIntersect.push(...looseRecords); - if (schemasToIntersect.length === 0) { - zodSchema = z.object({}).passthrough(); - } else if (schemasToIntersect.length === 1) { - zodSchema = schemasToIntersect[0]; - } else { - let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]); - for (let i = 2; i < schemasToIntersect.length; i++) { - result = z.intersection(result, schemasToIntersect[i]); - } - zodSchema = result; - } - break; - } - const objectSchema = z.object(shape); - if (schema.additionalProperties === false) { - zodSchema = objectSchema.strict(); - } else if (typeof schema.additionalProperties === "object") { - zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx)); - } else { - zodSchema = objectSchema.passthrough(); - } - break; - } - case "array": { - const prefixItems = schema.prefixItems; - const items = schema.items; - if (prefixItems && Array.isArray(prefixItems)) { - const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); - const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; - if (rest) { - zodSchema = z.tuple(tupleItems).rest(rest); - } else { - zodSchema = z.tuple(tupleItems); - } - if (typeof schema.minItems === "number") { - zodSchema = zodSchema.check(z.minLength(schema.minItems)); - } - if (typeof schema.maxItems === "number") { - zodSchema = zodSchema.check(z.maxLength(schema.maxItems)); - } - } else if (Array.isArray(items)) { - const tupleItems = items.map((item) => convertSchema(item, ctx)); - const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0; - if (rest) { - zodSchema = z.tuple(tupleItems).rest(rest); - } else { - zodSchema = z.tuple(tupleItems); - } - if (typeof schema.minItems === "number") { - zodSchema = zodSchema.check(z.minLength(schema.minItems)); - } - if (typeof schema.maxItems === "number") { - zodSchema = zodSchema.check(z.maxLength(schema.maxItems)); - } - } else if (items !== void 0) { - const element = convertSchema(items, ctx); - let arraySchema = z.array(element); - if (typeof schema.minItems === "number") { - arraySchema = arraySchema.min(schema.minItems); - } - if (typeof schema.maxItems === "number") { - arraySchema = arraySchema.max(schema.maxItems); - } - zodSchema = arraySchema; - } else { - zodSchema = z.array(z.any()); - } - break; - } - default: - throw new Error(`Unsupported type: ${type}`); - } - if (schema.description) { - zodSchema = zodSchema.describe(schema.description); - } - if (schema.default !== void 0) { - zodSchema = zodSchema.default(schema.default); - } - return zodSchema; +// @__NO_SIDE_EFFECTS__ +function _base64url(Class3, params) { + return new Class3({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -function convertSchema(schema, ctx) { - if (typeof schema === "boolean") { - return schema ? z.any() : z.never(); - } - let baseSchema = convertBaseSchema(schema, ctx); - const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; - if (schema.anyOf && Array.isArray(schema.anyOf)) { - const options = schema.anyOf.map((s) => convertSchema(s, ctx)); - const anyOfUnion = z.union(options); - baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion; - } - if (schema.oneOf && Array.isArray(schema.oneOf)) { - const options = schema.oneOf.map((s) => convertSchema(s, ctx)); - const oneOfUnion = z.xor(options); - baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion; - } - if (schema.allOf && Array.isArray(schema.allOf)) { - if (schema.allOf.length === 0) { - baseSchema = hasExplicitType ? baseSchema : z.any(); - } else { - let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx); - const startIdx = hasExplicitType ? 0 : 1; - for (let i = startIdx; i < schema.allOf.length; i++) { - result = z.intersection(result, convertSchema(schema.allOf[i], ctx)); - } - baseSchema = result; - } - } - if (schema.nullable === true && ctx.version === "openapi-3.0") { - baseSchema = z.nullable(baseSchema); - } - if (schema.readOnly === true) { - baseSchema = z.readonly(baseSchema); - } - const extraMeta = {}; - const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; - for (const key of coreMetadataKeys) { - if (key in schema) { - extraMeta[key] = schema[key]; - } - } - const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; - for (const key of contentMetadataKeys) { - if (key in schema) { - extraMeta[key] = schema[key]; - } - } - for (const key of Object.keys(schema)) { - if (!RECOGNIZED_KEYS.has(key)) { - extraMeta[key] = schema[key]; - } - } - if (Object.keys(extraMeta).length > 0) { - ctx.registry.add(baseSchema, extraMeta); - } - return baseSchema; +// @__NO_SIDE_EFFECTS__ +function _e164(Class3, params) { + return new Class3({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } -function fromJSONSchema(schema, params) { - if (typeof schema === "boolean") { - return schema ? z.any() : z.never(); - } - const version4 = detectVersion(schema, params?.defaultTarget); - const defs = schema.$defs || schema.definitions || {}; - const ctx = { - version: version4, - defs, - refs: /* @__PURE__ */ new Map(), - processing: /* @__PURE__ */ new Set(), - rootSchema: schema, - registry: params?.registry ?? globalRegistry - }; - return convertSchema(schema, ctx); +// @__NO_SIDE_EFFECTS__ +function _jwt(Class3, params) { + return new Class3({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams(params) + }); } - -// node_modules/testing-farm/node_modules/zod/v4/classic/coerce.js -var coerce_exports = {}; -__export(coerce_exports, { - bigint: () => bigint3, - boolean: () => boolean3, - date: () => date4, - number: () => number3, - string: () => string3 -}); -function string3(params) { - return _coercedString(ZodString, params); +var TimePrecision = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 +}; +// @__NO_SIDE_EFFECTS__ +function _isoDateTime(Class3, params) { + return new Class3({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams(params) + }); } -function number3(params) { - return _coercedNumber(ZodNumber, params); +// @__NO_SIDE_EFFECTS__ +function _isoDate(Class3, params) { + return new Class3({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams(params) + }); } -function boolean3(params) { - return _coercedBoolean(ZodBoolean, params); +// @__NO_SIDE_EFFECTS__ +function _isoTime(Class3, params) { + return new Class3({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams(params) + }); } -function bigint3(params) { - return _coercedBigint(ZodBigInt, params); +// @__NO_SIDE_EFFECTS__ +function _isoDuration(Class3, params) { + return new Class3({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams(params) + }); } -function date4(params) { - return _coercedDate(ZodDate, params); +// @__NO_SIDE_EFFECTS__ +function _number(Class3, params) { + return new Class3({ + type: "number", + checks: [], + ...normalizeParams(params) + }); } - -// node_modules/testing-farm/node_modules/zod/v4/classic/external.js -config(en_default()); - -// node_modules/testing-farm/dist/schema.js -var whoamiSchema = external_exports.object({ - token: external_exports.looseObject({ - enabled: external_exports.boolean(), - id: external_exports.string(), - name: external_exports.string(), - ranch: external_exports.union([external_exports.literal("public"), external_exports.literal("redhat")]), - role: external_exports.string(), - user_id: external_exports.string() - }), - user: external_exports.looseObject({ - auth_id: external_exports.string(), - auth_method: external_exports.string(), - auth_name: external_exports.string(), - enabled: external_exports.boolean(), - id: external_exports.string() - }) -}); -var urlSchema = external_exports.url(); -var requestIdSchema = external_exports.string(); -var testObjectSchema = external_exports.object({ - fmf: external_exports.object({ - url: urlSchema, - ref: external_exports.string().min(1).optional(), - merge_sha: external_exports.string().min(1).optional().nullable(), - path: external_exports.string().min(1).optional(), - name: external_exports.string().min(1).optional(), - settings: external_exports.object({ - "recognize-errors": external_exports.boolean() - }).optional(), - plan_filter: external_exports.string().min(1).optional(), - test_name: external_exports.string().min(1).optional(), - test_filter: external_exports.string().min(1).optional() - }).optional(), - sti: external_exports.object({ - url: urlSchema, - ref: external_exports.string().min(1), - merge_sha: external_exports.string().min(1).optional(), - playbooks: external_exports.array(external_exports.string().min(1)).optional(), - extra_variables: external_exports.record(external_exports.string(), external_exports.string()).optional() - }).optional().nullable() -}); -var environmentSchema = external_exports.object({ - arch: external_exports.string().min(1), - os: external_exports.object({ - compose: external_exports.string().min(1) - }).optional().nullable(), - pool: external_exports.string().min(1).optional().nullable(), - variables: external_exports.record(external_exports.string(), external_exports.string()).optional(), - secrets: external_exports.record(external_exports.string(), external_exports.string()).optional(), - artifacts: external_exports.array(external_exports.object({ - id: external_exports.string().min(1), - type: external_exports.string().min(1), - packages: external_exports.array(external_exports.string().min(1)).optional() - })).optional(), - hardware: external_exports.object({ - hostname: external_exports.string().min(1), - disk: external_exports.object({ - size: external_exports.string().min(1) - }) - }).optional().nullable(), - settings: external_exports.object({ - pipeline: external_exports.object({ - skip_guest_setup: external_exports.boolean().optional() - }).optional().nullable(), - provisioning: external_exports.object({ - post_install_script: external_exports.string().min(1).optional(), - tags: external_exports.record(external_exports.string(), external_exports.string()).optional() - }).optional().nullable() - }).optional(), - tmt: external_exports.object({ - // https://tmt.readthedocs.io/en/stable/spec/context.html#dimension - context: external_exports.looseObject({ - distro: external_exports.string().min(1).optional(), - variant: external_exports.string().min(1).optional(), - arch: external_exports.string().min(1).optional(), - component: external_exports.string().min(1).optional(), - collection: external_exports.string().min(1).optional(), - module: external_exports.string().min(1).optional(), - initiator: external_exports.string().min(1).optional(), - trigger: external_exports.string().min(1).optional() - }).optional().nullable() - }).optional(), - kickstart: external_exports.any().optional() -}); -var notificationSchema = external_exports.object({ - webhook: external_exports.object({ - url: urlSchema, - token: external_exports.string().min(1).optional() - }).optional() -}); -var settingsSchema = external_exports.object({ - worker: external_exports.object({ - image: external_exports.string().min(1).optional() - }).optional(), - pipeline: external_exports.object({ - timeout: external_exports.number().min(1).optional(), - type: external_exports.enum(["tmt-multihost"]).optional(), - "provision-error-failed-result": external_exports.boolean().optional(), - "parallel-limit": external_exports.number().nonnegative().optional() - }).optional() -}); -var requestsFilterSchema = external_exports.object({ - state: external_exports.string(), - user_id: external_exports.string(), - created_before: external_exports.string(), - created_after: external_exports.string() -}); -var newRequestSchema = external_exports.object({ - api_key: external_exports.any().optional(), - test: testObjectSchema, - environments: external_exports.array(environmentSchema).optional(), - notification: notificationSchema.optional().nullable(), - settings: settingsSchema.optional().nullable() -}); -var newRequestResponseSchema = external_exports.object({ - id: requestIdSchema, - created: external_exports.string().datetime() -}); -var noteSchema = external_exports.object({ - level: external_exports.string(), - message: external_exports.string() -}); -var requestSchema = external_exports.object({ - id: requestIdSchema, - user_id: external_exports.string(), - created: external_exports.string(), - updated: external_exports.string(), - environments_requested: external_exports.array(external_exports.object({ - arch: external_exports.string(), - artifacts: external_exports.any(), - hardware: external_exports.any(), - os: external_exports.object({ - compose: external_exports.string() - }), - pool: external_exports.union([external_exports.string(), external_exports.null()]), - settings: external_exports.object({ - pipeline: external_exports.any(), - provisioning: external_exports.any() - }), - tmt: external_exports.object({ - context: external_exports.looseObject({}).nullable() - }), - variables: external_exports.record(external_exports.string(), external_exports.string()) - })), - state: external_exports.string(), - notes: external_exports.array(noteSchema), - result: external_exports.object({ - summary: external_exports.union([external_exports.string(), external_exports.null()]), - overall: external_exports.string(), - xunit: external_exports.string().nullable().optional() - }), - run: external_exports.object({ - console: external_exports.union([urlSchema, external_exports.null()]), - stages: external_exports.union([ - external_exports.array(external_exports.object({ - name: external_exports.string(), - notes: external_exports.array(noteSchema), - result: external_exports.string(), - log: urlSchema - })), - external_exports.null() - ]), - artifacts: urlSchema - }), - settings: external_exports.any() -}); -var cancelRequestSchema = external_exports.object({ - api_key: external_exports.any().optional() -}); -var cancelRequestResponseSchema = external_exports.object({ - id: requestIdSchema, - state: external_exports.string(), - created: external_exports.string(), - updated: external_exports.string() -}); -var ranchSchema = external_exports.union([external_exports.literal("public"), external_exports.literal("redhat")]); -var composeSchema = external_exports.object({ - name: external_exports.string() -}); -var composesSchema = external_exports.object({ - composes: external_exports.array(composeSchema) -}); -var aboutSchema = external_exports.object({ - version: external_exports.string(), - release_notes: external_exports.string() -}); -var errorResponseSchema = external_exports.object({ - code: external_exports.number(), - message: external_exports.string() -}); - -// node_modules/testing-farm/dist/index.js -var TestingFarmAPI = class { - constructor(instance, apiKey) { - if (!apiKey) { - this.link = new PublicLink(new URL(instance)); - } else { - this.link = new ApiKeyLink(new URL(instance), apiKey); - } - } - async whoami(strict) { - if (!this.isStrict(strict)) { - return this.link.get("whoami"); - } - return whoamiSchema.parse(await this.link.get("whoami")); - } - async requests(filter2, strict) { - if (!this.isStrict(strict)) { - return this.link.get("requests", filter2); - } - return requestSchema.array().parse(await this.link.get("requests", filter2)); - } - async newRequest(request3, strict) { - const data = newRequestSchema.parse(request3); - if (!this.isStrict(strict)) { - return this.link.post("requests", data); - } - return newRequestResponseSchema.parse(await this.link.post("requests", data)); - } - async unsafeNewRequest(request3) { - return await this.link.post("requests", request3); - } - async requestDetails(requestId, strict) { - const id = requestIdSchema.parse(requestId); - if (!this.isStrict(strict)) { - return this.link.get(`requests/${id}`); - } - return requestSchema.parse(await this.link.get(`requests/${id}`)); - } - async cancelRequest(requestId, request3, strict) { - const id = requestIdSchema.parse(requestId); - const data = cancelRequestSchema.parse(request3); - if (!this.isStrict(strict)) { - return this.link.delete(`requests/${id}`, data); - } - return cancelRequestResponseSchema.parse(await this.link.delete(`requests/${id}`, data)); - } - async composes(strict) { - if (!this.isStrict(strict)) { - return this.link.get("composes"); - } - return composesSchema.parse(await this.link.get("composes")); - } - async ranchComposes(ranch, strict) { - const requestedRanch = ranchSchema.parse(ranch); - if (!this.isStrict(strict)) { - return this.link.get(`composes/${requestedRanch}`); - } - return composesSchema.parse(await this.link.get(`composes/${requestedRanch}`)); - } - async about(strict) { - if (!this.isStrict(strict)) { - return this.link.get("about"); - } - return aboutSchema.parse(await this.link.get("about")); - } - isStrict(strict) { - return strict === void 0 || strict; - } -}; - -// src/action.ts -import { setTimeout as setTimeout2 } from "timers/promises"; - -// src/error.ts -var TFError = class extends Error { - constructor(message2, url5) { - super(message2); - this.url = url5; - } -}; - -// src/state.ts -var isPost = !!getState("isPost"); -function setTfRequestId(requestId) { - saveState("requestId", requestId); +// @__NO_SIDE_EFFECTS__ +function _coercedNumber(Class3, params) { + return new Class3({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams(params) + }); } -function getTfRequestId() { - return getState("requestId"); +// @__NO_SIDE_EFFECTS__ +function _int(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams(params) + }); } -function setTfArtifactUrl(requestUrl) { - saveState("artifactUrl", requestUrl); +// @__NO_SIDE_EFFECTS__ +function _float32(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams(params) + }); } -function getTfArtifactUrl() { - return getState("artifactUrl"); +// @__NO_SIDE_EFFECTS__ +function _float64(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams(params) + }); } -if (!isPost) { - saveState("isPost", "true"); +// @__NO_SIDE_EFFECTS__ +function _int32(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/constants.js -var daysInYear = 365.2425; -var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3; -var minTime = -maxTime; -var millisecondsInWeek = 6048e5; -var millisecondsInDay = 864e5; -var secondsInHour = 3600; -var secondsInDay = secondsInHour * 24; -var secondsInWeek = secondsInDay * 7; -var secondsInYear = secondsInDay * daysInYear; -var secondsInMonth = secondsInYear / 12; -var secondsInQuarter = secondsInMonth * 3; -var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom"); - -// node_modules/date-fns/constructFrom.js -function constructFrom(date10, value) { - if (typeof date10 === "function") return date10(value); - if (date10 && typeof date10 === "object" && constructFromSymbol in date10) - return date10[constructFromSymbol](value); - if (date10 instanceof Date) return new date10.constructor(value); - return new Date(value); +// @__NO_SIDE_EFFECTS__ +function _uint32(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/toDate.js -function toDate(argument, context3) { - return constructFrom(context3 || argument, argument); +// @__NO_SIDE_EFFECTS__ +function _boolean(Class3, params) { + return new Class3({ + type: "boolean", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/_lib/defaultOptions.js -var defaultOptions = {}; -function getDefaultOptions() { - return defaultOptions; +// @__NO_SIDE_EFFECTS__ +function _coercedBoolean(Class3, params) { + return new Class3({ + type: "boolean", + coerce: true, + ...normalizeParams(params) + }); } - -// node_modules/date-fns/startOfWeek.js -function startOfWeek(date10, options) { - const defaultOptions2 = getDefaultOptions(); - const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0; - const _date4 = toDate(date10, options?.in); - const day = _date4.getDay(); - const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; - _date4.setDate(_date4.getDate() - diff); - _date4.setHours(0, 0, 0, 0); - return _date4; +// @__NO_SIDE_EFFECTS__ +function _bigint(Class3, params) { + return new Class3({ + type: "bigint", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/startOfISOWeek.js -function startOfISOWeek(date10, options) { - return startOfWeek(date10, { ...options, weekStartsOn: 1 }); +// @__NO_SIDE_EFFECTS__ +function _coercedBigint(Class3, params) { + return new Class3({ + type: "bigint", + coerce: true, + ...normalizeParams(params) + }); } - -// node_modules/date-fns/getISOWeekYear.js -function getISOWeekYear(date10, options) { - const _date4 = toDate(date10, options?.in); - const year = _date4.getFullYear(); - const fourthOfJanuaryOfNextYear = constructFrom(_date4, 0); - fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); - fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); - const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear); - const fourthOfJanuaryOfThisYear = constructFrom(_date4, 0); - fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); - fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); - const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear); - if (_date4.getTime() >= startOfNextYear.getTime()) { - return year + 1; - } else if (_date4.getTime() >= startOfThisYear.getTime()) { - return year; - } else { - return year - 1; - } +// @__NO_SIDE_EFFECTS__ +function _int64(Class3, params) { + return new Class3({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js -function getTimezoneOffsetInMilliseconds(date10) { - const _date4 = toDate(date10); - const utcDate = new Date( - Date.UTC( - _date4.getFullYear(), - _date4.getMonth(), - _date4.getDate(), - _date4.getHours(), - _date4.getMinutes(), - _date4.getSeconds(), - _date4.getMilliseconds() - ) - ); - utcDate.setUTCFullYear(_date4.getFullYear()); - return +date10 - +utcDate; +// @__NO_SIDE_EFFECTS__ +function _uint64(Class3, params) { + return new Class3({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/_lib/normalizeDates.js -function normalizeDates(context3, ...dates) { - const normalize = constructFrom.bind( - null, - context3 || dates.find((date10) => typeof date10 === "object") - ); - return dates.map(normalize); +// @__NO_SIDE_EFFECTS__ +function _symbol(Class3, params) { + return new Class3({ + type: "symbol", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/startOfDay.js -function startOfDay(date10, options) { - const _date4 = toDate(date10, options?.in); - _date4.setHours(0, 0, 0, 0); - return _date4; +// @__NO_SIDE_EFFECTS__ +function _undefined2(Class3, params) { + return new Class3({ + type: "undefined", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/differenceInCalendarDays.js -function differenceInCalendarDays(laterDate, earlierDate, options) { - const [laterDate_, earlierDate_] = normalizeDates( - options?.in, - laterDate, - earlierDate - ); - const laterStartOfDay = startOfDay(laterDate_); - const earlierStartOfDay = startOfDay(earlierDate_); - const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay); - const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay); - return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay); +// @__NO_SIDE_EFFECTS__ +function _null2(Class3, params) { + return new Class3({ + type: "null", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/startOfISOWeekYear.js -function startOfISOWeekYear(date10, options) { - const year = getISOWeekYear(date10, options); - const fourthOfJanuary = constructFrom(options?.in || date10, 0); - fourthOfJanuary.setFullYear(year, 0, 4); - fourthOfJanuary.setHours(0, 0, 0, 0); - return startOfISOWeek(fourthOfJanuary); +// @__NO_SIDE_EFFECTS__ +function _any(Class3) { + return new Class3({ + type: "any" + }); } - -// node_modules/date-fns/isDate.js -function isDate2(value) { - return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]"; +// @__NO_SIDE_EFFECTS__ +function _unknown(Class3) { + return new Class3({ + type: "unknown" + }); } - -// node_modules/date-fns/isValid.js -function isValid(date10) { - return !(!isDate2(date10) && typeof date10 !== "number" || isNaN(+toDate(date10))); +// @__NO_SIDE_EFFECTS__ +function _never(Class3, params) { + return new Class3({ + type: "never", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/startOfYear.js -function startOfYear(date10, options) { - const date_ = toDate(date10, options?.in); - date_.setFullYear(date_.getFullYear(), 0, 1); - date_.setHours(0, 0, 0, 0); - return date_; +// @__NO_SIDE_EFFECTS__ +function _void(Class3, params) { + return new Class3({ + type: "void", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/locale/en-US/_lib/formatDistance.js -var formatDistanceLocale = { - lessThanXSeconds: { - one: "less than a second", - other: "less than {{count}} seconds" - }, - xSeconds: { - one: "1 second", - other: "{{count}} seconds" - }, - halfAMinute: "half a minute", - lessThanXMinutes: { - one: "less than a minute", - other: "less than {{count}} minutes" - }, - xMinutes: { - one: "1 minute", - other: "{{count}} minutes" - }, - aboutXHours: { - one: "about 1 hour", - other: "about {{count}} hours" - }, - xHours: { - one: "1 hour", - other: "{{count}} hours" - }, - xDays: { - one: "1 day", - other: "{{count}} days" - }, - aboutXWeeks: { - one: "about 1 week", - other: "about {{count}} weeks" - }, - xWeeks: { - one: "1 week", - other: "{{count}} weeks" - }, - aboutXMonths: { - one: "about 1 month", - other: "about {{count}} months" - }, - xMonths: { - one: "1 month", - other: "{{count}} months" - }, - aboutXYears: { - one: "about 1 year", - other: "about {{count}} years" - }, - xYears: { - one: "1 year", - other: "{{count}} years" - }, - overXYears: { - one: "over 1 year", - other: "over {{count}} years" - }, - almostXYears: { - one: "almost 1 year", - other: "almost {{count}} years" - } -}; -var formatDistance = (token, count, options) => { - let result; - const tokenValue = formatDistanceLocale[token]; - if (typeof tokenValue === "string") { - result = tokenValue; - } else if (count === 1) { - result = tokenValue.one; - } else { - result = tokenValue.other.replace("{{count}}", count.toString()); - } - if (options?.addSuffix) { - if (options.comparison && options.comparison > 0) { - return "in " + result; - } else { - return result + " ago"; - } - } - return result; -}; - -// node_modules/date-fns/locale/_lib/buildFormatLongFn.js -function buildFormatLongFn(args) { - return (options = {}) => { - const width = options.width ? String(options.width) : args.defaultWidth; - const format2 = args.formats[width] || args.formats[args.defaultWidth]; - return format2; - }; +// @__NO_SIDE_EFFECTS__ +function _date(Class3, params) { + return new Class3({ + type: "date", + ...normalizeParams(params) + }); } - -// node_modules/date-fns/locale/en-US/_lib/formatLong.js -var dateFormats = { - full: "EEEE, MMMM do, y", - long: "MMMM do, y", - medium: "MMM d, y", - short: "MM/dd/yyyy" -}; -var timeFormats = { - full: "h:mm:ss a zzzz", - long: "h:mm:ss a z", - medium: "h:mm:ss a", - short: "h:mm a" -}; -var dateTimeFormats = { - full: "{{date}} 'at' {{time}}", - long: "{{date}} 'at' {{time}}", - medium: "{{date}}, {{time}}", - short: "{{date}}, {{time}}" -}; -var formatLong = { - date: buildFormatLongFn({ - formats: dateFormats, - defaultWidth: "full" - }), - time: buildFormatLongFn({ - formats: timeFormats, - defaultWidth: "full" - }), - dateTime: buildFormatLongFn({ - formats: dateTimeFormats, - defaultWidth: "full" - }) -}; - -// node_modules/date-fns/locale/en-US/_lib/formatRelative.js -var formatRelativeLocale = { - lastWeek: "'last' eeee 'at' p", - yesterday: "'yesterday at' p", - today: "'today at' p", - tomorrow: "'tomorrow at' p", - nextWeek: "eeee 'at' p", - other: "P" -}; -var formatRelative = (token, _date4, _baseDate, _options) => formatRelativeLocale[token]; - -// node_modules/date-fns/locale/_lib/buildLocalizeFn.js -function buildLocalizeFn(args) { - return (value, options) => { - const context3 = options?.context ? String(options.context) : "standalone"; - let valuesArray; - if (context3 === "formatting" && args.formattingValues) { - const defaultWidth = args.defaultFormattingWidth || args.defaultWidth; - const width = options?.width ? String(options.width) : defaultWidth; - valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; - } else { - const defaultWidth = args.defaultWidth; - const width = options?.width ? String(options.width) : args.defaultWidth; - valuesArray = args.values[width] || args.values[defaultWidth]; - } - const index = args.argumentCallback ? args.argumentCallback(value) : value; - return valuesArray[index]; - }; +// @__NO_SIDE_EFFECTS__ +function _coercedDate(Class3, params) { + return new Class3({ + type: "date", + coerce: true, + ...normalizeParams(params) + }); } - -// node_modules/date-fns/locale/en-US/_lib/localize.js -var eraValues = { - narrow: ["B", "A"], - abbreviated: ["BC", "AD"], - wide: ["Before Christ", "Anno Domini"] -}; -var quarterValues = { - narrow: ["1", "2", "3", "4"], - abbreviated: ["Q1", "Q2", "Q3", "Q4"], - wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] -}; -var monthValues = { - narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], - abbreviated: [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - wide: [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ] -}; -var dayValues = { - narrow: ["S", "M", "T", "W", "T", "F", "S"], - short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - wide: [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ] -}; -var dayPeriodValues = { - narrow: { - am: "a", - pm: "p", - midnight: "mi", - noon: "n", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - }, - abbreviated: { - am: "AM", - pm: "PM", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - }, - wide: { - am: "a.m.", - pm: "p.m.", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - } -}; -var formattingDayPeriodValues = { - narrow: { - am: "a", - pm: "p", - midnight: "mi", - noon: "n", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - }, - abbreviated: { - am: "AM", - pm: "PM", - midnight: "midnight", - noon: "noon", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - }, - wide: { - am: "a.m.", - pm: "p.m.", - midnight: "midnight", - noon: "noon", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - } -}; -var ordinalNumber = (dirtyNumber, _options) => { - const number8 = Number(dirtyNumber); - const rem100 = number8 % 100; - if (rem100 > 20 || rem100 < 10) { - switch (rem100 % 10) { - case 1: - return number8 + "st"; - case 2: - return number8 + "nd"; - case 3: - return number8 + "rd"; - } - } - return number8 + "th"; -}; -var localize = { - ordinalNumber, - era: buildLocalizeFn({ - values: eraValues, - defaultWidth: "wide" - }), - quarter: buildLocalizeFn({ - values: quarterValues, - defaultWidth: "wide", - argumentCallback: (quarter) => quarter - 1 - }), - month: buildLocalizeFn({ - values: monthValues, - defaultWidth: "wide" - }), - day: buildLocalizeFn({ - values: dayValues, - defaultWidth: "wide" - }), - dayPeriod: buildLocalizeFn({ - values: dayPeriodValues, - defaultWidth: "wide", - formattingValues: formattingDayPeriodValues, - defaultFormattingWidth: "wide" - }) -}; - -// node_modules/date-fns/locale/_lib/buildMatchFn.js -function buildMatchFn(args) { - return (string8, options = {}) => { - const width = options.width; - const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth]; - const matchResult = string8.match(matchPattern); - if (!matchResult) { - return null; - } - const matchedString = matchResult[0]; - const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth]; - const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : ( - // [TODO] -- I challenge you to fix the type - findKey2(parsePatterns, (pattern) => pattern.test(matchedString)) - ); - let value; - value = args.valueCallback ? args.valueCallback(key) : key; - value = options.valueCallback ? ( - // [TODO] -- I challenge you to fix the type - options.valueCallback(value) - ) : value; - const rest = string8.slice(matchedString.length); - return { value, rest }; - }; +// @__NO_SIDE_EFFECTS__ +function _nan(Class3, params) { + return new Class3({ + type: "nan", + ...normalizeParams(params) + }); } -function findKey2(object4, predicate) { - for (const key in object4) { - if (Object.prototype.hasOwnProperty.call(object4, key) && predicate(object4[key])) { - return key; - } - } - return void 0; +// @__NO_SIDE_EFFECTS__ +function _lt(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: false + }); } -function findIndex(array4, predicate) { - for (let key = 0; key < array4.length; key++) { - if (predicate(array4[key])) { - return key; - } - } - return void 0; +// @__NO_SIDE_EFFECTS__ +function _lte(value, params) { + return new $ZodCheckLessThan({ + check: "less_than", + ...normalizeParams(params), + value, + inclusive: true + }); } - -// node_modules/date-fns/locale/_lib/buildMatchPatternFn.js -function buildMatchPatternFn(args) { - return (string8, options = {}) => { - const matchResult = string8.match(args.matchPattern); - if (!matchResult) return null; - const matchedString = matchResult[0]; - const parseResult = string8.match(args.parsePattern); - if (!parseResult) return null; - let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; - value = options.valueCallback ? options.valueCallback(value) : value; - const rest = string8.slice(matchedString.length); - return { value, rest }; - }; +// @__NO_SIDE_EFFECTS__ +function _gt(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: false + }); } - -// node_modules/date-fns/locale/en-US/_lib/match.js -var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; -var parseOrdinalNumberPattern = /\d+/i; -var matchEraPatterns = { - narrow: /^(b|a)/i, - abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, - wide: /^(before christ|before common era|anno domini|common era)/i -}; -var parseEraPatterns = { - any: [/^b/i, /^(a|c)/i] -}; -var matchQuarterPatterns = { - narrow: /^[1234]/i, - abbreviated: /^q[1234]/i, - wide: /^[1234](th|st|nd|rd)? quarter/i -}; -var parseQuarterPatterns = { - any: [/1/i, /2/i, /3/i, /4/i] -}; -var matchMonthPatterns = { - narrow: /^[jfmasond]/i, - abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, - wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i -}; -var parseMonthPatterns = { - narrow: [ - /^j/i, - /^f/i, - /^m/i, - /^a/i, - /^m/i, - /^j/i, - /^j/i, - /^a/i, - /^s/i, - /^o/i, - /^n/i, - /^d/i - ], - any: [ - /^ja/i, - /^f/i, - /^mar/i, - /^ap/i, - /^may/i, - /^jun/i, - /^jul/i, - /^au/i, - /^s/i, - /^o/i, - /^n/i, - /^d/i - ] -}; -var matchDayPatterns = { - narrow: /^[smtwf]/i, - short: /^(su|mo|tu|we|th|fr|sa)/i, - abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, - wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i -}; -var parseDayPatterns = { - narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], - any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] -}; -var matchDayPeriodPatterns = { - narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, - any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i -}; -var parseDayPeriodPatterns = { - any: { - am: /^a/i, - pm: /^p/i, - midnight: /^mi/i, - noon: /^no/i, - morning: /morning/i, - afternoon: /afternoon/i, - evening: /evening/i, - night: /night/i - } -}; -var match = { - ordinalNumber: buildMatchPatternFn({ - matchPattern: matchOrdinalNumberPattern, - parsePattern: parseOrdinalNumberPattern, - valueCallback: (value) => parseInt(value, 10) - }), - era: buildMatchFn({ - matchPatterns: matchEraPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseEraPatterns, - defaultParseWidth: "any" - }), - quarter: buildMatchFn({ - matchPatterns: matchQuarterPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseQuarterPatterns, - defaultParseWidth: "any", - valueCallback: (index) => index + 1 - }), - month: buildMatchFn({ - matchPatterns: matchMonthPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseMonthPatterns, - defaultParseWidth: "any" - }), - day: buildMatchFn({ - matchPatterns: matchDayPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseDayPatterns, - defaultParseWidth: "any" - }), - dayPeriod: buildMatchFn({ - matchPatterns: matchDayPeriodPatterns, - defaultMatchWidth: "any", - parsePatterns: parseDayPeriodPatterns, - defaultParseWidth: "any" - }) -}; - -// node_modules/date-fns/locale/en-US.js -var enUS = { - code: "en-US", - formatDistance, - formatLong, - formatRelative, - localize, - match, - options: { - weekStartsOn: 0, - firstWeekContainsDate: 1 - } -}; - -// node_modules/date-fns/getDayOfYear.js -function getDayOfYear(date10, options) { - const _date4 = toDate(date10, options?.in); - const diff = differenceInCalendarDays(_date4, startOfYear(_date4)); - const dayOfYear = diff + 1; - return dayOfYear; +// @__NO_SIDE_EFFECTS__ +function _gte(value, params) { + return new $ZodCheckGreaterThan({ + check: "greater_than", + ...normalizeParams(params), + value, + inclusive: true + }); } - -// node_modules/date-fns/getISOWeek.js -function getISOWeek(date10, options) { - const _date4 = toDate(date10, options?.in); - const diff = +startOfISOWeek(_date4) - +startOfISOWeekYear(_date4); - return Math.round(diff / millisecondsInWeek) + 1; +// @__NO_SIDE_EFFECTS__ +function _positive(params) { + return /* @__PURE__ */ _gt(0, params); } - -// node_modules/date-fns/getWeekYear.js -function getWeekYear(date10, options) { - const _date4 = toDate(date10, options?.in); - const year = _date4.getFullYear(); - const defaultOptions2 = getDefaultOptions(); - const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; - const firstWeekOfNextYear = constructFrom(options?.in || date10, 0); - firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate); - firstWeekOfNextYear.setHours(0, 0, 0, 0); - const startOfNextYear = startOfWeek(firstWeekOfNextYear, options); - const firstWeekOfThisYear = constructFrom(options?.in || date10, 0); - firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate); - firstWeekOfThisYear.setHours(0, 0, 0, 0); - const startOfThisYear = startOfWeek(firstWeekOfThisYear, options); - if (+_date4 >= +startOfNextYear) { - return year + 1; - } else if (+_date4 >= +startOfThisYear) { - return year; - } else { - return year - 1; - } +// @__NO_SIDE_EFFECTS__ +function _negative(params) { + return /* @__PURE__ */ _lt(0, params); } - -// node_modules/date-fns/startOfWeekYear.js -function startOfWeekYear(date10, options) { - const defaultOptions2 = getDefaultOptions(); - const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; - const year = getWeekYear(date10, options); - const firstWeek = constructFrom(options?.in || date10, 0); - firstWeek.setFullYear(year, 0, firstWeekContainsDate); - firstWeek.setHours(0, 0, 0, 0); - const _date4 = startOfWeek(firstWeek, options); - return _date4; +// @__NO_SIDE_EFFECTS__ +function _nonpositive(params) { + return /* @__PURE__ */ _lte(0, params); } - -// node_modules/date-fns/getWeek.js -function getWeek(date10, options) { - const _date4 = toDate(date10, options?.in); - const diff = +startOfWeek(_date4, options) - +startOfWeekYear(_date4, options); - return Math.round(diff / millisecondsInWeek) + 1; +// @__NO_SIDE_EFFECTS__ +function _nonnegative(params) { + return /* @__PURE__ */ _gte(0, params); } - -// node_modules/date-fns/_lib/addLeadingZeros.js -function addLeadingZeros(number8, targetLength) { - const sign = number8 < 0 ? "-" : ""; - const output = Math.abs(number8).toString().padStart(targetLength, "0"); - return sign + output; +// @__NO_SIDE_EFFECTS__ +function _multipleOf(value, params) { + return new $ZodCheckMultipleOf({ + check: "multiple_of", + ...normalizeParams(params), + value + }); } - -// node_modules/date-fns/_lib/format/lightFormatters.js -var lightFormatters = { - // Year - y(date10, token) { - const signedYear = date10.getFullYear(); - const year = signedYear > 0 ? signedYear : 1 - signedYear; - return addLeadingZeros(token === "yy" ? year % 100 : year, token.length); - }, - // Month - M(date10, token) { - const month = date10.getMonth(); - return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2); - }, - // Day of the month - d(date10, token) { - return addLeadingZeros(date10.getDate(), token.length); - }, - // AM or PM - a(date10, token) { - const dayPeriodEnumValue = date10.getHours() / 12 >= 1 ? "pm" : "am"; - switch (token) { - case "a": - case "aa": - return dayPeriodEnumValue.toUpperCase(); - case "aaa": - return dayPeriodEnumValue; - case "aaaaa": - return dayPeriodEnumValue[0]; - case "aaaa": - default: - return dayPeriodEnumValue === "am" ? "a.m." : "p.m."; - } - }, - // Hour [1-12] - h(date10, token) { - return addLeadingZeros(date10.getHours() % 12 || 12, token.length); - }, - // Hour [0-23] - H(date10, token) { - return addLeadingZeros(date10.getHours(), token.length); - }, - // Minute - m(date10, token) { - return addLeadingZeros(date10.getMinutes(), token.length); - }, - // Second - s(date10, token) { - return addLeadingZeros(date10.getSeconds(), token.length); - }, - // Fraction of second - S(date10, token) { - const numberOfDigits = token.length; - const milliseconds = date10.getMilliseconds(); - const fractionalSeconds = Math.trunc( - milliseconds * Math.pow(10, numberOfDigits - 3) - ); - return addLeadingZeros(fractionalSeconds, token.length); - } -}; - -// node_modules/date-fns/_lib/format/formatters.js -var dayPeriodEnum = { - am: "am", - pm: "pm", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" -}; -var formatters = { - // Era - G: function(date10, token, localize2) { - const era = date10.getFullYear() > 0 ? 1 : 0; - switch (token) { - // AD, BC - case "G": - case "GG": - case "GGG": - return localize2.era(era, { width: "abbreviated" }); - // A, B - case "GGGGG": - return localize2.era(era, { width: "narrow" }); - // Anno Domini, Before Christ - case "GGGG": - default: - return localize2.era(era, { width: "wide" }); - } - }, - // Year - y: function(date10, token, localize2) { - if (token === "yo") { - const signedYear = date10.getFullYear(); - const year = signedYear > 0 ? signedYear : 1 - signedYear; - return localize2.ordinalNumber(year, { unit: "year" }); - } - return lightFormatters.y(date10, token); - }, - // Local week-numbering year - Y: function(date10, token, localize2, options) { - const signedWeekYear = getWeekYear(date10, options); - const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; - if (token === "YY") { - const twoDigitYear = weekYear % 100; - return addLeadingZeros(twoDigitYear, 2); - } - if (token === "Yo") { - return localize2.ordinalNumber(weekYear, { unit: "year" }); +// @__NO_SIDE_EFFECTS__ +function _maxSize(maximum, params) { + return new $ZodCheckMaxSize({ + check: "max_size", + ...normalizeParams(params), + maximum + }); +} +// @__NO_SIDE_EFFECTS__ +function _minSize(minimum, params) { + return new $ZodCheckMinSize({ + check: "min_size", + ...normalizeParams(params), + minimum + }); +} +// @__NO_SIDE_EFFECTS__ +function _size(size, params) { + return new $ZodCheckSizeEquals({ + check: "size_equals", + ...normalizeParams(params), + size + }); +} +// @__NO_SIDE_EFFECTS__ +function _maxLength(maximum, params) { + const ch = new $ZodCheckMaxLength({ + check: "max_length", + ...normalizeParams(params), + maximum + }); + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _minLength(minimum, params) { + return new $ZodCheckMinLength({ + check: "min_length", + ...normalizeParams(params), + minimum + }); +} +// @__NO_SIDE_EFFECTS__ +function _length(length, params) { + return new $ZodCheckLengthEquals({ + check: "length_equals", + ...normalizeParams(params), + length + }); +} +// @__NO_SIDE_EFFECTS__ +function _regex(pattern, params) { + return new $ZodCheckRegex({ + check: "string_format", + format: "regex", + ...normalizeParams(params), + pattern + }); +} +// @__NO_SIDE_EFFECTS__ +function _lowercase(params) { + return new $ZodCheckLowerCase({ + check: "string_format", + format: "lowercase", + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uppercase(params) { + return new $ZodCheckUpperCase({ + check: "string_format", + format: "uppercase", + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _includes(includes, params) { + return new $ZodCheckIncludes({ + check: "string_format", + format: "includes", + ...normalizeParams(params), + includes + }); +} +// @__NO_SIDE_EFFECTS__ +function _startsWith(prefix, params) { + return new $ZodCheckStartsWith({ + check: "string_format", + format: "starts_with", + ...normalizeParams(params), + prefix + }); +} +// @__NO_SIDE_EFFECTS__ +function _endsWith(suffix, params) { + return new $ZodCheckEndsWith({ + check: "string_format", + format: "ends_with", + ...normalizeParams(params), + suffix + }); +} +// @__NO_SIDE_EFFECTS__ +function _property(property, schema, params) { + return new $ZodCheckProperty({ + check: "property", + property, + schema, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _mime(types, params) { + return new $ZodCheckMimeType({ + check: "mime_type", + mime: types, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _overwrite(tx) { + return new $ZodCheckOverwrite({ + check: "overwrite", + tx + }); +} +// @__NO_SIDE_EFFECTS__ +function _normalize(form) { + return /* @__PURE__ */ _overwrite((input) => input.normalize(form)); +} +// @__NO_SIDE_EFFECTS__ +function _trim() { + return /* @__PURE__ */ _overwrite((input) => input.trim()); +} +// @__NO_SIDE_EFFECTS__ +function _toLowerCase() { + return /* @__PURE__ */ _overwrite((input) => input.toLowerCase()); +} +// @__NO_SIDE_EFFECTS__ +function _toUpperCase() { + return /* @__PURE__ */ _overwrite((input) => input.toUpperCase()); +} +// @__NO_SIDE_EFFECTS__ +function _slugify() { + return /* @__PURE__ */ _overwrite((input) => slugify(input)); +} +// @__NO_SIDE_EFFECTS__ +function _array(Class3, element, params) { + return new Class3({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _union(Class3, options, params) { + return new Class3({ + type: "union", + options, + ...normalizeParams(params) + }); +} +function _xor(Class3, options, params) { + return new Class3({ + type: "union", + options, + inclusive: false, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _discriminatedUnion(Class3, discriminator, options, params) { + return new Class3({ + type: "union", + options, + discriminator, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _intersection(Class3, left, right) { + return new Class3({ + type: "intersection", + left, + right + }); +} +// @__NO_SIDE_EFFECTS__ +function _tuple(Class3, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class3({ + type: "tuple", + items, + rest, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _record(Class3, keyType, valueType, params) { + return new Class3({ + type: "record", + keyType, + valueType, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _map(Class3, keyType, valueType, params) { + return new Class3({ + type: "map", + keyType, + valueType, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _set(Class3, valueType, params) { + return new Class3({ + type: "set", + valueType, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _enum(Class3, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new Class3({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _nativeEnum(Class3, entries, params) { + return new Class3({ + type: "enum", + entries, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _literal(Class3, value, params) { + return new Class3({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _file(Class3, params) { + return new Class3({ + type: "file", + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _transform(Class3, fn) { + return new Class3({ + type: "transform", + transform: fn + }); +} +// @__NO_SIDE_EFFECTS__ +function _optional(Class3, innerType) { + return new Class3({ + type: "optional", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _nullable(Class3, innerType) { + return new Class3({ + type: "nullable", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _default(Class3, innerType, defaultValue) { + return new Class3({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue); } - return addLeadingZeros(weekYear, token.length); - }, - // ISO week-numbering year - R: function(date10, token) { - const isoWeekYear = getISOWeekYear(date10); - return addLeadingZeros(isoWeekYear, token.length); - }, - // Extended year. This is a single number designating the year of this calendar system. - // The main difference between `y` and `u` localizers are B.C. years: - // | Year | `y` | `u` | - // |------|-----|-----| - // | AC 1 | 1 | 1 | - // | BC 1 | 1 | 0 | - // | BC 2 | 2 | -1 | - // Also `yy` always returns the last two digits of a year, - // while `uu` pads single digit years to 2 characters and returns other years unchanged. - u: function(date10, token) { - const year = date10.getFullYear(); - return addLeadingZeros(year, token.length); - }, - // Quarter - Q: function(date10, token, localize2) { - const quarter = Math.ceil((date10.getMonth() + 1) / 3); - switch (token) { - // 1, 2, 3, 4 - case "Q": - return String(quarter); - // 01, 02, 03, 04 - case "QQ": - return addLeadingZeros(quarter, 2); - // 1st, 2nd, 3rd, 4th - case "Qo": - return localize2.ordinalNumber(quarter, { unit: "quarter" }); - // Q1, Q2, Q3, Q4 - case "QQQ": - return localize2.quarter(quarter, { - width: "abbreviated", - context: "formatting" - }); - // 1, 2, 3, 4 (narrow quarter; could be not numerical) - case "QQQQQ": - return localize2.quarter(quarter, { - width: "narrow", - context: "formatting" - }); - // 1st quarter, 2nd quarter, ... - case "QQQQ": - default: - return localize2.quarter(quarter, { - width: "wide", - context: "formatting" - }); + }); +} +// @__NO_SIDE_EFFECTS__ +function _nonoptional(Class3, innerType, params) { + return new Class3({ + type: "nonoptional", + innerType, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _success(Class3, innerType) { + return new Class3({ + type: "success", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _catch(Class3, innerType, catchValue) { + return new Class3({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +// @__NO_SIDE_EFFECTS__ +function _pipe(Class3, in_, out) { + return new Class3({ + type: "pipe", + in: in_, + out + }); +} +// @__NO_SIDE_EFFECTS__ +function _readonly(Class3, innerType) { + return new Class3({ + type: "readonly", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _templateLiteral(Class3, parts, params) { + return new Class3({ + type: "template_literal", + parts, + ...normalizeParams(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _lazy(Class3, getter) { + return new Class3({ + type: "lazy", + getter + }); +} +// @__NO_SIDE_EFFECTS__ +function _promise(Class3, innerType) { + return new Class3({ + type: "promise", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _custom(Class3, fn, _params) { + const norm = normalizeParams(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class3({ + type: "custom", + check: "custom", + fn, + ...norm + }); + return schema; +} +// @__NO_SIDE_EFFECTS__ +function _refine(Class3, fn, _params) { + const schema = new Class3({ + type: "custom", + check: "custom", + fn, + ...normalizeParams(_params) + }); + return schema; +} +// @__NO_SIDE_EFFECTS__ +function _superRefine(fn) { + const ch = /* @__PURE__ */ _check((payload) => { + payload.addIssue = (issue4) => { + if (typeof issue4 === "string") { + payload.issues.push(issue2(issue4, payload.value, ch._zod.def)); + } else { + const _issue = issue4; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue2(_issue)); + } + }; + return fn(payload.value, payload); + }); + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _check(fn, params) { + const ch = new $ZodCheck({ + check: "custom", + ...normalizeParams(params) + }); + ch._zod.check = fn; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function describe(description) { + const ch = new $ZodCheck({ check: "describe" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, description }); } - }, - // Stand-alone quarter - q: function(date10, token, localize2) { - const quarter = Math.ceil((date10.getMonth() + 1) / 3); - switch (token) { - // 1, 2, 3, 4 - case "q": - return String(quarter); - // 01, 02, 03, 04 - case "qq": - return addLeadingZeros(quarter, 2); - // 1st, 2nd, 3rd, 4th - case "qo": - return localize2.ordinalNumber(quarter, { unit: "quarter" }); - // Q1, Q2, Q3, Q4 - case "qqq": - return localize2.quarter(quarter, { - width: "abbreviated", - context: "standalone" - }); - // 1, 2, 3, 4 (narrow quarter; could be not numerical) - case "qqqqq": - return localize2.quarter(quarter, { - width: "narrow", - context: "standalone" - }); - // 1st quarter, 2nd quarter, ... - case "qqqq": - default: - return localize2.quarter(quarter, { - width: "wide", - context: "standalone" - }); + ]; + ch._zod.check = () => { + }; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function meta(metadata) { + const ch = new $ZodCheck({ check: "meta" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry.get(inst) ?? {}; + globalRegistry.add(inst, { ...existing, ...metadata }); } - }, - // Month - M: function(date10, token, localize2) { - const month = date10.getMonth(); - switch (token) { - case "M": - case "MM": - return lightFormatters.M(date10, token); - // 1st, 2nd, ..., 12th - case "Mo": - return localize2.ordinalNumber(month + 1, { unit: "month" }); - // Jan, Feb, ..., Dec - case "MMM": - return localize2.month(month, { - width: "abbreviated", - context: "formatting" - }); - // J, F, ..., D - case "MMMMM": - return localize2.month(month, { - width: "narrow", - context: "formatting" + ]; + ch._zod.check = () => { + }; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _stringbool(Classes, _params) { + const params = normalizeParams(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); + falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); + } + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec; + const _Boolean = Classes.Boolean ?? $ZodBoolean; + const _String = Classes.String ?? $ZodString; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec3 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: ((input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec3, + continue: false }); - // January, February, ..., December - case "MMMM": - default: - return localize2.month(month, { width: "wide", context: "formatting" }); + return {}; + } + }), + reverseTransform: ((input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; + } + }), + error: params.error + }); + return codec3; +} +// @__NO_SIDE_EFFECTS__ +function _stringFormat(Class3, format2, fnOrRegex, _params = {}) { + const params = normalizeParams(_params); + const def = { + ...normalizeParams(_params), + check: "string_format", + type: "string", + format: format2, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params + }; + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class3(def); + return inst; +} + +// node_modules/testing-farm/node_modules/zod/v4/core/to-json-schema.js +function initializeContext(params) { + let target = params?.target ?? "draft-2020-12"; + if (target === "draft-4") + target = "draft-04"; + if (target === "draft-7") + target = "draft-07"; + return { + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry, + target, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 + }; +} +function process2(schema, ctx, _params = { path: [], schemaPath: [] }) { + var _a4; + const def = schema._zod.def; + const seen = ctx.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; } - }, - // Stand-alone month - L: function(date10, token, localize2) { - const month = date10.getMonth(); - switch (token) { - // 1, 2, ..., 12 - case "L": - return String(month + 1); - // 01, 02, ..., 12 - case "LL": - return addLeadingZeros(month + 1, 2); - // 1st, 2nd, ..., 12th - case "Lo": - return localize2.ordinalNumber(month + 1, { unit: "month" }); - // Jan, Feb, ..., Dec - case "LLL": - return localize2.month(month, { - width: "abbreviated", - context: "standalone" - }); - // J, F, ..., D - case "LLLLL": - return localize2.month(month, { - width: "narrow", - context: "standalone" - }); - // January, February, ..., December - case "LLLL": - default: - return localize2.month(month, { width: "wide", context: "standalone" }); + return seen.schema; + } + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + if (schema._zod.processJSONSchema) { + schema._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema, ctx, _json, params); } - }, - // Local week of year - w: function(date10, token, localize2, options) { - const week = getWeek(date10, options); - if (token === "wo") { - return localize2.ordinalNumber(week, { unit: "week" }); + const parent = schema._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process2(parent, ctx, params); + ctx.seen.get(parent).isParent = true; } - return addLeadingZeros(week, token.length); - }, - // ISO week of year - I: function(date10, token, localize2) { - const isoWeek = getISOWeek(date10); - if (token === "Io") { - return localize2.ordinalNumber(isoWeek, { unit: "week" }); + } + const meta5 = ctx.metadataRegistry.get(schema); + if (meta5) + Object.assign(result.schema, meta5); + if (ctx.io === "input" && isTransforming(schema)) { + delete result.schema.examples; + delete result.schema.default; + } + if (ctx.io === "input" && result.schema._prefault) + (_a4 = result.schema).default ?? (_a4.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema); + return _result.schema; +} +function extractDefs(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + } + idToSchema.set(id, entry[0]); } - return addLeadingZeros(isoWeek, token.length); - }, - // Day of the month - d: function(date10, token, localize2) { - if (token === "do") { - return localize2.ordinalNumber(date10.getDate(), { unit: "date" }); + } + const makeURI = (entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; } - return lightFormatters.d(date10, token); - }, - // Day of year - D: function(date10, token, localize2) { - const dayOfYear = getDayOfYear(date10); - if (token === "Do") { - return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" }); + if (entry[1] === root) { + return { ref: "#" }; } - return addLeadingZeros(dayOfYear, token.length); - }, - // Day of week - E: function(date10, token, localize2) { - const dayOfWeek = date10.getDay(); - switch (token) { - // Tue - case "E": - case "EE": - case "EEE": - return localize2.day(dayOfWeek, { - width: "abbreviated", - context: "formatting" - }); - // T - case "EEEEE": - return localize2.day(dayOfWeek, { - width: "narrow", - context: "formatting" - }); - // Tu - case "EEEEEE": - return localize2.day(dayOfWeek, { - width: "short", - context: "formatting" - }); - // Tuesday - case "EEEE": - default: - return localize2.day(dayOfWeek, { - width: "wide", - context: "formatting" - }); + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; + }; + const extractToDef = (entry) => { + if (entry[1].schema.$ref) { + return; } - }, - // Local day of week - e: function(date10, token, localize2, options) { - const dayOfWeek = date10.getDay(); - const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; - switch (token) { - // Numerical value (Nth day of week with current locale or weekStartsOn) - case "e": - return String(localDayOfWeek); - // Padded numerical value - case "ee": - return addLeadingZeros(localDayOfWeek, 2); - // 1st, 2nd, ..., 7th - case "eo": - return localize2.ordinalNumber(localDayOfWeek, { unit: "day" }); - case "eee": - return localize2.day(dayOfWeek, { - width: "abbreviated", - context: "formatting" - }); - // T - case "eeeee": - return localize2.day(dayOfWeek, { - width: "narrow", - context: "formatting" - }); - // Tu - case "eeeeee": - return localize2.day(dayOfWeek, { - width: "short", - context: "formatting" - }); - // Tuesday - case "eeee": - default: - return localize2.day(dayOfWeek, { - width: "wide", - context: "formatting" - }); + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; } - }, - // Stand-alone local day of week - c: function(date10, token, localize2, options) { - const dayOfWeek = date10.getDay(); - const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; - switch (token) { - // Numerical value (same as in `e`) - case "c": - return String(localDayOfWeek); - // Padded numerical value - case "cc": - return addLeadingZeros(localDayOfWeek, token.length); - // 1st, 2nd, ..., 7th - case "co": - return localize2.ordinalNumber(localDayOfWeek, { unit: "day" }); - case "ccc": - return localize2.day(dayOfWeek, { - width: "abbreviated", - context: "standalone" - }); - // T - case "ccccc": - return localize2.day(dayOfWeek, { - width: "narrow", - context: "standalone" - }); - // Tu - case "cccccc": - return localize2.day(dayOfWeek, { - width: "short", - context: "standalone" - }); - // Tuesday - case "cccc": - default: - return localize2.day(dayOfWeek, { - width: "wide", - context: "standalone" - }); + schema2.$ref = ref; + }; + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); + } } - }, - // ISO day of week - i: function(date10, token, localize2) { - const dayOfWeek = date10.getDay(); - const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek; - switch (token) { - // 2 - case "i": - return String(isoDayOfWeek); - // 02 - case "ii": - return addLeadingZeros(isoDayOfWeek, token.length); - // 2nd - case "io": - return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" }); - // Tue - case "iii": - return localize2.day(dayOfWeek, { - width: "abbreviated", - context: "formatting" - }); - // T - case "iiiii": - return localize2.day(dayOfWeek, { - width: "narrow", - context: "formatting" - }); - // Tu - case "iiiiii": - return localize2.day(dayOfWeek, { - width: "short", - context: "formatting" - }); - // Tuesday - case "iiii": - default: - return localize2.day(dayOfWeek, { - width: "wide", - context: "formatting" - }); + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; } - }, - // AM or PM - a: function(date10, token, localize2) { - const hours = date10.getHours(); - const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am"; - switch (token) { - case "a": - case "aa": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "abbreviated", - context: "formatting" - }); - case "aaa": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "abbreviated", - context: "formatting" - }).toLowerCase(); - case "aaaaa": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "narrow", - context: "formatting" - }); - case "aaaa": - default: - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "wide", - context: "formatting" - }); + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; + } } - }, - // AM, PM, midnight, noon - b: function(date10, token, localize2) { - const hours = date10.getHours(); - let dayPeriodEnumValue; - if (hours === 12) { - dayPeriodEnumValue = dayPeriodEnum.noon; - } else if (hours === 0) { - dayPeriodEnumValue = dayPeriodEnum.midnight; - } else { - dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am"; + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; } - switch (token) { - case "b": - case "bb": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "abbreviated", - context: "formatting" - }); - case "bbb": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "abbreviated", - context: "formatting" - }).toLowerCase(); - case "bbbbb": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "narrow", - context: "formatting" - }); - case "bbbb": - default: - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "wide", - context: "formatting" - }); + if (seen.cycle) { + extractToDef(entry); + continue; } - }, - // in the morning, in the afternoon, in the evening, at night - B: function(date10, token, localize2) { - const hours = date10.getHours(); - let dayPeriodEnumValue; - if (hours >= 17) { - dayPeriodEnumValue = dayPeriodEnum.evening; - } else if (hours >= 12) { - dayPeriodEnumValue = dayPeriodEnum.afternoon; - } else if (hours >= 4) { - dayPeriodEnumValue = dayPeriodEnum.morning; - } else { - dayPeriodEnumValue = dayPeriodEnum.night; + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; + } } - switch (token) { - case "B": - case "BB": - case "BBB": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "abbreviated", - context: "formatting" - }); - case "BBBBB": - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "narrow", - context: "formatting" - }); - case "BBBB": - default: - return localize2.dayPeriod(dayPeriodEnumValue, { - width: "wide", - context: "formatting" - }); + } +} +function finalize(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = (zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref); + const refSeen = ctx.seen.get(ref); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); + } + Object.assign(schema2, _cached); + const isParentRef = zodSchema._zod.parent === ref; + if (isParentRef) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema2[key]; + } + } + } + if (refSchema.$ref && refSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { + delete schema2[key]; + } + } + } } - }, - // Hour [1-12] - h: function(date10, token, localize2) { - if (token === "ho") { - let hours = date10.getHours() % 12; - if (hours === 0) hours = 12; - return localize2.ordinalNumber(hours, { unit: "hour" }); + const parent = zodSchema._zod.parent; + if (parent && parent !== ref) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema2.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema2[key]; + } + } + } + } } - return lightFormatters.h(date10, token); - }, - // Hour [0-23] - H: function(date10, token, localize2) { - if (token === "Ho") { - return localize2.ordinalNumber(date10.getHours(), { unit: "hour" }); + ctx.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); + }; + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); + } + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root.def ?? root.schema); + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + defs[seen.defId] = seen.def; } - return lightFormatters.H(date10, token); - }, - // Hour [0-11] - K: function(date10, token, localize2) { - const hours = date10.getHours() % 12; - if (token === "Ko") { - return localize2.ordinalNumber(hours, { unit: "hour" }); + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; + } } - return addLeadingZeros(hours, token.length); - }, - // Hour [1-24] - k: function(date10, token, localize2) { - let hours = date10.getHours(); - if (hours === 0) hours = 24; - if (token === "ko") { - return localize2.ordinalNumber(hours, { unit: "hour" }); + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod(schema, "input", ctx.processors), + output: createStandardJSONSchemaMethod(schema, "output", ctx.processors) + } + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +function isTransforming(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming(def.element, ctx); + if (def.type === "set") + return isTransforming(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming(def.left, ctx) || isTransforming(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx); + } + if (def.type === "pipe") { + return isTransforming(def.in, ctx) || isTransforming(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming(def.shape[key], ctx)) + return true; } - return addLeadingZeros(hours, token.length); - }, - // Minute - m: function(date10, token, localize2) { - if (token === "mo") { - return localize2.ordinalNumber(date10.getMinutes(), { unit: "minute" }); + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming(option, ctx)) + return true; } - return lightFormatters.m(date10, token); - }, - // Second - s: function(date10, token, localize2) { - if (token === "so") { - return localize2.ordinalNumber(date10.getSeconds(), { unit: "second" }); + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming(item, ctx)) + return true; } - return lightFormatters.s(date10, token); - }, - // Fraction of second - S: function(date10, token) { - return lightFormatters.S(date10, token); - }, - // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) - X: function(date10, token, _localize) { - const timezoneOffset = date10.getTimezoneOffset(); - if (timezoneOffset === 0) { - return "Z"; + if (def.rest && isTransforming(def.rest, ctx)) + return true; + return false; + } + return false; +} +var createToJSONSchemaMethod = (schema, processors = {}) => (params) => { + const ctx = initializeContext({ ...params, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); +}; +var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => { + const { libraryOptions, target } = params ?? {}; + const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors }); + process2(schema, ctx); + extractDefs(ctx, schema); + return finalize(ctx, schema); +}; + +// node_modules/testing-farm/node_modules/zod/v4/core/json-schema-processors.js +var formatMap = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set +}; +var stringProcessor = (schema, ctx, _json, _params) => { + const json3 = _json; + json3.type = "string"; + const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json3.minLength = minimum; + if (typeof maximum === "number") + json3.maxLength = maximum; + if (format2) { + json3.format = formatMap[format2] ?? format2; + if (json3.format === "") + delete json3.format; + if (format2 === "time") { + delete json3.format; } - switch (token) { - // Hours and optional minutes - case "X": - return formatTimezoneWithOptionalMinutes(timezoneOffset); - // Hours, minutes and optional seconds without `:` delimiter - // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets - // so this token always has the same output as `XX` - case "XXXX": - case "XX": - return formatTimezone(timezoneOffset); - // Hours, minutes and optional seconds with `:` delimiter - // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets - // so this token always has the same output as `XXX` - case "XXXXX": - case "XXX": - // Hours and minutes with `:` delimiter - default: - return formatTimezone(timezoneOffset, ":"); + } + if (contentEncoding) + json3.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json3.pattern = regexes[0].source; + else if (regexes.length > 1) { + json3.allOf = [ + ...regexes.map((regex2) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex2.source + })) + ]; } - }, - // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) - x: function(date10, token, _localize) { - const timezoneOffset = date10.getTimezoneOffset(); - switch (token) { - // Hours and optional minutes - case "x": - return formatTimezoneWithOptionalMinutes(timezoneOffset); - // Hours, minutes and optional seconds without `:` delimiter - // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets - // so this token always has the same output as `xx` - case "xxxx": - case "xx": - return formatTimezone(timezoneOffset); - // Hours, minutes and optional seconds with `:` delimiter - // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets - // so this token always has the same output as `xxx` - case "xxxxx": - case "xxx": - // Hours and minutes with `:` delimiter - default: - return formatTimezone(timezoneOffset, ":"); + } +}; +var numberProcessor = (schema, ctx, _json, _params) => { + const json3 = _json; + const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format2 === "string" && format2.includes("int")) + json3.type = "integer"; + else + json3.type = "number"; + if (typeof exclusiveMinimum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json3.minimum = exclusiveMinimum; + json3.exclusiveMinimum = true; + } else { + json3.exclusiveMinimum = exclusiveMinimum; } - }, - // Timezone (GMT) - O: function(date10, token, _localize) { - const timezoneOffset = date10.getTimezoneOffset(); - switch (token) { - // Short - case "O": - case "OO": - case "OOO": - return "GMT" + formatTimezoneShort(timezoneOffset, ":"); - // Long - case "OOOO": - default: - return "GMT" + formatTimezone(timezoneOffset, ":"); + } + if (typeof minimum === "number") { + json3.minimum = minimum; + if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { + if (exclusiveMinimum >= minimum) + delete json3.minimum; + else + delete json3.exclusiveMinimum; } - }, - // Timezone (specific non-location) - z: function(date10, token, _localize) { - const timezoneOffset = date10.getTimezoneOffset(); - switch (token) { - // Short - case "z": - case "zz": - case "zzz": - return "GMT" + formatTimezoneShort(timezoneOffset, ":"); - // Long - case "zzzz": - default: - return "GMT" + formatTimezone(timezoneOffset, ":"); + } + if (typeof exclusiveMaximum === "number") { + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json3.maximum = exclusiveMaximum; + json3.exclusiveMaximum = true; + } else { + json3.exclusiveMaximum = exclusiveMaximum; } - }, - // Seconds timestamp - t: function(date10, token, _localize) { - const timestamp = Math.trunc(+date10 / 1e3); - return addLeadingZeros(timestamp, token.length); - }, - // Milliseconds timestamp - T: function(date10, token, _localize) { - return addLeadingZeros(+date10, token.length); } -}; -function formatTimezoneShort(offset, delimiter = "") { - const sign = offset > 0 ? "-" : "+"; - const absOffset = Math.abs(offset); - const hours = Math.trunc(absOffset / 60); - const minutes = absOffset % 60; - if (minutes === 0) { - return sign + String(hours); + if (typeof maximum === "number") { + json3.maximum = maximum; + if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { + if (exclusiveMaximum <= maximum) + delete json3.maximum; + else + delete json3.exclusiveMaximum; + } } - return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2); -} -function formatTimezoneWithOptionalMinutes(offset, delimiter) { - if (offset % 60 === 0) { - const sign = offset > 0 ? "-" : "+"; - return sign + addLeadingZeros(Math.abs(offset) / 60, 2); + if (typeof multipleOf === "number") + json3.multipleOf = multipleOf; +}; +var booleanProcessor = (_schema, _ctx, json3, _params) => { + json3.type = "boolean"; +}; +var bigintProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); } - return formatTimezone(offset, delimiter); -} -function formatTimezone(offset, delimiter = "") { - const sign = offset > 0 ? "-" : "+"; - const absOffset = Math.abs(offset); - const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2); - const minutes = addLeadingZeros(absOffset % 60, 2); - return sign + hours + delimiter + minutes; -} - -// node_modules/date-fns/_lib/format/longFormatters.js -var dateLongFormatter = (pattern, formatLong2) => { - switch (pattern) { - case "P": - return formatLong2.date({ width: "short" }); - case "PP": - return formatLong2.date({ width: "medium" }); - case "PPP": - return formatLong2.date({ width: "long" }); - case "PPPP": - default: - return formatLong2.date({ width: "full" }); +}; +var symbolProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); } }; -var timeLongFormatter = (pattern, formatLong2) => { - switch (pattern) { - case "p": - return formatLong2.time({ width: "short" }); - case "pp": - return formatLong2.time({ width: "medium" }); - case "ppp": - return formatLong2.time({ width: "long" }); - case "pppp": - default: - return formatLong2.time({ width: "full" }); +var nullProcessor = (_schema, ctx, json3, _params) => { + if (ctx.target === "openapi-3.0") { + json3.type = "string"; + json3.nullable = true; + json3.enum = [null]; + } else { + json3.type = "null"; } }; -var dateTimeLongFormatter = (pattern, formatLong2) => { - const matchResult = pattern.match(/(P+)(p+)?/) || []; - const datePattern = matchResult[1]; - const timePattern = matchResult[2]; - if (!timePattern) { - return dateLongFormatter(pattern, formatLong2); +var undefinedProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); } - let dateTimeFormat; - switch (datePattern) { - case "P": - dateTimeFormat = formatLong2.dateTime({ width: "short" }); - break; - case "PP": - dateTimeFormat = formatLong2.dateTime({ width: "medium" }); - break; - case "PPP": - dateTimeFormat = formatLong2.dateTime({ width: "long" }); - break; - case "PPPP": - default: - dateTimeFormat = formatLong2.dateTime({ width: "full" }); - break; +}; +var voidProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); } - return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2)); }; -var longFormatters = { - p: timeLongFormatter, - P: dateTimeLongFormatter +var neverProcessor = (_schema, _ctx, json3, _params) => { + json3.not = {}; }; - -// node_modules/date-fns/_lib/protectedTokens.js -var dayOfYearTokenRE = /^D+$/; -var weekYearTokenRE = /^Y+$/; -var throwTokens = ["D", "DD", "YY", "YYYY"]; -function isProtectedDayOfYearToken(token) { - return dayOfYearTokenRE.test(token); -} -function isProtectedWeekYearToken(token) { - return weekYearTokenRE.test(token); -} -function warnOrThrowProtectedError(token, format2, input) { - const _message = message(token, format2, input); - console.warn(_message); - if (throwTokens.includes(token)) throw new RangeError(_message); -} -function message(token, format2, input) { - const subject = token[0] === "Y" ? "years" : "days of the month"; - return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; -} - -// node_modules/date-fns/format.js -var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; -var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; -var escapedStringRegExp = /^'([^]*?)'?$/; -var doubleQuoteRegExp = /''/g; -var unescapedLatinCharacterRegExp = /[a-zA-Z]/; -function format(date10, formatStr, options) { - const defaultOptions2 = getDefaultOptions(); - const locale = options?.locale ?? defaultOptions2.locale ?? enUS; - const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; - const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0; - const originalDate = toDate(date10, options?.in); - if (!isValid(originalDate)) { - throw new RangeError("Invalid time value"); +var anyProcessor = (_schema, _ctx, _json, _params) => { +}; +var unknownProcessor = (_schema, _ctx, _json, _params) => { +}; +var dateProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); } - let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => { - const firstCharacter = substring[0]; - if (firstCharacter === "p" || firstCharacter === "P") { - const longFormatter = longFormatters[firstCharacter]; - return longFormatter(substring, locale.formatLong); - } - return substring; - }).join("").match(formattingTokensRegExp).map((substring) => { - if (substring === "''") { - return { isToken: false, value: "'" }; - } - const firstCharacter = substring[0]; - if (firstCharacter === "'") { - return { isToken: false, value: cleanEscapedString(substring) }; - } - if (formatters[firstCharacter]) { - return { isToken: true, value: substring }; +}; +var enumProcessor = (schema, _ctx, json3, _params) => { + const def = schema._zod.def; + const values = getEnumValues(def.entries); + if (values.every((v) => typeof v === "number")) + json3.type = "number"; + if (values.every((v) => typeof v === "string")) + json3.type = "string"; + json3.enum = values; +}; +var literalProcessor = (schema, ctx, json3, _params) => { + const def = schema._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { + } + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); } - if (firstCharacter.match(unescapedLatinCharacterRegExp)) { - throw new RangeError( - "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`" - ); + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json3.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json3.enum = [val]; + } else { + json3.const = val; } - return { isToken: false, value: substring }; - }); - if (locale.localize.preprocessor) { - parts = locale.localize.preprocessor(originalDate, parts); + } else { + if (vals.every((v) => typeof v === "number")) + json3.type = "number"; + if (vals.every((v) => typeof v === "string")) + json3.type = "string"; + if (vals.every((v) => typeof v === "boolean")) + json3.type = "boolean"; + if (vals.every((v) => v === null)) + json3.type = "null"; + json3.enum = vals; } - const formatterOptions = { - firstWeekContainsDate, - weekStartsOn, - locale +}; +var nanProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); + } +}; +var templateLiteralProcessor = (schema, _ctx, json3, _params) => { + const _json = json3; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; +}; +var fileProcessor = (schema, _ctx, json3, _params) => { + const _json = json3; + const file3 = { + type: "string", + format: "binary", + contentEncoding: "binary" }; - return parts.map((part) => { - if (!part.isToken) return part.value; - const token = part.value; - if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) { - warnOrThrowProtectedError(token, formatStr, String(date10)); + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file3.minLength = minimum; + if (maximum !== void 0) + file3.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file3.contentMediaType = mime[0]; + Object.assign(_json, file3); + } else { + Object.assign(_json, file3); + _json.anyOf = mime.map((m) => ({ contentMediaType: m })); } - const formatter = formatters[token[0]]; - return formatter(originalDate, token, locale.localize, formatterOptions); - }).join(""); -} -function cleanEscapedString(input) { - const matched = input.match(escapedStringRegExp); - if (!matched) { - return input; + } else { + Object.assign(_json, file3); } - return matched[1].replace(doubleQuoteRegExp, "'"); -} - -// src/summary.ts -var Summary2 = class _Summary { - /** - * Summary constructor - * @param data - Array holding all results from all the testing farm jobs - * @param newData - The latest result from the current testing farm job - */ - constructor(data, newData) { - this.data = data; - this.newData = newData; - this.updateData(this.newData); +}; +var successProcessor = (_schema, _ctx, json3, _params) => { + json3.type = "boolean"; +}; +var customProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); } - updateData(data) { - this.newData = data; - const { presence, index } = _Summary.isResultPresent(this.data, data.name); - if (presence && index !== void 0) { - this.data[index] = data; +}; +var functionProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } +}; +var transformProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } +}; +var mapProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } +}; +var setProcessor = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } +}; +var arrayProcessor = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json3.minItems = minimum; + if (typeof maximum === "number") + json3.maxItems = maximum; + json3.type = "array"; + json3.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] }); +}; +var objectProcessor = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + json3.type = "object"; + json3.properties = {}; + const shape = def.shape; + for (const key in shape) { + json3.properties[key] = process2(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v = def.shape[key]._zod; + if (ctx.io === "input") { + return v.optin === void 0; } else { - this.data.push(data); + return v.optout === void 0; } + })); + if (requiredKeys.size > 0) { + json3.required = Array.from(requiredKeys); } - refreshData(data) { - this.data = data; - this.updateData(this.newData); + if (def.catchall?._zod.def.type === "never") { + json3.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json3.additionalProperties = false; + } else if (def.catchall) { + json3.additionalProperties = process2(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); } - getTableHeader() { - return [ - { data: "name", header: true }, - { data: "compose", header: true }, - { data: "arch", header: true }, - { data: "status", header: true }, - { data: "started (UTC)", header: true }, - { data: "time", header: true }, - { data: "logs", header: true } - ]; +}; +var unionProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x, i) => process2(x, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] + })); + if (isExclusive) { + json3.oneOf = options; + } else { + json3.anyOf = options; } - getStatusIcon(status, outcome, infraError) { - if (infraError) { - return "\u26D4 infra error"; +}; +var intersectionProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + const a = process2(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b = process2(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; + const allOf = [ + ...isSimpleIntersection(a) ? a.allOf : [a], + ...isSimpleIntersection(b) ? b.allOf : [b] + ]; + json3.allOf = allOf; +}; +var tupleProcessor = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + json3.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x, i) => process2(x, ctx, { + ...params, + path: [...params.path, prefixPath, i] + })); + const rest = def.rest ? process2(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json3.prefixItems = prefixItems; + if (rest) { + json3.items = rest; } - let switchValue = status; - if (outcome) { - switchValue = outcome; + } else if (ctx.target === "openapi-3.0") { + json3.items = { + anyOf: prefixItems + }; + if (rest) { + json3.items.anyOf.push(rest); } - switch (switchValue) { - case "complete": - case "success": - case "passed": - return `\u2705 ${switchValue}`; - case "failed": - case "failure": - case "error": - return `\u274C ${switchValue}`; - case "new": - case "running": - case "queued": - case "pending": - return `\u23F3 ${switchValue}`; - default: - return switchValue; + json3.minItems = prefixItems.length; + if (!rest) { + json3.maxItems = prefixItems.length; + } + } else { + json3.items = prefixItems; + if (rest) { + json3.additionalItems = rest; } } - getTime(seconds) { - const hours = Math.floor(seconds / 3600); - const minutes = Math.floor(seconds % 3600 / 60); - const remainingSeconds = Math.round(seconds % 60); - return `${hours ? `${hours}h ` : ""}${minutes ? `${minutes}min ` : ""}${remainingSeconds ? `${remainingSeconds}s` : ""}`; - } - getTableRow(data) { - return [ - data.name, - data.compose || "<container image from plan>", - data.arch, - this.getStatusIcon(data.status, data.outcome, data.infrastructureFailure), - format(new Date(data.created), "dd.MM.yyyy HH:mm:ss"), - this.getTime(data.runTime), - data.results.join(" ") - ]; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json3.minItems = minimum; + if (typeof maximum === "number") + json3.maxItems = maximum; +}; +var recordProcessor = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + json3.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json3.patternProperties = {}; + for (const pattern of patterns) { + json3.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json3.propertyNames = process2(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json3.additionalProperties = process2(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); } - getTableSummary() { - const table = summary.addTable([ - this.getTableHeader(), - ...this.data.map((rawRow) => this.getTableRow(rawRow)) - ]).stringify(); - summary.emptyBuffer(); - return table; + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number"); + if (validKeyValues.length > 0) { + json3.required = validKeyValues; + } } - async setJobSummary() { - await summary.addHeading("Testing Farm as a GitHub Action summary").addTable([this.getTableHeader(), this.getTableRow(this.newData)]).write(); +}; +var nullableProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + const inner = process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json3.nullable = true; + } else { + json3.anyOf = [inner, { type: "null" }]; } - static isResultPresent(data, name) { - const index = data.findIndex((result) => result.name === name); - return { presence: index !== -1, index: index !== -1 ? index : void 0 }; +}; +var nonoptionalProcessor = (schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}; +var defaultProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json3.default = JSON.parse(JSON.stringify(def.defaultValue)); +}; +var prefaultProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + if (ctx.io === "input") + json3._prefault = JSON.parse(JSON.stringify(def.defaultValue)); +}; +var catchProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); } + json3.default = catchValue; }; +var pipeProcessor = (schema, ctx, _json, params) => { + const def = schema._zod.def; + const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; +}; +var readonlyProcessor = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json3.readOnly = true; +}; +var promiseProcessor = (schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}; +var optionalProcessor = (schema, ctx, _json, params) => { + const def = schema._zod.def; + process2(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}; +var lazyProcessor = (schema, ctx, _json, params) => { + const innerType = schema._zod.innerType; + process2(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; +}; +var allProcessors = { + string: stringProcessor, + number: numberProcessor, + boolean: booleanProcessor, + bigint: bigintProcessor, + symbol: symbolProcessor, + null: nullProcessor, + undefined: undefinedProcessor, + void: voidProcessor, + never: neverProcessor, + any: anyProcessor, + unknown: unknownProcessor, + date: dateProcessor, + enum: enumProcessor, + literal: literalProcessor, + nan: nanProcessor, + template_literal: templateLiteralProcessor, + file: fileProcessor, + success: successProcessor, + custom: customProcessor, + function: functionProcessor, + transform: transformProcessor, + map: mapProcessor, + set: setProcessor, + array: arrayProcessor, + object: objectProcessor, + union: unionProcessor, + intersection: intersectionProcessor, + tuple: tupleProcessor, + record: recordProcessor, + nullable: nullableProcessor, + nonoptional: nonoptionalProcessor, + default: defaultProcessor, + prefault: prefaultProcessor, + catch: catchProcessor, + pipe: pipeProcessor, + readonly: readonlyProcessor, + promise: promiseProcessor, + optional: optionalProcessor, + lazy: lazyProcessor +}; +function toJSONSchema(input, params) { + if ("_idmap" in input) { + const registry3 = input; + const ctx2 = initializeContext({ ...params, processors: allProcessors }); + const defs = {}; + for (const entry of registry3._idmap.entries()) { + const [_, schema] = entry; + process2(schema, ctx2); + } + const schemas = {}; + const external = { + registry: registry3, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry3._idmap.entries()) { + const [key, schema] = entry; + extractDefs(ctx2, schema); + schemas[key] = finalize(ctx2, schema); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext({ ...params, processors: allProcessors }); + process2(input, ctx); + extractDefs(ctx, input); + return finalize(ctx, input); +} -// node_modules/zod/v4/classic/external.js -var external_exports2 = {}; -__export(external_exports2, { - $brand: () => $brand2, - $input: () => $input2, - $output: () => $output2, - NEVER: () => NEVER2, - TimePrecision: () => TimePrecision2, - ZodAny: () => ZodAny2, - ZodArray: () => ZodArray2, - ZodBase64: () => ZodBase642, - ZodBase64URL: () => ZodBase64URL2, - ZodBigInt: () => ZodBigInt2, - ZodBigIntFormat: () => ZodBigIntFormat2, - ZodBoolean: () => ZodBoolean2, - ZodCIDRv4: () => ZodCIDRv42, - ZodCIDRv6: () => ZodCIDRv62, - ZodCUID: () => ZodCUID3, - ZodCUID2: () => ZodCUID22, - ZodCatch: () => ZodCatch2, - ZodCodec: () => ZodCodec2, - ZodCustom: () => ZodCustom2, - ZodCustomStringFormat: () => ZodCustomStringFormat2, - ZodDate: () => ZodDate2, - ZodDefault: () => ZodDefault2, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, - ZodE164: () => ZodE1642, - ZodEmail: () => ZodEmail2, - ZodEmoji: () => ZodEmoji2, - ZodEnum: () => ZodEnum2, - ZodError: () => ZodError2, - ZodExactOptional: () => ZodExactOptional2, - ZodFile: () => ZodFile2, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2, - ZodFunction: () => ZodFunction2, - ZodGUID: () => ZodGUID2, - ZodIPv4: () => ZodIPv42, - ZodIPv6: () => ZodIPv62, - ZodISODate: () => ZodISODate2, - ZodISODateTime: () => ZodISODateTime2, - ZodISODuration: () => ZodISODuration2, - ZodISOTime: () => ZodISOTime2, - ZodIntersection: () => ZodIntersection2, - ZodIssueCode: () => ZodIssueCode2, - ZodJWT: () => ZodJWT2, - ZodKSUID: () => ZodKSUID2, - ZodLazy: () => ZodLazy2, - ZodLiteral: () => ZodLiteral2, - ZodMAC: () => ZodMAC2, - ZodMap: () => ZodMap2, - ZodNaN: () => ZodNaN2, - ZodNanoID: () => ZodNanoID2, - ZodNever: () => ZodNever2, - ZodNonOptional: () => ZodNonOptional2, - ZodNull: () => ZodNull2, - ZodNullable: () => ZodNullable2, - ZodNumber: () => ZodNumber2, - ZodNumberFormat: () => ZodNumberFormat2, - ZodObject: () => ZodObject2, - ZodOptional: () => ZodOptional2, - ZodPipe: () => ZodPipe2, - ZodPrefault: () => ZodPrefault2, - ZodPreprocess: () => ZodPreprocess, - ZodPromise: () => ZodPromise2, - ZodReadonly: () => ZodReadonly2, - ZodRealError: () => ZodRealError2, - ZodRecord: () => ZodRecord2, - ZodSet: () => ZodSet2, - ZodString: () => ZodString2, - ZodStringFormat: () => ZodStringFormat2, - ZodSuccess: () => ZodSuccess2, - ZodSymbol: () => ZodSymbol2, - ZodTemplateLiteral: () => ZodTemplateLiteral2, - ZodTransform: () => ZodTransform2, - ZodTuple: () => ZodTuple2, - ZodType: () => ZodType2, - ZodULID: () => ZodULID2, - ZodURL: () => ZodURL2, - ZodUUID: () => ZodUUID2, - ZodUndefined: () => ZodUndefined2, - ZodUnion: () => ZodUnion2, - ZodUnknown: () => ZodUnknown2, - ZodVoid: () => ZodVoid2, - ZodXID: () => ZodXID2, - ZodXor: () => ZodXor2, - _ZodString: () => _ZodString2, - _default: () => _default4, - _function: () => _function2, - any: () => any2, - array: () => array2, - base64: () => base644, - base64url: () => base64url4, - bigint: () => bigint5, - boolean: () => boolean5, - catch: () => _catch4, - check: () => check2, - cidrv4: () => cidrv44, - cidrv6: () => cidrv64, - clone: () => clone2, - codec: () => codec2, - coerce: () => coerce_exports2, - config: () => config2, - core: () => core_exports4, - cuid: () => cuid5, - cuid2: () => cuid24, - custom: () => custom2, - date: () => date7, - decode: () => decode4, - decodeAsync: () => decodeAsync4, - describe: () => describe4, - discriminatedUnion: () => discriminatedUnion2, - e164: () => e1644, - email: () => email4, - emoji: () => emoji4, - encode: () => encode6, - encodeAsync: () => encodeAsync4, - endsWith: () => _endsWith2, - enum: () => _enum4, - exactOptional: () => exactOptional2, - file: () => file2, - flattenError: () => flattenError2, - float32: () => float322, - float64: () => float642, - formatError: () => formatError2, - fromJSONSchema: () => fromJSONSchema2, - function: () => _function2, - getErrorMap: () => getErrorMap2, - globalRegistry: () => globalRegistry2, - gt: () => _gt2, - gte: () => _gte2, - guid: () => guid4, - hash: () => hash2, - hex: () => hex4, - hostname: () => hostname4, - httpUrl: () => httpUrl2, - includes: () => _includes2, - instanceof: () => _instanceof2, - int: () => int2, - int32: () => int322, - int64: () => int642, - intersection: () => intersection2, - invertCodec: () => invertCodec, - ipv4: () => ipv44, - ipv6: () => ipv64, - iso: () => iso_exports2, - json: () => json2, - jwt: () => jwt2, - keyof: () => keyof2, - ksuid: () => ksuid4, - lazy: () => lazy2, - length: () => _length2, - literal: () => literal2, - locales: () => locales_exports2, - looseObject: () => looseObject2, - looseRecord: () => looseRecord2, - lowercase: () => _lowercase2, - lt: () => _lt2, - lte: () => _lte2, - mac: () => mac4, - map: () => map2, - maxLength: () => _maxLength2, - maxSize: () => _maxSize2, - meta: () => meta4, - mime: () => _mime2, - minLength: () => _minLength2, - minSize: () => _minSize2, - multipleOf: () => _multipleOf2, - nan: () => nan2, - nanoid: () => nanoid4, - nativeEnum: () => nativeEnum2, - negative: () => _negative2, - never: () => never2, - nonnegative: () => _nonnegative2, - nonoptional: () => nonoptional2, - nonpositive: () => _nonpositive2, - normalize: () => _normalize2, - null: () => _null6, - nullable: () => nullable2, - nullish: () => nullish4, - number: () => number5, - object: () => object2, - optional: () => optional2, - overwrite: () => _overwrite2, - parse: () => parse4, - parseAsync: () => parseAsync4, - partialRecord: () => partialRecord2, - pipe: () => pipe2, - positive: () => _positive2, - prefault: () => prefault2, - preprocess: () => preprocess2, - prettifyError: () => prettifyError2, - promise: () => promise2, - property: () => _property2, - readonly: () => readonly2, - record: () => record2, - refine: () => refine2, - regex: () => _regex2, - regexes: () => regexes_exports2, - registry: () => registry2, - safeDecode: () => safeDecode4, - safeDecodeAsync: () => safeDecodeAsync4, - safeEncode: () => safeEncode4, - safeEncodeAsync: () => safeEncodeAsync4, - safeParse: () => safeParse4, - safeParseAsync: () => safeParseAsync4, - set: () => set2, - setErrorMap: () => setErrorMap2, - size: () => _size2, - slugify: () => _slugify2, - startsWith: () => _startsWith2, - strictObject: () => strictObject2, - string: () => string5, - stringFormat: () => stringFormat2, - stringbool: () => stringbool2, - success: () => success2, - superRefine: () => superRefine2, - symbol: () => symbol2, - templateLiteral: () => templateLiteral2, - toJSONSchema: () => toJSONSchema2, - toLowerCase: () => _toLowerCase2, - toUpperCase: () => _toUpperCase2, - transform: () => transform2, - treeifyError: () => treeifyError2, - trim: () => _trim2, - tuple: () => tuple2, - uint32: () => uint322, - uint64: () => uint642, - ulid: () => ulid4, - undefined: () => _undefined6, - union: () => union2, - unknown: () => unknown2, - uppercase: () => _uppercase2, - url: () => url3, - util: () => util_exports2, - uuid: () => uuid5, - uuidv4: () => uuidv42, - uuidv6: () => uuidv62, - uuidv7: () => uuidv72, - void: () => _void4, - xid: () => xid4, - xor: () => xor2 -}); - -// node_modules/zod/v4/core/index.js -var core_exports4 = {}; -__export(core_exports4, { - $ZodAny: () => $ZodAny2, - $ZodArray: () => $ZodArray2, - $ZodAsyncError: () => $ZodAsyncError2, - $ZodBase64: () => $ZodBase642, - $ZodBase64URL: () => $ZodBase64URL2, - $ZodBigInt: () => $ZodBigInt2, - $ZodBigIntFormat: () => $ZodBigIntFormat2, - $ZodBoolean: () => $ZodBoolean2, - $ZodCIDRv4: () => $ZodCIDRv42, - $ZodCIDRv6: () => $ZodCIDRv62, - $ZodCUID: () => $ZodCUID3, - $ZodCUID2: () => $ZodCUID22, - $ZodCatch: () => $ZodCatch2, - $ZodCheck: () => $ZodCheck2, - $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat2, - $ZodCheckEndsWith: () => $ZodCheckEndsWith2, - $ZodCheckGreaterThan: () => $ZodCheckGreaterThan2, - $ZodCheckIncludes: () => $ZodCheckIncludes2, - $ZodCheckLengthEquals: () => $ZodCheckLengthEquals2, - $ZodCheckLessThan: () => $ZodCheckLessThan2, - $ZodCheckLowerCase: () => $ZodCheckLowerCase2, - $ZodCheckMaxLength: () => $ZodCheckMaxLength2, - $ZodCheckMaxSize: () => $ZodCheckMaxSize2, - $ZodCheckMimeType: () => $ZodCheckMimeType2, - $ZodCheckMinLength: () => $ZodCheckMinLength2, - $ZodCheckMinSize: () => $ZodCheckMinSize2, - $ZodCheckMultipleOf: () => $ZodCheckMultipleOf2, - $ZodCheckNumberFormat: () => $ZodCheckNumberFormat2, - $ZodCheckOverwrite: () => $ZodCheckOverwrite2, - $ZodCheckProperty: () => $ZodCheckProperty2, - $ZodCheckRegex: () => $ZodCheckRegex2, - $ZodCheckSizeEquals: () => $ZodCheckSizeEquals2, - $ZodCheckStartsWith: () => $ZodCheckStartsWith2, - $ZodCheckStringFormat: () => $ZodCheckStringFormat2, - $ZodCheckUpperCase: () => $ZodCheckUpperCase2, - $ZodCodec: () => $ZodCodec2, - $ZodCustom: () => $ZodCustom2, - $ZodCustomStringFormat: () => $ZodCustomStringFormat2, - $ZodDate: () => $ZodDate2, - $ZodDefault: () => $ZodDefault2, - $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion2, - $ZodE164: () => $ZodE1642, - $ZodEmail: () => $ZodEmail2, - $ZodEmoji: () => $ZodEmoji2, - $ZodEncodeError: () => $ZodEncodeError2, - $ZodEnum: () => $ZodEnum2, - $ZodError: () => $ZodError2, - $ZodExactOptional: () => $ZodExactOptional2, - $ZodFile: () => $ZodFile2, - $ZodFunction: () => $ZodFunction2, - $ZodGUID: () => $ZodGUID2, - $ZodIPv4: () => $ZodIPv42, - $ZodIPv6: () => $ZodIPv62, - $ZodISODate: () => $ZodISODate2, - $ZodISODateTime: () => $ZodISODateTime2, - $ZodISODuration: () => $ZodISODuration2, - $ZodISOTime: () => $ZodISOTime2, - $ZodIntersection: () => $ZodIntersection2, - $ZodJWT: () => $ZodJWT2, - $ZodKSUID: () => $ZodKSUID2, - $ZodLazy: () => $ZodLazy2, - $ZodLiteral: () => $ZodLiteral2, - $ZodMAC: () => $ZodMAC2, - $ZodMap: () => $ZodMap2, - $ZodNaN: () => $ZodNaN2, - $ZodNanoID: () => $ZodNanoID2, - $ZodNever: () => $ZodNever2, - $ZodNonOptional: () => $ZodNonOptional2, - $ZodNull: () => $ZodNull2, - $ZodNullable: () => $ZodNullable2, - $ZodNumber: () => $ZodNumber2, - $ZodNumberFormat: () => $ZodNumberFormat2, - $ZodObject: () => $ZodObject2, - $ZodObjectJIT: () => $ZodObjectJIT2, - $ZodOptional: () => $ZodOptional2, - $ZodPipe: () => $ZodPipe2, - $ZodPrefault: () => $ZodPrefault2, - $ZodPreprocess: () => $ZodPreprocess, - $ZodPromise: () => $ZodPromise2, - $ZodReadonly: () => $ZodReadonly2, - $ZodRealError: () => $ZodRealError2, - $ZodRecord: () => $ZodRecord2, - $ZodRegistry: () => $ZodRegistry2, - $ZodSet: () => $ZodSet2, - $ZodString: () => $ZodString2, - $ZodStringFormat: () => $ZodStringFormat2, - $ZodSuccess: () => $ZodSuccess2, - $ZodSymbol: () => $ZodSymbol2, - $ZodTemplateLiteral: () => $ZodTemplateLiteral2, - $ZodTransform: () => $ZodTransform2, - $ZodTuple: () => $ZodTuple2, - $ZodType: () => $ZodType2, - $ZodULID: () => $ZodULID2, - $ZodURL: () => $ZodURL2, - $ZodUUID: () => $ZodUUID2, - $ZodUndefined: () => $ZodUndefined2, - $ZodUnion: () => $ZodUnion2, - $ZodUnknown: () => $ZodUnknown2, - $ZodVoid: () => $ZodVoid2, - $ZodXID: () => $ZodXID2, - $ZodXor: () => $ZodXor2, - $brand: () => $brand2, - $constructor: () => $constructor2, - $input: () => $input2, - $output: () => $output2, - Doc: () => Doc2, - JSONSchema: () => json_schema_exports2, - JSONSchemaGenerator: () => JSONSchemaGenerator2, - NEVER: () => NEVER2, - TimePrecision: () => TimePrecision2, - _any: () => _any2, - _array: () => _array2, - _base64: () => _base642, - _base64url: () => _base64url2, - _bigint: () => _bigint2, - _boolean: () => _boolean2, - _catch: () => _catch3, - _check: () => _check2, - _cidrv4: () => _cidrv42, - _cidrv6: () => _cidrv62, - _coercedBigint: () => _coercedBigint2, - _coercedBoolean: () => _coercedBoolean2, - _coercedDate: () => _coercedDate2, - _coercedNumber: () => _coercedNumber2, - _coercedString: () => _coercedString2, - _cuid: () => _cuid3, - _cuid2: () => _cuid22, - _custom: () => _custom2, - _date: () => _date2, - _decode: () => _decode2, - _decodeAsync: () => _decodeAsync2, - _default: () => _default3, - _discriminatedUnion: () => _discriminatedUnion2, - _e164: () => _e1642, - _email: () => _email2, - _emoji: () => _emoji4, - _encode: () => _encode2, - _encodeAsync: () => _encodeAsync2, - _endsWith: () => _endsWith2, - _enum: () => _enum3, - _file: () => _file2, - _float32: () => _float322, - _float64: () => _float642, - _gt: () => _gt2, - _gte: () => _gte2, - _guid: () => _guid2, - _includes: () => _includes2, - _int: () => _int2, - _int32: () => _int322, - _int64: () => _int642, - _intersection: () => _intersection2, - _ipv4: () => _ipv42, - _ipv6: () => _ipv62, - _isoDate: () => _isoDate2, - _isoDateTime: () => _isoDateTime2, - _isoDuration: () => _isoDuration2, - _isoTime: () => _isoTime2, - _jwt: () => _jwt2, - _ksuid: () => _ksuid2, - _lazy: () => _lazy2, - _length: () => _length2, - _literal: () => _literal2, - _lowercase: () => _lowercase2, - _lt: () => _lt2, - _lte: () => _lte2, - _mac: () => _mac2, - _map: () => _map2, - _max: () => _lte2, - _maxLength: () => _maxLength2, - _maxSize: () => _maxSize2, - _mime: () => _mime2, - _min: () => _gte2, - _minLength: () => _minLength2, - _minSize: () => _minSize2, - _multipleOf: () => _multipleOf2, - _nan: () => _nan2, - _nanoid: () => _nanoid2, - _nativeEnum: () => _nativeEnum2, - _negative: () => _negative2, - _never: () => _never2, - _nonnegative: () => _nonnegative2, - _nonoptional: () => _nonoptional2, - _nonpositive: () => _nonpositive2, - _normalize: () => _normalize2, - _null: () => _null5, - _nullable: () => _nullable2, - _number: () => _number2, - _optional: () => _optional2, - _overwrite: () => _overwrite2, - _parse: () => _parse2, - _parseAsync: () => _parseAsync2, - _pipe: () => _pipe2, - _positive: () => _positive2, - _promise: () => _promise2, - _property: () => _property2, - _readonly: () => _readonly2, - _record: () => _record2, - _refine: () => _refine2, - _regex: () => _regex2, - _safeDecode: () => _safeDecode2, - _safeDecodeAsync: () => _safeDecodeAsync2, - _safeEncode: () => _safeEncode2, - _safeEncodeAsync: () => _safeEncodeAsync2, - _safeParse: () => _safeParse2, - _safeParseAsync: () => _safeParseAsync2, - _set: () => _set2, - _size: () => _size2, - _slugify: () => _slugify2, - _startsWith: () => _startsWith2, - _string: () => _string2, - _stringFormat: () => _stringFormat2, - _stringbool: () => _stringbool2, - _success: () => _success2, - _superRefine: () => _superRefine2, - _symbol: () => _symbol2, - _templateLiteral: () => _templateLiteral2, - _toLowerCase: () => _toLowerCase2, - _toUpperCase: () => _toUpperCase2, - _transform: () => _transform2, - _trim: () => _trim2, - _tuple: () => _tuple2, - _uint32: () => _uint322, - _uint64: () => _uint642, - _ulid: () => _ulid2, - _undefined: () => _undefined5, - _union: () => _union2, - _unknown: () => _unknown2, - _uppercase: () => _uppercase2, - _url: () => _url2, - _uuid: () => _uuid2, - _uuidv4: () => _uuidv42, - _uuidv6: () => _uuidv62, - _uuidv7: () => _uuidv72, - _void: () => _void3, - _xid: () => _xid2, - _xor: () => _xor2, - clone: () => clone2, - config: () => config2, - createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod2, - createToJSONSchemaMethod: () => createToJSONSchemaMethod2, - decode: () => decode3, - decodeAsync: () => decodeAsync3, - describe: () => describe3, - encode: () => encode5, - encodeAsync: () => encodeAsync3, - extractDefs: () => extractDefs2, - finalize: () => finalize2, - flattenError: () => flattenError2, - formatError: () => formatError2, - globalConfig: () => globalConfig2, - globalRegistry: () => globalRegistry2, - initializeContext: () => initializeContext2, - isValidBase64: () => isValidBase642, - isValidBase64URL: () => isValidBase64URL2, - isValidJWT: () => isValidJWT2, - locales: () => locales_exports2, - meta: () => meta3, - parse: () => parse3, - parseAsync: () => parseAsync3, - prettifyError: () => prettifyError2, - process: () => process3, - regexes: () => regexes_exports2, - registry: () => registry2, - safeDecode: () => safeDecode3, - safeDecodeAsync: () => safeDecodeAsync3, - safeEncode: () => safeEncode3, - safeEncodeAsync: () => safeEncodeAsync3, - safeParse: () => safeParse3, - safeParseAsync: () => safeParseAsync3, - toDotPath: () => toDotPath2, - toJSONSchema: () => toJSONSchema2, - treeifyError: () => treeifyError2, - util: () => util_exports2, - version: () => version2 -}); - -// node_modules/zod/v4/core/core.js -var _a2; -var NEVER2 = /* @__PURE__ */ Object.freeze({ - status: "aborted" -}); -// @__NO_SIDE_EFFECTS__ -function $constructor2(name, initializer6, params) { - function init(inst, def) { - if (!inst._zod) { - Object.defineProperty(inst, "_zod", { - value: { - def, - constr: _, - traits: /* @__PURE__ */ new Set() - }, - enumerable: false - }); - } - if (inst._zod.traits.has(name)) { - return; - } - inst._zod.traits.add(name); - initializer6(inst, def); - const proto = _.prototype; - const keys = Object.keys(proto); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - if (!(k in inst)) { - inst[k] = proto[k].bind(inst); - } - } - } - const Parent = params?.Parent ?? Object; - class Definition extends Parent { +// node_modules/testing-farm/node_modules/zod/v4/core/json-schema-generator.js +var JSONSchemaGenerator = class { + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; } - Object.defineProperty(Definition, "name", { value: name }); - function _(def) { - var _a5; - const inst = params?.Parent ? new Definition() : this; - init(inst, def); - (_a5 = inst._zod).deferred ?? (_a5.deferred = []); - for (const fn of inst._zod.deferred) { - fn(); - } - return inst; + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; } - 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 $brand2 = /* @__PURE__ */ Symbol("zod_brand"); -var $ZodAsyncError2 = class extends Error { - constructor() { - super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; } -}; -var $ZodEncodeError2 = class extends Error { - constructor(name) { - super(`Encountered unidirectional transform during encode: ${name}`); - this.name = "ZodEncodeError"; + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; } -}; -(_a2 = globalThis).__zod_globalConfig ?? (_a2.__zod_globalConfig = {}); -var globalConfig2 = globalThis.__zod_globalConfig; -function config2(newConfig) { - if (newConfig) - Object.assign(globalConfig2, newConfig); - return globalConfig2; -} - -// node_modules/zod/v4/core/util.js -var util_exports2 = {}; -__export(util_exports2, { - BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES2, - Class: () => Class2, - NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES2, - aborted: () => aborted2, - allowsEval: () => allowsEval2, - assert: () => assert2, - assertEqual: () => assertEqual2, - assertIs: () => assertIs2, - assertNever: () => assertNever2, - assertNotEqual: () => assertNotEqual2, - assignProp: () => assignProp2, - base64ToUint8Array: () => base64ToUint8Array2, - base64urlToUint8Array: () => base64urlToUint8Array2, - cached: () => cached2, - captureStackTrace: () => captureStackTrace2, - cleanEnum: () => cleanEnum2, - cleanRegex: () => cleanRegex2, - clone: () => clone2, - cloneDef: () => cloneDef2, - createTransparentProxy: () => createTransparentProxy2, - defineLazy: () => defineLazy2, - esc: () => esc2, - escapeRegex: () => escapeRegex2, - explicitlyAborted: () => explicitlyAborted, - extend: () => extend3, - finalizeIssue: () => finalizeIssue2, - floatSafeRemainder: () => floatSafeRemainder2, - getElementAtPath: () => getElementAtPath2, - getEnumValues: () => getEnumValues2, - getLengthableOrigin: () => getLengthableOrigin2, - getParsedType: () => getParsedType2, - getSizableOrigin: () => getSizableOrigin2, - hexToUint8Array: () => hexToUint8Array2, - isObject: () => isObject3, - isPlainObject: () => isPlainObject3, - issue: () => issue3, - joinValues: () => joinValues2, - jsonStringifyReplacer: () => jsonStringifyReplacer2, - merge: () => merge3, - mergeDefs: () => mergeDefs2, - normalizeParams: () => normalizeParams2, - nullish: () => nullish3, - numKeys: () => numKeys2, - objectClone: () => objectClone2, - omit: () => omit2, - optionalKeys: () => optionalKeys2, - parsedType: () => parsedType2, - partial: () => partial2, - pick: () => pick2, - prefixIssues: () => prefixIssues2, - primitiveTypes: () => primitiveTypes2, - promiseAllObject: () => promiseAllObject2, - propertyKeyTypes: () => propertyKeyTypes2, - randomString: () => randomString2, - required: () => required2, - safeExtend: () => safeExtend2, - shallowClone: () => shallowClone2, - slugify: () => slugify2, - stringifyPrimitive: () => stringifyPrimitive2, - uint8ArrayToBase64: () => uint8ArrayToBase642, - uint8ArrayToBase64url: () => uint8ArrayToBase64url2, - uint8ArrayToHex: () => uint8ArrayToHex2, - unwrapMessage: () => unwrapMessage2 -}); -function assertEqual2(val) { - return val; -} -function assertNotEqual2(val) { - return val; -} -function assertIs2(_arg) { -} -function assertNever2(_x) { - throw new Error("Unexpected value in exhaustive check"); -} -function assert2(_) { -} -function getEnumValues2(entries) { - const numericValues = Object.values(entries).filter((v) => typeof v === "number"); - const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); - return values; -} -function joinValues2(array4, separator = "|") { - return array4.map((val) => stringifyPrimitive2(val)).join(separator); -} -function jsonStringifyReplacer2(_, value) { - if (typeof value === "bigint") - return value.toString(); - return value; -} -function cached2(getter) { - const set4 = false; - return { - get value() { - if (!set4) { - const value = getter(); - Object.defineProperty(this, "value", { value }); - return value; - } - throw new Error("cached value already set"); - } - }; -} -function nullish3(input) { - return input === null || input === void 0; -} -function cleanRegex2(source) { - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - return source.slice(start, end); -} -function floatSafeRemainder2(val, step) { - const ratio = val / step; - const roundedRatio = Math.round(ratio); - const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1); - if (Math.abs(ratio - roundedRatio) < tolerance) - return 0; - return ratio - roundedRatio; -} -var EVALUATING2 = /* @__PURE__ */ Symbol("evaluating"); -function defineLazy2(object4, key, getter) { - let value = void 0; - Object.defineProperty(object4, key, { - get() { - if (value === EVALUATING2) { - return void 0; - } - if (value === void 0) { - value = EVALUATING2; - value = getter(); - } - return value; - }, - set(v) { - Object.defineProperty(object4, key, { - value: v - // configurable: true, - }); - }, - configurable: true - }); -} -function objectClone2(obj) { - return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); -} -function assignProp2(target, prop, value) { - Object.defineProperty(target, prop, { - value, - writable: true, - enumerable: true, - configurable: true - }); -} -function mergeDefs2(...defs) { - const mergedDescriptors = {}; - for (const def of defs) { - const descriptors = Object.getOwnPropertyDescriptors(def); - Object.assign(mergedDescriptors, descriptors); + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; } - return Object.defineProperties({}, mergedDescriptors); -} -function cloneDef2(schema) { - return mergeDefs2(schema._zod.def); -} -function getElementAtPath2(obj, path) { - if (!path) - return obj; - return path.reduce((acc, key) => acc?.[key], obj); -} -function promiseAllObject2(promisesObj) { - const keys = Object.keys(promisesObj); - const promises3 = keys.map((key) => promisesObj[key]); - return Promise.all(promises3).then((results) => { - const resolvedObj = {}; - for (let i = 0; i < keys.length; i++) { - resolvedObj[keys[i]] = results[i]; - } - return resolvedObj; - }); -} -function randomString2(length = 10) { - const chars = "abcdefghijklmnopqrstuvwxyz"; - let str = ""; - for (let i = 0; i < length; i++) { - str += chars[Math.floor(Math.random() * chars.length)]; + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; } - return str; -} -function esc2(str) { - return JSON.stringify(str); -} -function slugify2(input) { - return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); -} -var captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { -}; -function isObject3(data) { - return typeof data === "object" && data !== null && !Array.isArray(data); -} -var allowsEval2 = /* @__PURE__ */ cached2(() => { - if (globalConfig2.jitless) { - return false; + set counter(value) { + this.ctx.counter = value; } - if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { - return false; + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; } - try { - const F = Function; - new F(""); - return true; - } catch (_) { - return false; + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext({ + processors: allProcessors, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); } -}); -function isPlainObject3(o) { - if (isObject3(o) === false) - return false; - const ctor = o.constructor; - if (ctor === void 0) - return true; - if (typeof ctor !== "function") - return true; - const prot = ctor.prototype; - if (isObject3(prot) === false) - return false; - if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { - return false; + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema, _params = { path: [], schemaPath: [] }) { + return process2(schema, this.ctx, _params); } - return true; -} -function shallowClone2(o) { - if (isPlainObject3(o)) - return { ...o }; - if (Array.isArray(o)) - return [...o]; - if (o instanceof Map) - return new Map(o); - if (o instanceof Set) - return new Set(o); - return o; -} -function numKeys2(data) { - let keyCount = 0; - for (const key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - keyCount++; + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; } - } - return keyCount; -} -var getParsedType2 = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return "undefined"; - case "string": - return "string"; - case "number": - return Number.isNaN(data) ? "nan" : "number"; - case "boolean": - return "boolean"; - case "function": - return "function"; - case "bigint": - return "bigint"; - case "symbol": - return "symbol"; - case "object": - if (Array.isArray(data)) { - return "array"; - } - if (data === null) { - return "null"; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return "promise"; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return "map"; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return "set"; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return "date"; - } - if (typeof File !== "undefined" && data instanceof File) { - return "file"; - } - return "object"; - default: - throw new Error(`Unknown data type: ${t}`); + extractDefs(this.ctx, schema); + const result = finalize(this.ctx, schema); + const { "~standard": _, ...plainResult } = result; + return plainResult; } }; -var propertyKeyTypes2 = /* @__PURE__ */ new Set(["string", "number", "symbol"]); -var primitiveTypes2 = /* @__PURE__ */ new Set([ - "string", - "number", - "bigint", - "boolean", - "symbol", - "undefined" -]); -function escapeRegex2(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -} -function clone2(inst, def, params) { - const cl = new inst._zod.constr(def ?? inst._zod.def); - if (!def || params?.parent) - cl._zod.parent = inst; - return cl; -} -function normalizeParams2(_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 createTransparentProxy2(getter) { - let target; - return new Proxy({}, { - get(_, prop, receiver) { - target ?? (target = getter()); - return Reflect.get(target, prop, receiver); - }, - set(_, prop, value, receiver) { - target ?? (target = getter()); - return Reflect.set(target, prop, value, receiver); - }, - has(_, prop) { - target ?? (target = getter()); - return Reflect.has(target, prop); - }, - deleteProperty(_, prop) { - target ?? (target = getter()); - return Reflect.deleteProperty(target, prop); - }, - ownKeys(_) { - target ?? (target = getter()); - return Reflect.ownKeys(target); - }, - getOwnPropertyDescriptor(_, prop) { - target ?? (target = getter()); - return Reflect.getOwnPropertyDescriptor(target, prop); - }, - defineProperty(_, prop, descriptor) { - target ?? (target = getter()); - return Reflect.defineProperty(target, prop, descriptor); - } - }); + +// node_modules/testing-farm/node_modules/zod/v4/core/json-schema.js +var json_schema_exports = {}; + +// node_modules/testing-farm/node_modules/zod/v4/classic/schemas.js +var schemas_exports2 = {}; +__export(schemas_exports2, { + ZodAny: () => ZodAny, + ZodArray: () => ZodArray, + ZodBase64: () => ZodBase64, + ZodBase64URL: () => ZodBase64URL, + ZodBigInt: () => ZodBigInt, + ZodBigIntFormat: () => ZodBigIntFormat, + ZodBoolean: () => ZodBoolean, + ZodCIDRv4: () => ZodCIDRv4, + ZodCIDRv6: () => ZodCIDRv6, + ZodCUID: () => ZodCUID, + ZodCUID2: () => ZodCUID2, + ZodCatch: () => ZodCatch, + ZodCodec: () => ZodCodec, + ZodCustom: () => ZodCustom, + ZodCustomStringFormat: () => ZodCustomStringFormat, + ZodDate: () => ZodDate, + ZodDefault: () => ZodDefault, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion, + ZodE164: () => ZodE164, + ZodEmail: () => ZodEmail, + ZodEmoji: () => ZodEmoji, + ZodEnum: () => ZodEnum, + ZodExactOptional: () => ZodExactOptional, + ZodFile: () => ZodFile, + ZodFunction: () => ZodFunction, + ZodGUID: () => ZodGUID, + ZodIPv4: () => ZodIPv4, + ZodIPv6: () => ZodIPv6, + ZodIntersection: () => ZodIntersection, + ZodJWT: () => ZodJWT, + ZodKSUID: () => ZodKSUID, + ZodLazy: () => ZodLazy, + ZodLiteral: () => ZodLiteral, + ZodMAC: () => ZodMAC, + ZodMap: () => ZodMap, + ZodNaN: () => ZodNaN, + ZodNanoID: () => ZodNanoID, + ZodNever: () => ZodNever, + ZodNonOptional: () => ZodNonOptional, + ZodNull: () => ZodNull, + ZodNullable: () => ZodNullable, + ZodNumber: () => ZodNumber, + ZodNumberFormat: () => ZodNumberFormat, + ZodObject: () => ZodObject, + ZodOptional: () => ZodOptional, + ZodPipe: () => ZodPipe, + ZodPrefault: () => ZodPrefault, + ZodPromise: () => ZodPromise, + ZodReadonly: () => ZodReadonly, + ZodRecord: () => ZodRecord, + ZodSet: () => ZodSet, + ZodString: () => ZodString, + ZodStringFormat: () => ZodStringFormat, + ZodSuccess: () => ZodSuccess, + ZodSymbol: () => ZodSymbol, + ZodTemplateLiteral: () => ZodTemplateLiteral, + ZodTransform: () => ZodTransform, + ZodTuple: () => ZodTuple, + ZodType: () => ZodType, + ZodULID: () => ZodULID, + ZodURL: () => ZodURL, + ZodUUID: () => ZodUUID, + ZodUndefined: () => ZodUndefined, + ZodUnion: () => ZodUnion, + ZodUnknown: () => ZodUnknown, + ZodVoid: () => ZodVoid, + ZodXID: () => ZodXID, + ZodXor: () => ZodXor, + _ZodString: () => _ZodString, + _default: () => _default2, + _function: () => _function, + any: () => any, + array: () => array, + base64: () => base642, + base64url: () => base64url2, + bigint: () => bigint2, + boolean: () => boolean2, + catch: () => _catch2, + check: () => check, + cidrv4: () => cidrv42, + cidrv6: () => cidrv62, + codec: () => codec, + cuid: () => cuid3, + cuid2: () => cuid22, + custom: () => custom, + date: () => date3, + describe: () => describe2, + discriminatedUnion: () => discriminatedUnion, + e164: () => e1642, + email: () => email2, + emoji: () => emoji2, + enum: () => _enum2, + exactOptional: () => exactOptional, + file: () => file, + float32: () => float32, + float64: () => float64, + function: () => _function, + guid: () => guid2, + hash: () => hash, + hex: () => hex2, + hostname: () => hostname2, + httpUrl: () => httpUrl, + instanceof: () => _instanceof, + int: () => int, + int32: () => int32, + int64: () => int64, + intersection: () => intersection, + ipv4: () => ipv42, + ipv6: () => ipv62, + json: () => json, + jwt: () => jwt, + keyof: () => keyof, + ksuid: () => ksuid2, + lazy: () => lazy, + literal: () => literal, + looseObject: () => looseObject, + looseRecord: () => looseRecord, + mac: () => mac2, + map: () => map, + meta: () => meta2, + nan: () => nan, + nanoid: () => nanoid2, + nativeEnum: () => nativeEnum, + never: () => never, + nonoptional: () => nonoptional, + null: () => _null3, + nullable: () => nullable, + nullish: () => nullish2, + number: () => number2, + object: () => object, + optional: () => optional, + partialRecord: () => partialRecord, + pipe: () => pipe, + prefault: () => prefault, + preprocess: () => preprocess, + promise: () => promise, + readonly: () => readonly, + record: () => record, + refine: () => refine, + set: () => set, + strictObject: () => strictObject, + string: () => string2, + stringFormat: () => stringFormat, + stringbool: () => stringbool, + success: () => success, + superRefine: () => superRefine, + symbol: () => symbol, + templateLiteral: () => templateLiteral, + transform: () => transform, + tuple: () => tuple, + uint32: () => uint32, + uint64: () => uint64, + ulid: () => ulid2, + undefined: () => _undefined3, + union: () => union, + unknown: () => unknown, + url: () => url2, + uuid: () => uuid2, + uuidv4: () => uuidv4, + uuidv6: () => uuidv6, + uuidv7: () => uuidv7, + void: () => _void2, + xid: () => xid2, + xor: () => xor +}); + +// node_modules/testing-farm/node_modules/zod/v4/classic/checks.js +var checks_exports2 = {}; +__export(checks_exports2, { + endsWith: () => _endsWith, + gt: () => _gt, + gte: () => _gte, + includes: () => _includes, + length: () => _length, + lowercase: () => _lowercase, + lt: () => _lt, + lte: () => _lte, + maxLength: () => _maxLength, + maxSize: () => _maxSize, + mime: () => _mime, + minLength: () => _minLength, + minSize: () => _minSize, + multipleOf: () => _multipleOf, + negative: () => _negative, + nonnegative: () => _nonnegative, + nonpositive: () => _nonpositive, + normalize: () => _normalize, + overwrite: () => _overwrite, + positive: () => _positive, + property: () => _property, + regex: () => _regex, + size: () => _size, + slugify: () => _slugify, + startsWith: () => _startsWith, + toLowerCase: () => _toLowerCase, + toUpperCase: () => _toUpperCase, + trim: () => _trim, + uppercase: () => _uppercase +}); + +// node_modules/testing-farm/node_modules/zod/v4/classic/iso.js +var iso_exports = {}; +__export(iso_exports, { + ZodISODate: () => ZodISODate, + ZodISODateTime: () => ZodISODateTime, + ZodISODuration: () => ZodISODuration, + ZodISOTime: () => ZodISOTime, + date: () => date2, + datetime: () => datetime2, + duration: () => duration2, + time: () => time2 +}); +var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => { + $ZodISODateTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function datetime2(params) { + return _isoDateTime(ZodISODateTime, params); } -function stringifyPrimitive2(value) { - if (typeof value === "bigint") - return value.toString() + "n"; - if (typeof value === "string") - return `"${value}"`; - return `${value}`; +var ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => { + $ZodISODate.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function date2(params) { + return _isoDate(ZodISODate, params); } -function optionalKeys2(shape) { - return Object.keys(shape).filter((k) => { - return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; - }); +var ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => { + $ZodISOTime.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function time2(params) { + return _isoTime(ZodISOTime, params); } -var NUMBER_FORMAT_RANGES2 = { - safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], - int32: [-2147483648, 2147483647], - uint32: [0, 4294967295], - float32: [-34028234663852886e22, 34028234663852886e22], - float64: [-Number.MAX_VALUE, Number.MAX_VALUE] -}; -var BIGINT_FORMAT_RANGES2 = { - int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], - uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] -}; -function pick2(schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".pick() cannot be used on object schemas containing refinements"); - } - const def = mergeDefs2(schema._zod.def, { - get shape() { - const newShape = {}; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - newShape[key] = currDef.shape[key]; +var ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => { + $ZodISODuration.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function duration2(params) { + return _isoDuration(ZodISODuration, params); +} + +// node_modules/testing-farm/node_modules/zod/v4/classic/errors.js +var initializer2 = (inst, issues) => { + $ZodError.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue4) => { + inst.issues.push(issue4); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); } - assignProp2(this, "shape", newShape); - return newShape; + // enumerable: false, }, - checks: [] - }); - return clone2(schema, def); -} -function omit2(schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".omit() cannot be used on object schemas containing refinements"); - } - const def = mergeDefs2(schema._zod.def, { - get shape() { - const newShape = { ...schema._zod.def.shape }; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - delete newShape[key]; + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2); } - assignProp2(this, "shape", newShape); - return newShape; + // enumerable: false, }, - checks: [] - }); - return clone2(schema, def); -} -function extend3(schema, shape) { - if (!isPlainObject3(shape)) { - throw new Error("Invalid input to extend: expected a plain object"); - } - const checks = schema._zod.def.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - const existingShape = schema._zod.def.shape; - for (const key in shape) { - if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { - throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); + isEmpty: { + get() { + return inst.issues.length === 0; } - } - } - const def = mergeDefs2(schema._zod.def, { - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp2(this, "shape", _shape); - return _shape; + // enumerable: false, } }); - return clone2(schema, def); -} -function safeExtend2(schema, shape) { - if (!isPlainObject3(shape)) { - throw new Error("Invalid input to safeExtend: expected a plain object"); - } - const def = mergeDefs2(schema._zod.def, { - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp2(this, "shape", _shape); - return _shape; +}; +var ZodError = $constructor("ZodError", initializer2); +var ZodRealError = $constructor("ZodError", initializer2, { + Parent: Error +}); + +// node_modules/testing-farm/node_modules/zod/v4/classic/parse.js +var parse2 = /* @__PURE__ */ _parse(ZodRealError); +var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError); +var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError); +var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError); +var encode4 = /* @__PURE__ */ _encode(ZodRealError); +var decode2 = /* @__PURE__ */ _decode(ZodRealError); +var encodeAsync2 = /* @__PURE__ */ _encodeAsync(ZodRealError); +var decodeAsync2 = /* @__PURE__ */ _decodeAsync(ZodRealError); +var safeEncode2 = /* @__PURE__ */ _safeEncode(ZodRealError); +var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError); +var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError); +var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError); + +// node_modules/testing-farm/node_modules/zod/v4/classic/schemas.js +var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => { + $ZodType.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod(inst, "input"), + output: createStandardJSONSchemaMethod(inst, "output") } }); - return clone2(schema, def); -} -function merge3(a, b) { - if (a._zod.def.checks?.length) { - throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead."); - } - const def = mergeDefs2(a._zod.def, { - get shape() { - const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; - assignProp2(this, "shape", _shape); - return _shape; - }, - get catchall() { - return b._zod.def.catchall; + inst.toJSONSchema = createToJSONSchemaMethod(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.check = (...checks) => { + return inst.clone(util_exports.mergeDefs(def, { + checks: [ + ...def.checks ?? [], + ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + }), { + parent: true + }); + }; + inst.with = inst.check; + inst.clone = (def2, params) => clone(inst, def2, params); + inst.brand = () => inst; + inst.register = ((reg, meta5) => { + reg.add(inst, meta5); + return inst; + }); + inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse2(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode4(inst, data, params); + inst.decode = (data, params) => decode2(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync2(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync2(inst, data, params); + inst.safeEncode = (data, params) => safeEncode2(inst, data, params); + inst.safeDecode = (data, params) => safeDecode2(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params); + inst.refine = (check3, params) => inst.check(refine(check3, params)); + inst.superRefine = (refinement) => inst.check(superRefine(refinement)); + inst.overwrite = (fn) => inst.check(_overwrite(fn)); + inst.optional = () => optional(inst); + inst.exactOptional = () => exactOptional(inst); + inst.nullable = () => nullable(inst); + inst.nullish = () => optional(nullable(inst)); + inst.nonoptional = (params) => nonoptional(inst, params); + inst.array = () => array(inst); + inst.or = (arg) => union([inst, arg]); + inst.and = (arg) => intersection(inst, arg); + inst.transform = (tx) => pipe(inst, transform(tx)); + inst.default = (def2) => _default2(inst, def2); + inst.prefault = (def2) => prefault(inst, def2); + inst.catch = (params) => _catch2(inst, params); + inst.pipe = (target) => pipe(inst, target); + inst.readonly = () => readonly(inst); + inst.describe = (description) => { + const cl = inst.clone(); + globalRegistry.add(cl, { description }); + return cl; + }; + Object.defineProperty(inst, "description", { + get() { + return globalRegistry.get(inst)?.description; }, - checks: b._zod.def.checks ?? [] + configurable: true }); - return clone2(a, def); -} -function partial2(Class4, schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".partial() cannot be used on object schemas containing refinements"); - } - const def = mergeDefs2(schema._zod.def, { - get shape() { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in oldShape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = Class4 ? new Class4({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } else { - for (const key in oldShape) { - shape[key] = Class4 ? new Class4({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } - assignProp2(this, "shape", shape); - return shape; - }, - checks: [] - }); - return clone2(schema, def); -} -function required2(Class4, schema, mask) { - const def = mergeDefs2(schema._zod.def, { - get shape() { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = new Class4({ - type: "nonoptional", - innerType: oldShape[key] - }); - } - } else { - for (const key in oldShape) { - shape[key] = new Class4({ - type: "nonoptional", - innerType: oldShape[key] - }); - } - } - assignProp2(this, "shape", shape); - return shape; + inst.meta = (...args) => { + if (args.length === 0) { + return globalRegistry.get(inst); } - }); - return clone2(schema, def); + const cl = inst.clone(); + globalRegistry.add(cl, args[0]); + return cl; + }; + inst.isOptional = () => inst.safeParse(void 0).success; + inst.isNullable = () => inst.safeParse(null).success; + inst.apply = (fn) => fn(inst); + return inst; +}); +var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => { + $ZodString.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => stringProcessor(inst, ctx, json3, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + inst.regex = (...args) => inst.check(_regex(...args)); + inst.includes = (...args) => inst.check(_includes(...args)); + inst.startsWith = (...args) => inst.check(_startsWith(...args)); + inst.endsWith = (...args) => inst.check(_endsWith(...args)); + inst.min = (...args) => inst.check(_minLength(...args)); + inst.max = (...args) => inst.check(_maxLength(...args)); + inst.length = (...args) => inst.check(_length(...args)); + inst.nonempty = (...args) => inst.check(_minLength(1, ...args)); + inst.lowercase = (params) => inst.check(_lowercase(params)); + inst.uppercase = (params) => inst.check(_uppercase(params)); + inst.trim = () => inst.check(_trim()); + inst.normalize = (...args) => inst.check(_normalize(...args)); + inst.toLowerCase = () => inst.check(_toLowerCase()); + inst.toUpperCase = () => inst.check(_toUpperCase()); + inst.slugify = () => inst.check(_slugify()); +}); +var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => { + $ZodString.init(inst, def); + _ZodString.init(inst, def); + inst.email = (params) => inst.check(_email(ZodEmail, params)); + inst.url = (params) => inst.check(_url(ZodURL, params)); + inst.jwt = (params) => inst.check(_jwt(ZodJWT, params)); + inst.emoji = (params) => inst.check(_emoji2(ZodEmoji, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.uuid = (params) => inst.check(_uuid(ZodUUID, params)); + inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params)); + inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params)); + inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params)); + inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params)); + inst.guid = (params) => inst.check(_guid(ZodGUID, params)); + inst.cuid = (params) => inst.check(_cuid(ZodCUID, params)); + inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params)); + inst.ulid = (params) => inst.check(_ulid(ZodULID, params)); + inst.base64 = (params) => inst.check(_base64(ZodBase64, params)); + inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params)); + inst.xid = (params) => inst.check(_xid(ZodXID, params)); + inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params)); + inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params)); + inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params)); + inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params)); + inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params)); + inst.e164 = (params) => inst.check(_e164(ZodE164, params)); + inst.datetime = (params) => inst.check(datetime2(params)); + inst.date = (params) => inst.check(date2(params)); + inst.time = (params) => inst.check(time2(params)); + inst.duration = (params) => inst.check(duration2(params)); +}); +function string2(params) { + return _string(ZodString, params); } -function aborted2(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; +var ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => { + $ZodStringFormat.init(inst, def); + _ZodString.init(inst, def); +}); +var ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => { + $ZodEmail.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function email2(params) { + return _email(ZodEmail, params); } -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; +var ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => { + $ZodGUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function guid2(params) { + return _guid(ZodGUID, params); } -function prefixIssues2(path, issues) { - return issues.map((iss) => { - var _a5; - (_a5 = iss).path ?? (_a5.path = []); - iss.path.unshift(path); - return iss; +var ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => { + $ZodUUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function uuid2(params) { + return _uuid(ZodUUID, params); +} +function uuidv4(params) { + return _uuidv4(ZodUUID, params); +} +function uuidv6(params) { + return _uuidv6(ZodUUID, params); +} +function uuidv7(params) { + return _uuidv7(ZodUUID, params); +} +var ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => { + $ZodURL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function url2(params) { + return _url(ZodURL, params); +} +function httpUrl(params) { + return _url(ZodURL, { + protocol: /^https?$/, + hostname: regexes_exports.domain, + ...util_exports.normalizeParams(params) }); } -function unwrapMessage2(message2) { - return typeof message2 === "string" ? message2 : message2?.message; +var ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => { + $ZodEmoji.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function emoji2(params) { + return _emoji2(ZodEmoji, params); } -function finalizeIssue2(iss, ctx, config4) { - const message2 = iss.message ? iss.message : unwrapMessage2(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage2(ctx?.error?.(iss)) ?? unwrapMessage2(config4.customError?.(iss)) ?? unwrapMessage2(config4.localeError?.(iss)) ?? "Invalid input"; - const { inst: _inst, continue: _continue, input: _input, ...rest } = iss; - rest.path ?? (rest.path = []); - rest.message = message2; - if (ctx?.reportInput) { - rest.input = _input; - } - return rest; +var ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => { + $ZodNanoID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function nanoid2(params) { + return _nanoid(ZodNanoID, params); } -function getSizableOrigin2(input) { - if (input instanceof Set) - return "set"; - if (input instanceof Map) - return "map"; - if (input instanceof File) - return "file"; - return "unknown"; +var ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => { + $ZodCUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid3(params) { + return _cuid(ZodCUID, params); } -function getLengthableOrigin2(input) { - if (Array.isArray(input)) - return "array"; - if (typeof input === "string") - return "string"; - return "unknown"; +var ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => { + $ZodCUID2.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cuid22(params) { + return _cuid2(ZodCUID2, params); } -function parsedType2(data) { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "nan" : "number"; - } - case "object": { - if (data === null) { - return "null"; - } - if (Array.isArray(data)) { - return "array"; - } - const obj = data; - if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { - return obj.constructor.name; - } - } - } - return t; +var ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => { + $ZodULID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ulid2(params) { + return _ulid(ZodULID, params); } -function issue3(...args) { - const [iss, input, inst] = args; - if (typeof iss === "string") { - return { - message: iss, - code: "custom", - input, - inst - }; - } - return { ...iss }; +var ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => { + $ZodXID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function xid2(params) { + return _xid(ZodXID, params); } -function cleanEnum2(obj) { - return Object.entries(obj).filter(([k, _]) => { - return Number.isNaN(Number.parseInt(k, 10)); - }).map((el) => el[1]); +var ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => { + $ZodKSUID.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ksuid2(params) { + return _ksuid(ZodKSUID, params); } -function base64ToUint8Array2(base646) { - const binaryString = atob(base646); - const bytes = new Uint8Array(binaryString.length); - for (let i = 0; i < binaryString.length; i++) { - bytes[i] = binaryString.charCodeAt(i); - } - return bytes; +var ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => { + $ZodIPv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv42(params) { + return _ipv4(ZodIPv4, params); } -function uint8ArrayToBase642(bytes) { - let binaryString = ""; - for (let i = 0; i < bytes.length; i++) { - binaryString += String.fromCharCode(bytes[i]); - } - return btoa(binaryString); +var ZodMAC = /* @__PURE__ */ $constructor("ZodMAC", (inst, def) => { + $ZodMAC.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function mac2(params) { + return _mac(ZodMAC, params); } -function base64urlToUint8Array2(base64url6) { - const base646 = base64url6.replace(/-/g, "+").replace(/_/g, "/"); - const padding = "=".repeat((4 - base646.length % 4) % 4); - return base64ToUint8Array2(base646 + padding); +var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => { + $ZodIPv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function ipv62(params) { + return _ipv6(ZodIPv6, params); } -function uint8ArrayToBase64url2(bytes) { - return uint8ArrayToBase642(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => { + $ZodCIDRv4.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv42(params) { + return _cidrv4(ZodCIDRv4, params); } -function hexToUint8Array2(hex6) { - const cleanHex = hex6.replace(/^0x/, ""); - if (cleanHex.length % 2 !== 0) { - throw new Error("Invalid hex string length"); - } - const bytes = new Uint8Array(cleanHex.length / 2); - for (let i = 0; i < cleanHex.length; i += 2) { - bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); - } - return bytes; +var ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => { + $ZodCIDRv6.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function cidrv62(params) { + return _cidrv6(ZodCIDRv6, params); } -function uint8ArrayToHex2(bytes) { - return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +var ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => { + $ZodBase64.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base642(params) { + return _base64(ZodBase64, params); } -var Class2 = class { - constructor(..._args) { - } -}; - -// node_modules/zod/v4/core/errors.js -var initializer3 = (inst, def) => { - inst.name = "$ZodError"; - Object.defineProperty(inst, "_zod", { - value: inst._zod, - enumerable: false - }); - Object.defineProperty(inst, "issues", { - value: def, - enumerable: false - }); - inst.message = JSON.stringify(def, jsonStringifyReplacer2, 2); - Object.defineProperty(inst, "toString", { - value: () => inst.message, - enumerable: false - }); -}; -var $ZodError2 = $constructor2("$ZodError", initializer3); -var $ZodRealError2 = $constructor2("$ZodError", initializer3, { Parent: Error }); -function flattenError2(error100, mapper = (issue5) => issue5.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of error100.issues) { - if (sub.path.length > 0) { - fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; - fieldErrors[sub.path[0]].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; +var ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => { + $ZodBase64URL.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function base64url2(params) { + return _base64url(ZodBase64URL, params); } -function formatError2(error100, mapper = (issue5) => issue5.message) { - const fieldErrors = { _errors: [] }; - const processError = (error101, path = []) => { - for (const issue5 of error101.issues) { - if (issue5.code === "invalid_union" && issue5.errors.length) { - issue5.errors.map((issues) => processError({ issues }, [...path, ...issue5.path])); - } else if (issue5.code === "invalid_key") { - processError({ issues: issue5.issues }, [...path, ...issue5.path]); - } else if (issue5.code === "invalid_element") { - processError({ issues: issue5.issues }, [...path, ...issue5.path]); - } else { - const fullpath = [...path, ...issue5.path]; - if (fullpath.length === 0) { - fieldErrors._errors.push(mapper(issue5)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < fullpath.length) { - const el = fullpath[i]; - const terminal = i === fullpath.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue5)); - } - curr = curr[el]; - i++; - } - } - } - } - }; - processError(error100); - return fieldErrors; +var ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => { + $ZodE164.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function e1642(params) { + return _e164(ZodE164, params); } -function treeifyError2(error100, mapper = (issue5) => issue5.message) { - const result = { errors: [] }; - const processError = (error101, path = []) => { - var _a5, _b; - for (const issue5 of error101.issues) { - if (issue5.code === "invalid_union" && issue5.errors.length) { - issue5.errors.map((issues) => processError({ issues }, [...path, ...issue5.path])); - } else if (issue5.code === "invalid_key") { - processError({ issues: issue5.issues }, [...path, ...issue5.path]); - } else if (issue5.code === "invalid_element") { - processError({ issues: issue5.issues }, [...path, ...issue5.path]); - } else { - const fullpath = [...path, ...issue5.path]; - if (fullpath.length === 0) { - result.errors.push(mapper(issue5)); - continue; - } - let curr = result; - let i = 0; - while (i < fullpath.length) { - const el = fullpath[i]; - const terminal = i === fullpath.length - 1; - if (typeof el === "string") { - curr.properties ?? (curr.properties = {}); - (_a5 = curr.properties)[el] ?? (_a5[el] = { errors: [] }); - curr = curr.properties[el]; - } else { - curr.items ?? (curr.items = []); - (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); - curr = curr.items[el]; - } - if (terminal) { - curr.errors.push(mapper(issue5)); - } - i++; - } - } - } - }; - processError(error100); - return result; +var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => { + $ZodJWT.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function jwt(params) { + return _jwt(ZodJWT, params); } -function toDotPath2(_path) { - const segs = []; - const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); - for (const seg of path) { - if (typeof seg === "number") - segs.push(`[${seg}]`); - else if (typeof seg === "symbol") - segs.push(`[${JSON.stringify(String(seg))}]`); - else if (/[^\w$]/.test(seg)) - segs.push(`[${JSON.stringify(seg)}]`); - else { - if (segs.length) - segs.push("."); - segs.push(seg); - } - } - return segs.join(""); +var ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat.init(inst, def); + ZodStringFormat.init(inst, def); +}); +function stringFormat(format2, fnOrRegex, _params = {}) { + return _stringFormat(ZodCustomStringFormat, format2, fnOrRegex, _params); } -function prettifyError2(error100) { - const lines = []; - const issues = [...error100.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); - for (const issue5 of issues) { - lines.push(`\u2716 ${issue5.message}`); - if (issue5.path?.length) - lines.push(` \u2192 at ${toDotPath2(issue5.path)}`); - } - return lines.join("\n"); +function hostname2(_params) { + return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params); } - -// node_modules/zod/v4/core/parse.js -var _parse2 = (_Err) => (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 $ZodAsyncError2(); - } - if (result.issues.length) { - const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))); - captureStackTrace2(e, _params?.callee); - throw e; - } - return result.value; -}; -var parse3 = /* @__PURE__ */ _parse2($ZodRealError2); -var _parseAsync2 = (_Err) => 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) => finalizeIssue2(iss, ctx, config2()))); - captureStackTrace2(e, params?.callee); - throw e; - } - return result.value; -}; -var parseAsync3 = /* @__PURE__ */ _parseAsync2($ZodRealError2); -var _safeParse2 = (_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 $ZodAsyncError2(); - } - return result.issues.length ? { - success: false, - error: new (_Err ?? $ZodError2)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) - } : { success: true, data: result.value }; -}; -var safeParse3 = /* @__PURE__ */ _safeParse2($ZodRealError2); -var _safeParseAsync2 = (_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 ? { - success: false, - error: new _Err(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) - } : { success: true, data: result.value }; -}; -var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync2($ZodRealError2); -var _encode2 = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; - return _parse2(_Err)(schema, value, ctx); -}; -var encode5 = /* @__PURE__ */ _encode2($ZodRealError2); -var _decode2 = (_Err) => (schema, value, _ctx) => { - return _parse2(_Err)(schema, value, _ctx); -}; -var decode3 = /* @__PURE__ */ _decode2($ZodRealError2); -var _encodeAsync2 = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; - return _parseAsync2(_Err)(schema, value, ctx); -}; -var encodeAsync3 = /* @__PURE__ */ _encodeAsync2($ZodRealError2); -var _decodeAsync2 = (_Err) => async (schema, value, _ctx) => { - return _parseAsync2(_Err)(schema, value, _ctx); -}; -var decodeAsync3 = /* @__PURE__ */ _decodeAsync2($ZodRealError2); -var _safeEncode2 = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; - return _safeParse2(_Err)(schema, value, ctx); -}; -var safeEncode3 = /* @__PURE__ */ _safeEncode2($ZodRealError2); -var _safeDecode2 = (_Err) => (schema, value, _ctx) => { - return _safeParse2(_Err)(schema, value, _ctx); -}; -var safeDecode3 = /* @__PURE__ */ _safeDecode2($ZodRealError2); -var _safeEncodeAsync2 = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; - return _safeParseAsync2(_Err)(schema, value, ctx); -}; -var safeEncodeAsync3 = /* @__PURE__ */ _safeEncodeAsync2($ZodRealError2); -var _safeDecodeAsync2 = (_Err) => async (schema, value, _ctx) => { - return _safeParseAsync2(_Err)(schema, value, _ctx); -}; -var safeDecodeAsync3 = /* @__PURE__ */ _safeDecodeAsync2($ZodRealError2); - -// node_modules/zod/v4/core/regexes.js -var regexes_exports2 = {}; -__export(regexes_exports2, { - base64: () => base643, - base64url: () => base64url3, - bigint: () => bigint4, - boolean: () => boolean4, - browserEmail: () => browserEmail2, - cidrv4: () => cidrv43, - cidrv6: () => cidrv63, - cuid: () => cuid4, - cuid2: () => cuid23, - date: () => date5, - datetime: () => datetime3, - domain: () => domain2, - duration: () => duration3, - e164: () => e1643, - email: () => email3, - emoji: () => emoji3, - extendedDuration: () => extendedDuration2, - guid: () => guid3, - hex: () => hex3, - hostname: () => hostname3, - html5Email: () => html5Email2, - httpProtocol: () => httpProtocol, - idnEmail: () => idnEmail2, - integer: () => integer2, - ipv4: () => ipv43, - ipv6: () => ipv63, - ksuid: () => ksuid3, - lowercase: () => lowercase2, - mac: () => mac3, - md5_base64: () => md5_base642, - md5_base64url: () => md5_base64url2, - md5_hex: () => md5_hex2, - nanoid: () => nanoid3, - null: () => _null4, - number: () => number4, - rfc5322Email: () => rfc5322Email2, - sha1_base64: () => sha1_base642, - sha1_base64url: () => sha1_base64url2, - sha1_hex: () => sha1_hex2, - sha256_base64: () => sha256_base642, - sha256_base64url: () => sha256_base64url2, - sha256_hex: () => sha256_hex2, - sha384_base64: () => sha384_base642, - sha384_base64url: () => sha384_base64url2, - sha384_hex: () => sha384_hex2, - sha512_base64: () => sha512_base642, - sha512_base64url: () => sha512_base64url2, - sha512_hex: () => sha512_hex2, - string: () => string4, - time: () => time3, - ulid: () => ulid3, - undefined: () => _undefined4, - unicodeEmail: () => unicodeEmail2, - uppercase: () => uppercase2, - uuid: () => uuid3, - uuid4: () => uuid42, - uuid6: () => uuid62, - uuid7: () => uuid72, - xid: () => xid3 +function hex2(_params) { + return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params); +} +function hash(alg, params) { + const enc = params?.enc ?? "hex"; + const format2 = `${alg}_${enc}`; + const regex2 = regexes_exports[format2]; + if (!regex2) + throw new Error(`Unrecognized hash format: ${format2}`); + return _stringFormat(ZodCustomStringFormat, format2, regex2, params); +} +var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => { + $ZodNumber.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => numberProcessor(inst, ctx, json3, params); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.int = (params) => inst.check(int(params)); + inst.safe = (params) => inst.check(int(params)); + inst.positive = (params) => inst.check(_gt(0, params)); + inst.nonnegative = (params) => inst.check(_gte(0, params)); + inst.negative = (params) => inst.check(_lt(0, params)); + inst.nonpositive = (params) => inst.check(_lte(0, params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + inst.step = (value, params) => inst.check(_multipleOf(value, params)); + inst.finite = () => inst; + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; }); -var cuid4 = /^[cC][0-9a-z]{6,}$/; -var cuid23 = /^[0-9a-z]+$/; -var ulid3 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; -var xid3 = /^[0-9a-vA-V]{20}$/; -var ksuid3 = /^[A-Za-z0-9]{27}$/; -var nanoid3 = /^[a-zA-Z0-9_-]{21}$/; -var duration3 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; -var extendedDuration2 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; -var guid3 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; -var uuid3 = (version4) => { - if (!version4) - return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version4}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); -}; -var uuid42 = /* @__PURE__ */ uuid3(4); -var uuid62 = /* @__PURE__ */ uuid3(6); -var uuid72 = /* @__PURE__ */ uuid3(7); -var email3 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; -var html5Email2 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -var rfc5322Email2 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; -var unicodeEmail2 = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; -var idnEmail2 = unicodeEmail2; -var browserEmail2 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -var _emoji3 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -function emoji3() { - return new RegExp(_emoji3, "u"); +function number2(params) { + return _number(ZodNumber, params); } -var ipv43 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; -var ipv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; -var mac3 = (delimiter) => { - const escapedDelim = escapeRegex2(delimiter ?? ":"); - return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); -}; -var cidrv43 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; -var cidrv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; -var base643 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; -var base64url3 = /^[A-Za-z0-9_-]*$/; -var hostname3 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; -var domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; -var httpProtocol = /^https?$/; -var e1643 = /^\+[1-9]\d{6,14}$/; -var dateSource2 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; -var date5 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`); -function timeSource2(args) { - const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; - const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; - return regex2; +var ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat.init(inst, def); + ZodNumber.init(inst, def); +}); +function int(params) { + return _int(ZodNumberFormat, params); } -function time3(args) { - return new RegExp(`^${timeSource2(args)}$`); +function float32(params) { + return _float32(ZodNumberFormat, params); } -function datetime3(args) { - const time6 = timeSource2({ precision: args.precision }); - const opts = ["Z"]; - if (args.local) - opts.push(""); - if (args.offset) - opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); - const timeRegex = `${time6}(?:${opts.join("|")})`; - return new RegExp(`^${dateSource2}T(?:${timeRegex})$`); +function float64(params) { + return _float64(ZodNumberFormat, params); } -var string4 = (params) => { - const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; - return new RegExp(`^${regex2}$`); -}; -var bigint4 = /^-?\d+n?$/; -var integer2 = /^-?\d+$/; -var number4 = /^-?\d+(?:\.\d+)?$/; -var boolean4 = /^(?:true|false)$/i; -var _null4 = /^null$/i; -var _undefined4 = /^undefined$/i; -var lowercase2 = /^[^A-Z]*$/; -var uppercase2 = /^[^a-z]*$/; -var hex3 = /^[0-9a-fA-F]*$/; -function fixedBase642(bodyLength, padding) { - return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +function int32(params) { + return _int32(ZodNumberFormat, params); } -function fixedBase64url2(length) { - return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +function uint32(params) { + return _uint32(ZodNumberFormat, params); } -var md5_hex2 = /^[0-9a-fA-F]{32}$/; -var md5_base642 = /* @__PURE__ */ fixedBase642(22, "=="); -var md5_base64url2 = /* @__PURE__ */ fixedBase64url2(22); -var sha1_hex2 = /^[0-9a-fA-F]{40}$/; -var sha1_base642 = /* @__PURE__ */ fixedBase642(27, "="); -var sha1_base64url2 = /* @__PURE__ */ fixedBase64url2(27); -var sha256_hex2 = /^[0-9a-fA-F]{64}$/; -var sha256_base642 = /* @__PURE__ */ fixedBase642(43, "="); -var sha256_base64url2 = /* @__PURE__ */ fixedBase64url2(43); -var sha384_hex2 = /^[0-9a-fA-F]{96}$/; -var sha384_base642 = /* @__PURE__ */ fixedBase642(64, ""); -var sha384_base64url2 = /* @__PURE__ */ fixedBase64url2(64); -var sha512_hex2 = /^[0-9a-fA-F]{128}$/; -var sha512_base642 = /* @__PURE__ */ fixedBase642(86, "=="); -var sha512_base64url2 = /* @__PURE__ */ fixedBase64url2(86); - -// node_modules/zod/v4/core/checks.js -var $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => { - var _a5; - inst._zod ?? (inst._zod = {}); - inst._zod.def = def; - (_a5 = inst._zod).onattach ?? (_a5.onattach = []); +var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => { + $ZodBoolean.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => booleanProcessor(inst, ctx, json3, params); }); -var numericOriginMap2 = { - number: "number", - bigint: "bigint", - object: "date" -}; -var $ZodCheckLessThan2 = /* @__PURE__ */ $constructor2("$ZodCheckLessThan", (inst, def) => { - $ZodCheck2.init(inst, def); - const origin2 = numericOriginMap2[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; - if (def.value < curr) { - if (def.inclusive) - bag.maximum = def.value; - else - bag.exclusiveMaximum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { - return; - } - payload.issues.push({ - origin: origin2, - code: "too_big", - maximum: typeof def.value === "object" ? def.value.getTime() : def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); - }; +function boolean2(params) { + return _boolean(ZodBoolean, params); +} +var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => { + $ZodBigInt.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => bigintProcessor(inst, ctx, json3, params); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.gt = (value, params) => inst.check(_gt(value, params)); + inst.gte = (value, params) => inst.check(_gte(value, params)); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.lt = (value, params) => inst.check(_lt(value, params)); + inst.lte = (value, params) => inst.check(_lte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + inst.positive = (params) => inst.check(_gt(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; }); -var $ZodCheckGreaterThan2 = /* @__PURE__ */ $constructor2("$ZodCheckGreaterThan", (inst, def) => { - $ZodCheck2.init(inst, def); - const origin2 = numericOriginMap2[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; - if (def.value > curr) { - if (def.inclusive) - bag.minimum = def.value; - else - bag.exclusiveMinimum = def.value; - } +function bigint2(params) { + return _bigint(ZodBigInt, params); +} +var ZodBigIntFormat = /* @__PURE__ */ $constructor("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat.init(inst, def); + ZodBigInt.init(inst, def); +}); +function int64(params) { + return _int64(ZodBigIntFormat, params); +} +function uint64(params) { + return _uint64(ZodBigIntFormat, params); +} +var ZodSymbol = /* @__PURE__ */ $constructor("ZodSymbol", (inst, def) => { + $ZodSymbol.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => symbolProcessor(inst, ctx, json3, params); +}); +function symbol(params) { + return _symbol(ZodSymbol, params); +} +var ZodUndefined = /* @__PURE__ */ $constructor("ZodUndefined", (inst, def) => { + $ZodUndefined.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => undefinedProcessor(inst, ctx, json3, params); +}); +function _undefined3(params) { + return _undefined2(ZodUndefined, params); +} +var ZodNull = /* @__PURE__ */ $constructor("ZodNull", (inst, def) => { + $ZodNull.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nullProcessor(inst, ctx, json3, params); +}); +function _null3(params) { + return _null2(ZodNull, params); +} +var ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => { + $ZodAny.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => anyProcessor(inst, ctx, json3, params); +}); +function any() { + return _any(ZodAny); +} +var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => { + $ZodUnknown.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => unknownProcessor(inst, ctx, json3, params); +}); +function unknown() { + return _unknown(ZodUnknown); +} +var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => { + $ZodNever.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => neverProcessor(inst, ctx, json3, params); +}); +function never(params) { + return _never(ZodNever, params); +} +var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => { + $ZodVoid.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => voidProcessor(inst, ctx, json3, params); +}); +function _void2(params) { + return _void(ZodVoid, params); +} +var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => { + $ZodDate.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => dateProcessor(inst, ctx, json3, params); + inst.min = (value, params) => inst.check(_gte(value, params)); + inst.max = (value, params) => inst.check(_lte(value, params)); + const c = inst._zod.bag; + inst.minDate = c.minimum ? new Date(c.minimum) : null; + inst.maxDate = c.maximum ? new Date(c.maximum) : null; +}); +function date3(params) { + return _date(ZodDate, params); +} +var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => { + $ZodArray.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => arrayProcessor(inst, ctx, json3, params); + inst.element = def.element; + inst.min = (minLength, params) => inst.check(_minLength(minLength, params)); + inst.nonempty = (params) => inst.check(_minLength(1, params)); + inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params)); + inst.length = (len, params) => inst.check(_length(len, params)); + inst.unwrap = () => inst.element; +}); +function array(element, params) { + return _array(ZodArray, element, params); +} +function keyof(schema) { + const shape = schema._zod.def.shape; + return _enum2(Object.keys(shape)); +} +var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => { + $ZodObjectJIT.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => objectProcessor(inst, ctx, json3, params); + util_exports.defineLazy(inst, "shape", () => { + return def.shape; }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { - return; - } - payload.issues.push({ - origin: origin2, - code: "too_small", - minimum: typeof def.value === "object" ? def.value.getTime() : def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); + inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape)); + inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); + inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() }); + inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() }); + inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); + inst.extend = (incoming) => { + return util_exports.extend(inst, incoming); + }; + inst.safeExtend = (incoming) => { + return util_exports.safeExtend(inst, incoming); }; + inst.merge = (other) => util_exports.merge(inst, other); + inst.pick = (mask) => util_exports.pick(inst, mask); + inst.omit = (mask) => util_exports.omit(inst, mask); + inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]); + inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]); }); -var $ZodCheckMultipleOf2 = /* @__PURE__ */ $constructor2("$ZodCheckMultipleOf", (inst, def) => { - $ZodCheck2.init(inst, def); - inst._zod.onattach.push((inst2) => { - var _a5; - (_a5 = inst2._zod.bag).multipleOf ?? (_a5.multipleOf = def.value); - }); - inst._zod.check = (payload) => { - if (typeof payload.value !== typeof def.value) - throw new Error("Cannot mix number and bigint in multiple_of check."); - const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder2(payload.value, def.value) === 0; - if (isMultiple) - return; - payload.issues.push({ - origin: typeof payload.value, - code: "not_multiple_of", - divisor: def.value, - input: payload.value, - inst, - continue: !def.abort - }); +function object(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports.normalizeParams(params) }; + return new ZodObject(def); +} +function strictObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: never(), + ...util_exports.normalizeParams(params) + }); +} +function looseObject(shape, params) { + return new ZodObject({ + type: "object", + shape, + catchall: unknown(), + ...util_exports.normalizeParams(params) + }); +} +var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => { + $ZodUnion.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor(inst, ctx, json3, params); + inst.options = def.options; }); -var $ZodCheckNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckNumberFormat", (inst, def) => { - $ZodCheck2.init(inst, def); - def.format = def.format || "float64"; - const isInt = def.format?.includes("int"); - const origin2 = isInt ? "int" : "number"; - const [minimum, maximum] = NUMBER_FORMAT_RANGES2[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - if (isInt) - bag.pattern = integer2; +function union(options, params) { + return new ZodUnion({ + type: "union", + options, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - const input = payload.value; - if (isInt) { - if (!Number.isInteger(input)) { - payload.issues.push({ - expected: origin2, - format: def.format, - code: "invalid_type", - continue: false, - input, - inst - }); - return; - } - if (!Number.isSafeInteger(input)) { - if (input > 0) { - payload.issues.push({ - input, - code: "too_big", - maximum: Number.MAX_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin: origin2, - inclusive: true, - continue: !def.abort - }); - } else { - payload.issues.push({ - input, - code: "too_small", - minimum: Number.MIN_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin: origin2, - inclusive: true, - continue: !def.abort - }); - } - return; - } - } - if (input < minimum) { - payload.issues.push({ - origin: "number", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "number", - input, - code: "too_big", - maximum, - inclusive: true, - inst, - continue: !def.abort - }); - } - }; +} +var ZodXor = /* @__PURE__ */ $constructor("ZodXor", (inst, def) => { + ZodUnion.init(inst, def); + $ZodXor.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor(inst, ctx, json3, params); + inst.options = def.options; }); -var $ZodCheckBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckBigIntFormat", (inst, def) => { - $ZodCheck2.init(inst, def); - const [minimum, maximum] = BIGINT_FORMAT_RANGES2[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; +function xor(options, params) { + return new ZodXor({ + type: "union", + options, + inclusive: false, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - const input = payload.value; - if (input < minimum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_big", - maximum, - inclusive: true, - inst, - continue: !def.abort - }); - } - }; +} +var ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion.init(inst, def); + $ZodDiscriminatedUnion.init(inst, def); }); -var $ZodCheckMaxSize2 = /* @__PURE__ */ $constructor2("$ZodCheckMaxSize", (inst, def) => { - var _a5; - $ZodCheck2.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish3(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; +function discriminatedUnion(discriminator, options, params) { + return new ZodDiscriminatedUnion({ + type: "union", + options, + discriminator, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size <= def.maximum) - return; - payload.issues.push({ - origin: getSizableOrigin2(input), - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; +} +var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => { + $ZodIntersection.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => intersectionProcessor(inst, ctx, json3, params); }); -var $ZodCheckMinSize2 = /* @__PURE__ */ $constructor2("$ZodCheckMinSize", (inst, def) => { - var _a5; - $ZodCheck2.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish3(val) && val.size !== void 0; +function intersection(left, right) { + return new ZodIntersection({ + type: "intersection", + left, + right }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; +} +var ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => { + $ZodTuple.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => tupleProcessor(inst, ctx, json3, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size >= def.minimum) - return; - payload.issues.push({ - origin: getSizableOrigin2(input), - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; }); -var $ZodCheckSizeEquals2 = /* @__PURE__ */ $constructor2("$ZodCheckSizeEquals", (inst, def) => { - var _a5; - $ZodCheck2.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish3(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.size; - bag.maximum = def.size; - bag.size = def.size; +function tuple(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple({ + type: "tuple", + items, + rest, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size === def.size) - return; - const tooBig = size > def.size; - payload.issues.push({ - origin: getSizableOrigin2(input), - ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; +} +var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => { + $ZodRecord.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => recordProcessor(inst, ctx, json3, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; }); -var $ZodCheckMaxLength2 = /* @__PURE__ */ $constructor2("$ZodCheckMaxLength", (inst, def) => { - var _a5; - $ZodCheck2.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish3(val) && val.length !== void 0; +function record(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + ...util_exports.normalizeParams(params) }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; +} +function partialRecord(keyType, valueType, params) { + const k = clone(keyType); + k._zod.values = void 0; + return new ZodRecord({ + type: "record", + keyType: k, + valueType, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length <= def.maximum) - return; - const origin2 = getLengthableOrigin2(input); - payload.issues.push({ - origin: origin2, - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; +} +function looseRecord(keyType, valueType, params) { + return new ZodRecord({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports.normalizeParams(params) + }); +} +var ZodMap = /* @__PURE__ */ $constructor("ZodMap", (inst, def) => { + $ZodMap.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => mapProcessor(inst, ctx, json3, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); }); -var $ZodCheckMinLength2 = /* @__PURE__ */ $constructor2("$ZodCheckMinLength", (inst, def) => { - var _a5; - $ZodCheck2.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish3(val) && val.length !== void 0; +function map(keyType, valueType, params) { + return new ZodMap({ + type: "map", + keyType, + valueType, + ...util_exports.normalizeParams(params) }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; +} +var ZodSet = /* @__PURE__ */ $constructor("ZodSet", (inst, def) => { + $ZodSet.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => setProcessor(inst, ctx, json3, params); + inst.min = (...args) => inst.check(_minSize(...args)); + inst.nonempty = (params) => inst.check(_minSize(1, params)); + inst.max = (...args) => inst.check(_maxSize(...args)); + inst.size = (...args) => inst.check(_size(...args)); +}); +function set(valueType, params) { + return new ZodSet({ + type: "set", + valueType, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length >= def.minimum) - return; - const origin2 = getLengthableOrigin2(input); - payload.issues.push({ - origin: origin2, - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort +} +var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => { + $ZodEnum.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => enumProcessor(inst, ctx, json3, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries }); }; -}); -var $ZodCheckLengthEquals2 = /* @__PURE__ */ $constructor2("$ZodCheckLengthEquals", (inst, def) => { - var _a5; - $ZodCheck2.init(inst, def); - (_a5 = inst._zod.def).when ?? (_a5.when = (payload) => { - const val = payload.value; - return !nullish3(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.length; - bag.maximum = def.length; - bag.length = def.length; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length === def.length) - return; - const origin2 = getLengthableOrigin2(input); - const tooBig = length > def.length; - payload.issues.push({ - origin: origin2, - ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum({ + ...def, + checks: [], + ...util_exports.normalizeParams(params), + entries: newEntries }); }; }); -var $ZodCheckStringFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckStringFormat", (inst, def) => { - var _a5, _b; - $ZodCheck2.init(inst, def); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - if (def.pattern) { - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(def.pattern); +function _enum2(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +function nativeEnum(entries, params) { + return new ZodEnum({ + type: "enum", + entries, + ...util_exports.normalizeParams(params) + }); +} +var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => { + $ZodLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => literalProcessor(inst, ctx, json3, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; } }); - if (def.pattern) - (_a5 = inst._zod).check ?? (_a5.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 = () => { - }); }); -var $ZodCheckRegex2 = /* @__PURE__ */ $constructor2("$ZodCheckRegex", (inst, def) => { - $ZodCheckStringFormat2.init(inst, def); - inst._zod.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "regex", - input: payload.value, - pattern: def.pattern.toString(), - inst, - continue: !def.abort - }); - }; +function literal(value, params) { + return new ZodLiteral({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports.normalizeParams(params) + }); +} +var ZodFile = /* @__PURE__ */ $constructor("ZodFile", (inst, def) => { + $ZodFile.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => fileProcessor(inst, ctx, json3, params); + inst.min = (size, params) => inst.check(_minSize(size, params)); + inst.max = (size, params) => inst.check(_maxSize(size, params)); + inst.mime = (types, params) => inst.check(_mime(Array.isArray(types) ? types : [types], params)); }); -var $ZodCheckLowerCase2 = /* @__PURE__ */ $constructor2("$ZodCheckLowerCase", (inst, def) => { - def.pattern ?? (def.pattern = lowercase2); - $ZodCheckStringFormat2.init(inst, def); +function file(params) { + return _file(ZodFile, params); +} +var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => { + $ZodTransform.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => transformProcessor(inst, ctx, json3, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError(inst.constructor.name); + } + payload.addIssue = (issue4) => { + if (typeof issue4 === "string") { + payload.issues.push(util_exports.issue(issue4, payload.value, def)); + } else { + const _issue = issue4; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + return payload; + }); + } + payload.value = output; + return payload; + }; }); -var $ZodCheckUpperCase2 = /* @__PURE__ */ $constructor2("$ZodCheckUpperCase", (inst, def) => { - def.pattern ?? (def.pattern = uppercase2); - $ZodCheckStringFormat2.init(inst, def); +function transform(fn) { + return new ZodTransform({ + type: "transform", + transform: fn + }); +} +var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => { + $ZodOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => optionalProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; }); -var $ZodCheckIncludes2 = /* @__PURE__ */ $constructor2("$ZodCheckIncludes", (inst, def) => { - $ZodCheck2.init(inst, def); - const escapedRegex = escapeRegex2(def.includes); - const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); - def.pattern = pattern; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); +function optional(innerType) { + return new ZodOptional({ + type: "optional", + innerType }); - inst._zod.check = (payload) => { - if (payload.value.includes(def.includes, def.position)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "includes", - includes: def.includes, - input: payload.value, - inst, - continue: !def.abort - }); - }; +} +var ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => { + $ZodExactOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => optionalProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; }); -var $ZodCheckStartsWith2 = /* @__PURE__ */ $constructor2("$ZodCheckStartsWith", (inst, def) => { - $ZodCheck2.init(inst, def); - const pattern = new RegExp(`^${escapeRegex2(def.prefix)}.*`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); +function exactOptional(innerType) { + return new ZodExactOptional({ + type: "optional", + innerType }); - inst._zod.check = (payload) => { - if (payload.value.startsWith(def.prefix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "starts_with", - prefix: def.prefix, - input: payload.value, - inst, - continue: !def.abort - }); - }; +} +var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => { + $ZodNullable.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nullableProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; }); -var $ZodCheckEndsWith2 = /* @__PURE__ */ $constructor2("$ZodCheckEndsWith", (inst, def) => { - $ZodCheck2.init(inst, def); - const pattern = new RegExp(`.*${escapeRegex2(def.suffix)}$`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); +function nullable(innerType) { + return new ZodNullable({ + type: "nullable", + innerType }); - inst._zod.check = (payload) => { - if (payload.value.endsWith(def.suffix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "ends_with", - suffix: def.suffix, - input: payload.value, - inst, - continue: !def.abort - }); - }; +} +function nullish2(innerType) { + return optional(nullable(innerType)); +} +var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => { + $ZodDefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => defaultProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; }); -function handleCheckPropertyResult2(result, payload, property) { - if (result.issues.length) { - payload.issues.push(...prefixIssues2(property, result.issues)); - } +function _default2(innerType, defaultValue) { + return new ZodDefault({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); + } + }); } -var $ZodCheckProperty2 = /* @__PURE__ */ $constructor2("$ZodCheckProperty", (inst, def) => { - $ZodCheck2.init(inst, def); - inst._zod.check = (payload) => { - const result = def.schema._zod.run({ - value: payload.value[def.property], - issues: [] - }, {}); - if (result instanceof Promise) { - return result.then((result2) => handleCheckPropertyResult2(result2, payload, def.property)); +var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => { + $ZodPrefault.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => prefaultProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault(innerType, defaultValue) { + return new ZodPrefault({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue); } - handleCheckPropertyResult2(result, payload, def.property); - return; - }; + }); +} +var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => { + $ZodNonOptional.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nonoptionalProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; }); -var $ZodCheckMimeType2 = /* @__PURE__ */ $constructor2("$ZodCheckMimeType", (inst, def) => { - $ZodCheck2.init(inst, def); - const mimeSet = new Set(def.mime); - inst._zod.onattach.push((inst2) => { - inst2._zod.bag.mime = def.mime; +function nonoptional(innerType, params) { + return new ZodNonOptional({ + type: "nonoptional", + innerType, + ...util_exports.normalizeParams(params) }); - inst._zod.check = (payload) => { - if (mimeSet.has(payload.value.type)) - return; - payload.issues.push({ - code: "invalid_value", - values: def.mime, - input: payload.value.type, - inst, - continue: !def.abort - }); - }; +} +var ZodSuccess = /* @__PURE__ */ $constructor("ZodSuccess", (inst, def) => { + $ZodSuccess.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => successProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; }); -var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (inst, def) => { - $ZodCheck2.init(inst, def); +function success(innerType) { + return new ZodSuccess({ + type: "success", + innerType + }); +} +var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => { + $ZodCatch.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => catchProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch2(innerType, catchValue) { + return new ZodCatch({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +var ZodNaN = /* @__PURE__ */ $constructor("ZodNaN", (inst, def) => { + $ZodNaN.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nanProcessor(inst, ctx, json3, params); +}); +function nan(params) { + return _nan(ZodNaN, params); +} +var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => { + $ZodPipe.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => pipeProcessor(inst, ctx, json3, params); + inst.in = def.in; + inst.out = def.out; +}); +function pipe(in_, out) { + return new ZodPipe({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), + }); +} +var ZodCodec = /* @__PURE__ */ $constructor("ZodCodec", (inst, def) => { + ZodPipe.init(inst, def); + $ZodCodec.init(inst, def); +}); +function codec(in_, out, params) { + return new ZodCodec({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode + }); +} +var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => { + $ZodReadonly.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => readonlyProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function readonly(innerType) { + return new ZodReadonly({ + type: "readonly", + innerType + }); +} +var ZodTemplateLiteral = /* @__PURE__ */ $constructor("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => templateLiteralProcessor(inst, ctx, json3, params); +}); +function templateLiteral(parts, params) { + return new ZodTemplateLiteral({ + type: "template_literal", + parts, + ...util_exports.normalizeParams(params) + }); +} +var ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => { + $ZodLazy.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => lazyProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.getter(); +}); +function lazy(getter) { + return new ZodLazy({ + type: "lazy", + getter + }); +} +var ZodPromise = /* @__PURE__ */ $constructor("ZodPromise", (inst, def) => { + $ZodPromise.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => promiseProcessor(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function promise(innerType) { + return new ZodPromise({ + type: "promise", + innerType + }); +} +var ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => { + $ZodFunction.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => functionProcessor(inst, ctx, json3, params); +}); +function _function(params) { + return new ZodFunction({ + type: "function", + input: Array.isArray(params?.input) ? tuple(params?.input) : params?.input ?? array(unknown()), + output: params?.output ?? unknown() + }); +} +var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => { + $ZodCustom.init(inst, def); + ZodType.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => customProcessor(inst, ctx, json3, params); +}); +function check(fn) { + const ch = new $ZodCheck({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch._zod.check = fn; + return ch; +} +function custom(fn, _params) { + return _custom(ZodCustom, fn ?? (() => true), _params); +} +function refine(fn, _params = {}) { + return _refine(ZodCustom, fn, _params); +} +function superRefine(fn) { + return _superRefine(fn); +} +var describe2 = describe; +var meta2 = meta; +function _instanceof(cls, params = {}) { + const inst = new ZodCustom({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports.normalizeParams(params) + }); + inst._zod.bag.Class = cls; inst._zod.check = (payload) => { - payload.value = def.tx(payload.value); + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } }; -}); + return inst; +} +var stringbool = (...args) => _stringbool({ + Codec: ZodCodec, + Boolean: ZodBoolean, + String: ZodString +}, ...args); +function json(params) { + const jsonSchema = lazy(() => { + return union([string2(params), number2(), boolean2(), _null3(), array(jsonSchema), record(string2(), jsonSchema)]); + }); + return jsonSchema; +} +function preprocess(fn, schema) { + return pipe(transform(fn), schema); +} -// node_modules/zod/v4/core/doc.js -var Doc2 = class { - constructor(args = []) { - this.content = []; - this.indent = 0; - if (this) - this.args = args; +// node_modules/testing-farm/node_modules/zod/v4/classic/compat.js +var ZodIssueCode = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" +}; +function setErrorMap(map3) { + config({ + customError: map3 + }); +} +function getErrorMap() { + return config().customError; +} +var ZodFirstPartyTypeKind; +/* @__PURE__ */ (function(ZodFirstPartyTypeKind3) { +})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {})); + +// node_modules/testing-farm/node_modules/zod/v4/classic/from-json-schema.js +var z = { + ...schemas_exports2, + ...checks_exports2, + iso: iso_exports +}; +var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" +]); +function detectVersion(schema, defaultTarget) { + const $schema = schema.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; } - indented(fn) { - this.indent += 1; - fn(this); - this.indent -= 1; + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; } - write(arg) { - if (typeof arg === "function") { - arg(this, { execution: "sync" }); - arg(this, { execution: "async" }); - return; + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +function resolveRef(ref, ctx) { + if (!ref.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path = ref.slice(1).split("/").filter(Boolean); + if (path.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path[0] === defsKey) { + const key = path[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref}`); } - const content = arg; - const lines = content.split("\n").filter((x) => x); - const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); - const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); - for (const line of dedented) { - this.content.push(line); + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref}`); +} +function convertBaseSchema(schema, ctx) { + if (schema.not !== void 0) { + if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { + return z.never(); } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); } - compile() { - const F = Function; - const args = this?.args; - const content = this?.content ?? [``]; - const lines = [...content.map((x) => ` ${x}`)]; - return new F(...args, lines.join("\n")); + if (schema.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); } -}; - -// node_modules/zod/v4/core/versions.js -var version2 = { - major: 4, - minor: 4, - patch: 3 -}; - -// node_modules/zod/v4/core/schemas.js -var $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => { - var _a5; - inst ?? (inst = {}); - inst._zod.def = def; - inst._zod.bag = inst._zod.bag || {}; - inst._zod.version = version2; - const checks = [...inst._zod.def.checks ?? []]; - if (inst._zod.traits.has("$ZodCheck")) { - checks.unshift(inst); + if (schema.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); } - for (const ch of checks) { - for (const fn of ch._zod.onattach) { - fn(inst); - } + if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); } - if (checks.length === 0) { - (_a5 = inst._zod).deferred ?? (_a5.deferred = []); - inst._zod.deferred?.push(() => { - inst._zod.run = inst._zod.parse; - }); - } else { - const runChecks = (payload, checks2, ctx) => { - let isAborted = aborted2(payload); - let asyncResult; - for (const ch of checks2) { - if (ch._zod.def.when) { - if (explicitlyAborted(payload)) - continue; - const shouldRun = ch._zod.def.when(payload); - if (!shouldRun) - continue; - } else if (isAborted) { - continue; - } - const currLen = payload.issues.length; - const _ = ch._zod.check(payload); - if (_ instanceof Promise && ctx?.async === false) { - throw new $ZodAsyncError2(); + if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema.$ref) { + const refPath = schema.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); } - if (asyncResult || _ instanceof Promise) { - asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { - await _; - const nextLen = payload.issues.length; - if (nextLen === currLen) - return; - if (!isAborted) - isAborted = aborted2(payload, currLen); - }); - } else { - const nextLen = payload.issues.length; - if (nextLen === currLen) - continue; - if (!isAborted) - isAborted = aborted2(payload, currLen); + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef(refPath, ctx); + const zodSchema2 = convertSchema(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema.enum !== void 0) { + const enumValues = schema.enum; + if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { + return z.null(); + } + if (enumValues.length === 0) { + return z.never(); + } + if (enumValues.length === 1) { + return z.literal(enumValues[0]); + } + if (enumValues.every((v) => typeof v === "string")) { + return z.enum(enumValues); + } + const literalSchemas = enumValues.map((v) => z.literal(v)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema.const !== void 0) { + return z.literal(schema.const); + } + const type = schema.type; + if (Array.isArray(type)) { + const typeSchemas = type.map((t) => { + const typeSchema = { ...schema, type: t }; + return convertBaseSchema(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z.union(typeSchemas); + } + if (!type) { + return z.any(); + } + let zodSchema; + switch (type) { + case "string": { + let stringSchema = z.string(); + if (schema.format) { + const format2 = schema.format; + if (format2 === "email") { + stringSchema = stringSchema.check(z.email()); + } else if (format2 === "uri" || format2 === "uri-reference") { + stringSchema = stringSchema.check(z.url()); + } else if (format2 === "uuid" || format2 === "guid") { + stringSchema = stringSchema.check(z.uuid()); + } else if (format2 === "date-time") { + stringSchema = stringSchema.check(z.iso.datetime()); + } else if (format2 === "date") { + stringSchema = stringSchema.check(z.iso.date()); + } else if (format2 === "time") { + stringSchema = stringSchema.check(z.iso.time()); + } else if (format2 === "duration") { + stringSchema = stringSchema.check(z.iso.duration()); + } else if (format2 === "ipv4") { + stringSchema = stringSchema.check(z.ipv4()); + } else if (format2 === "ipv6") { + stringSchema = stringSchema.check(z.ipv6()); + } else if (format2 === "mac") { + stringSchema = stringSchema.check(z.mac()); + } else if (format2 === "cidr") { + stringSchema = stringSchema.check(z.cidrv4()); + } else if (format2 === "cidr-v6") { + stringSchema = stringSchema.check(z.cidrv6()); + } else if (format2 === "base64") { + stringSchema = stringSchema.check(z.base64()); + } else if (format2 === "base64url") { + stringSchema = stringSchema.check(z.base64url()); + } else if (format2 === "e164") { + stringSchema = stringSchema.check(z.e164()); + } else if (format2 === "jwt") { + stringSchema = stringSchema.check(z.jwt()); + } else if (format2 === "emoji") { + stringSchema = stringSchema.check(z.emoji()); + } else if (format2 === "nanoid") { + stringSchema = stringSchema.check(z.nanoid()); + } else if (format2 === "cuid") { + stringSchema = stringSchema.check(z.cuid()); + } else if (format2 === "cuid2") { + stringSchema = stringSchema.check(z.cuid2()); + } else if (format2 === "ulid") { + stringSchema = stringSchema.check(z.ulid()); + } else if (format2 === "xid") { + stringSchema = stringSchema.check(z.xid()); + } else if (format2 === "ksuid") { + stringSchema = stringSchema.check(z.ksuid()); } } - if (asyncResult) { - return asyncResult.then(() => { - return payload; - }); + if (typeof schema.minLength === "number") { + stringSchema = stringSchema.min(schema.minLength); } - return payload; - }; - const handleCanaryResult = (canary, payload, ctx) => { - if (aborted2(canary)) { - canary.aborted = true; - return canary; + if (typeof schema.maxLength === "number") { + stringSchema = stringSchema.max(schema.maxLength); } - const checkResult = runChecks(payload, checks, ctx); - if (checkResult instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError2(); - return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); + if (schema.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema.pattern)); } - return inst._zod.parse(checkResult, ctx); - }; - inst._zod.run = (payload, ctx) => { - if (ctx.skipChecks) { - return inst._zod.parse(payload, ctx); + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type === "integer" ? z.number().int() : z.number(); + if (typeof schema.minimum === "number") { + numberSchema = numberSchema.min(schema.minimum); } - if (ctx.direction === "backward") { - const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true }); - if (canary instanceof Promise) { - return canary.then((canary2) => { - return handleCanaryResult(canary2, payload, ctx); - }); - } - return handleCanaryResult(canary, payload, ctx); + if (typeof schema.maximum === "number") { + numberSchema = numberSchema.max(schema.maximum); } - const result = inst._zod.parse(payload, ctx); - if (result instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError2(); - return result.then((result2) => runChecks(result2, checks, ctx)); + if (typeof schema.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema.exclusiveMinimum); + } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { + numberSchema = numberSchema.gt(schema.minimum); } - return runChecks(result, checks, ctx); - }; - } - defineLazy2(inst, "~standard", () => ({ - validate: (value) => { - try { - const r = safeParse3(inst, value); - return r.success ? { value: r.data } : { issues: r.error?.issues }; - } catch (_) { - return safeParseAsync3(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); + if (typeof schema.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema.exclusiveMaximum); + } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { + numberSchema = numberSchema.lt(schema.maximum); } - }, - vendor: "zod", - version: 1 - })); -}); -var $ZodString2 = /* @__PURE__ */ $constructor2("$ZodString", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string4(inst._zod.bag); - inst._zod.parse = (payload, _) => { - if (def.coerce) - try { - payload.value = String(payload.value); - } catch (_2) { + if (typeof schema.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema.multipleOf); } - if (typeof payload.value === "string") - return payload; - payload.issues.push({ - expected: "string", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; -}); -var $ZodStringFormat2 = /* @__PURE__ */ $constructor2("$ZodStringFormat", (inst, def) => { - $ZodCheckStringFormat2.init(inst, def); - $ZodString2.init(inst, def); -}); -var $ZodGUID2 = /* @__PURE__ */ $constructor2("$ZodGUID", (inst, def) => { - def.pattern ?? (def.pattern = guid3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodUUID2 = /* @__PURE__ */ $constructor2("$ZodUUID", (inst, def) => { - if (def.version) { - const versionMap = { - v1: 1, - v2: 2, - v3: 3, - v4: 4, - v5: 5, - v6: 6, - v7: 7, - v8: 8 - }; - const v = versionMap[def.version]; - if (v === void 0) - throw new Error(`Invalid UUID version: "${def.version}"`); - def.pattern ?? (def.pattern = uuid3(v)); - } else - def.pattern ?? (def.pattern = uuid3()); - $ZodStringFormat2.init(inst, def); -}); -var $ZodEmail2 = /* @__PURE__ */ $constructor2("$ZodEmail", (inst, def) => { - def.pattern ?? (def.pattern = email3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodURL2 = /* @__PURE__ */ $constructor2("$ZodURL", (inst, def) => { - $ZodStringFormat2.init(inst, def); - inst._zod.check = (payload) => { - try { - const trimmed = payload.value.trim(); - if (!def.normalize && def.protocol?.source === httpProtocol.source) { - if (!/^https?:\/\//i.test(trimmed)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid URL format", - input: payload.value, - inst, - continue: !def.abort - }); - return; - } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z.boolean(); + break; + } + case "null": { + zodSchema = z.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema.properties || {}; + const requiredSet = new Set(schema.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); } - const url5 = new URL(trimmed); - if (def.hostname) { - def.hostname.lastIndex = 0; - if (!def.hostname.test(url5.hostname)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid hostname", - pattern: def.hostname.source, - input: payload.value, - inst, - continue: !def.abort - }); + if (schema.propertyNames) { + const keySchema = convertSchema(schema.propertyNames, ctx); + const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema(schema.additionalProperties, ctx) : z.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z.record(keySchema, valueSchema); + break; } + const objectSchema2 = z.object(shape).passthrough(); + const recordSchema = z.looseRecord(keySchema, valueSchema); + zodSchema = z.intersection(objectSchema2, recordSchema); + break; } - if (def.protocol) { - def.protocol.lastIndex = 0; - if (!def.protocol.test(url5.protocol.endsWith(":") ? url5.protocol.slice(0, -1) : url5.protocol)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid protocol", - pattern: def.protocol.source, - input: payload.value, - inst, - continue: !def.abort - }); + if (schema.patternProperties) { + const patternProps = schema.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema(patternProps[pattern], ctx); + const keySchema = z.string().regex(new RegExp(pattern)); + looseRecords.push(z.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i = 2; i < schemasToIntersect.length; i++) { + result = z.intersection(result, schemasToIntersect[i]); + } + zodSchema = result; } + break; } - if (def.normalize) { - payload.value = url5.href; + const objectSchema = z.object(shape); + if (schema.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx)); } else { - payload.value = trimmed; + zodSchema = objectSchema.passthrough(); } - return; - } catch (_) { - payload.issues.push({ - code: "invalid_format", - format: "url", - input: payload.value, - inst, - continue: !def.abort - }); + break; } - }; -}); -var $ZodEmoji2 = /* @__PURE__ */ $constructor2("$ZodEmoji", (inst, def) => { - def.pattern ?? (def.pattern = emoji3()); - $ZodStringFormat2.init(inst, def); -}); -var $ZodNanoID2 = /* @__PURE__ */ $constructor2("$ZodNanoID", (inst, def) => { - def.pattern ?? (def.pattern = nanoid3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodCUID3 = /* @__PURE__ */ $constructor2("$ZodCUID", (inst, def) => { - def.pattern ?? (def.pattern = cuid4); - $ZodStringFormat2.init(inst, def); -}); -var $ZodCUID22 = /* @__PURE__ */ $constructor2("$ZodCUID2", (inst, def) => { - def.pattern ?? (def.pattern = cuid23); - $ZodStringFormat2.init(inst, def); -}); -var $ZodULID2 = /* @__PURE__ */ $constructor2("$ZodULID", (inst, def) => { - def.pattern ?? (def.pattern = ulid3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodXID2 = /* @__PURE__ */ $constructor2("$ZodXID", (inst, def) => { - def.pattern ?? (def.pattern = xid3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodKSUID2 = /* @__PURE__ */ $constructor2("$ZodKSUID", (inst, def) => { - def.pattern ?? (def.pattern = ksuid3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodISODateTime2 = /* @__PURE__ */ $constructor2("$ZodISODateTime", (inst, def) => { - def.pattern ?? (def.pattern = datetime3(def)); - $ZodStringFormat2.init(inst, def); -}); -var $ZodISODate2 = /* @__PURE__ */ $constructor2("$ZodISODate", (inst, def) => { - def.pattern ?? (def.pattern = date5); - $ZodStringFormat2.init(inst, def); -}); -var $ZodISOTime2 = /* @__PURE__ */ $constructor2("$ZodISOTime", (inst, def) => { - def.pattern ?? (def.pattern = time3(def)); - $ZodStringFormat2.init(inst, def); -}); -var $ZodISODuration2 = /* @__PURE__ */ $constructor2("$ZodISODuration", (inst, def) => { - def.pattern ?? (def.pattern = duration3); - $ZodStringFormat2.init(inst, def); -}); -var $ZodIPv42 = /* @__PURE__ */ $constructor2("$ZodIPv4", (inst, def) => { - def.pattern ?? (def.pattern = ipv43); - $ZodStringFormat2.init(inst, def); - inst._zod.bag.format = `ipv4`; -}); -var $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => { - def.pattern ?? (def.pattern = ipv63); - $ZodStringFormat2.init(inst, def); - inst._zod.bag.format = `ipv6`; - inst._zod.check = (payload) => { - try { - new URL(`http://[${payload.value}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "ipv6", - input: payload.value, - inst, - continue: !def.abort - }); + case "array": { + const prefixItems = schema.prefixItems; + const items = schema.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema(items, ctx) : void 0; + if (rest) { + zodSchema = z.tuple(tupleItems).rest(rest); + } else { + zodSchema = z.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z.maxLength(schema.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema(item, ctx)); + const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema(schema.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z.tuple(tupleItems).rest(rest); + } else { + zodSchema = z.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z.maxLength(schema.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema(items, ctx); + let arraySchema = z.array(element); + if (typeof schema.minItems === "number") { + arraySchema = arraySchema.min(schema.minItems); + } + if (typeof schema.maxItems === "number") { + arraySchema = arraySchema.max(schema.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z.array(z.any()); + } + break; } - }; -}); -var $ZodMAC2 = /* @__PURE__ */ $constructor2("$ZodMAC", (inst, def) => { - def.pattern ?? (def.pattern = mac3(def.delimiter)); - $ZodStringFormat2.init(inst, def); - inst._zod.bag.format = `mac`; -}); -var $ZodCIDRv42 = /* @__PURE__ */ $constructor2("$ZodCIDRv4", (inst, def) => { - def.pattern ?? (def.pattern = cidrv43); - $ZodStringFormat2.init(inst, def); -}); -var $ZodCIDRv62 = /* @__PURE__ */ $constructor2("$ZodCIDRv6", (inst, def) => { - def.pattern ?? (def.pattern = cidrv63); - $ZodStringFormat2.init(inst, def); - inst._zod.check = (payload) => { - const parts = payload.value.split("/"); - try { - if (parts.length !== 2) - throw new Error(); - const [address, prefix] = parts; - if (!prefix) - throw new Error(); - const prefixNum = Number(prefix); - if (`${prefixNum}` !== prefix) - throw new Error(); - if (prefixNum < 0 || prefixNum > 128) - throw new Error(); - new URL(`http://[${address}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "cidrv6", - input: payload.value, - inst, - continue: !def.abort - }); + default: + throw new Error(`Unsupported type: ${type}`); + } + if (schema.description) { + zodSchema = zodSchema.describe(schema.description); + } + if (schema.default !== void 0) { + zodSchema = zodSchema.default(schema.default); + } + return zodSchema; +} +function convertSchema(schema, ctx) { + if (typeof schema === "boolean") { + return schema ? z.any() : z.never(); + } + let baseSchema = convertBaseSchema(schema, ctx); + const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; + if (schema.anyOf && Array.isArray(schema.anyOf)) { + const options = schema.anyOf.map((s) => convertSchema(s, ctx)); + const anyOfUnion = z.union(options); + baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema.oneOf && Array.isArray(schema.oneOf)) { + const options = schema.oneOf.map((s) => convertSchema(s, ctx)); + const oneOfUnion = z.xor(options); + baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema.allOf && Array.isArray(schema.allOf)) { + if (schema.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema(schema.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i = startIdx; i < schema.allOf.length; i++) { + result = z.intersection(result, convertSchema(schema.allOf[i], ctx)); + } + baseSchema = result; } - }; -}); -function isValidBase642(data) { - if (data === "") - return true; - if (/\s/.test(data)) - return false; - if (data.length % 4 !== 0) - return false; - try { - atob(data); - return true; - } catch { - return false; } + if (schema.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z.nullable(baseSchema); + } + if (schema.readOnly === true) { + baseSchema = z.readonly(baseSchema); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + for (const key of Object.keys(schema)) { + if (!RECOGNIZED_KEYS.has(key)) { + extraMeta[key] = schema[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + return baseSchema; } -var $ZodBase642 = /* @__PURE__ */ $constructor2("$ZodBase64", (inst, def) => { - def.pattern ?? (def.pattern = base643); - $ZodStringFormat2.init(inst, def); - inst._zod.bag.contentEncoding = "base64"; - inst._zod.check = (payload) => { - if (isValidBase642(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64", - input: payload.value, - inst, - continue: !def.abort - }); +function fromJSONSchema(schema, params) { + if (typeof schema === "boolean") { + return schema ? z.any() : z.never(); + } + const version3 = detectVersion(schema, params?.defaultTarget); + const defs = schema.$defs || schema.definitions || {}; + const ctx = { + version: version3, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: schema, + registry: params?.registry ?? globalRegistry }; + return convertSchema(schema, ctx); +} + +// node_modules/testing-farm/node_modules/zod/v4/classic/coerce.js +var coerce_exports = {}; +__export(coerce_exports, { + bigint: () => bigint3, + boolean: () => boolean3, + date: () => date4, + number: () => number3, + string: () => string3 }); -function isValidBase64URL2(data) { - if (!base64url3.test(data)) - return false; - const base646 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); - const padded = base646.padEnd(Math.ceil(base646.length / 4) * 4, "="); - return isValidBase642(padded); +function string3(params) { + return _coercedString(ZodString, params); } -var $ZodBase64URL2 = /* @__PURE__ */ $constructor2("$ZodBase64URL", (inst, def) => { - def.pattern ?? (def.pattern = base64url3); - $ZodStringFormat2.init(inst, def); - inst._zod.bag.contentEncoding = "base64url"; - inst._zod.check = (payload) => { - if (isValidBase64URL2(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64url", - input: payload.value, - inst, - continue: !def.abort - }); - }; +function number3(params) { + return _coercedNumber(ZodNumber, params); +} +function boolean3(params) { + return _coercedBoolean(ZodBoolean, params); +} +function bigint3(params) { + return _coercedBigint(ZodBigInt, params); +} +function date4(params) { + return _coercedDate(ZodDate, params); +} + +// node_modules/testing-farm/node_modules/zod/v4/classic/external.js +config(en_default()); + +// node_modules/testing-farm/dist/schema.js +var whoamiSchema = external_exports.object({ + token: external_exports.looseObject({ + enabled: external_exports.boolean(), + id: external_exports.string(), + name: external_exports.string(), + ranch: external_exports.union([external_exports.literal("public"), external_exports.literal("redhat")]), + role: external_exports.string(), + user_id: external_exports.string() + }), + user: external_exports.looseObject({ + auth_id: external_exports.string(), + auth_method: external_exports.string(), + auth_name: external_exports.string(), + enabled: external_exports.boolean(), + id: external_exports.string() + }) }); -var $ZodE1642 = /* @__PURE__ */ $constructor2("$ZodE164", (inst, def) => { - def.pattern ?? (def.pattern = e1643); - $ZodStringFormat2.init(inst, def); +var urlSchema = external_exports.url(); +var requestIdSchema = external_exports.string(); +var testObjectSchema = external_exports.object({ + fmf: external_exports.object({ + url: urlSchema, + ref: external_exports.string().min(1).optional(), + merge_sha: external_exports.string().min(1).optional().nullable(), + path: external_exports.string().min(1).optional(), + name: external_exports.string().min(1).optional(), + settings: external_exports.object({ + "recognize-errors": external_exports.boolean() + }).optional(), + plan_filter: external_exports.string().min(1).optional(), + test_name: external_exports.string().min(1).optional(), + test_filter: external_exports.string().min(1).optional() + }).optional(), + sti: external_exports.object({ + url: urlSchema, + ref: external_exports.string().min(1), + merge_sha: external_exports.string().min(1).optional(), + playbooks: external_exports.array(external_exports.string().min(1)).optional(), + extra_variables: external_exports.record(external_exports.string(), external_exports.string()).optional() + }).optional().nullable() }); -function isValidJWT2(token, algorithm = null) { - try { - const tokensParts = token.split("."); - if (tokensParts.length !== 3) - return false; - const [header] = tokensParts; - if (!header) - return false; - const parsedHeader = JSON.parse(atob(header)); - if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") - return false; - if (!parsedHeader.alg) - return false; - if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) - return false; - return true; - } catch { - return false; - } -} -var $ZodJWT2 = /* @__PURE__ */ $constructor2("$ZodJWT", (inst, def) => { - $ZodStringFormat2.init(inst, def); - inst._zod.check = (payload) => { - if (isValidJWT2(payload.value, def.alg)) - return; - payload.issues.push({ - code: "invalid_format", - format: "jwt", - input: payload.value, - inst, - continue: !def.abort - }); - }; +var environmentSchema = external_exports.object({ + arch: external_exports.string().min(1), + os: external_exports.object({ + compose: external_exports.string().min(1) + }).optional().nullable(), + pool: external_exports.string().min(1).optional().nullable(), + variables: external_exports.record(external_exports.string(), external_exports.string()).optional(), + secrets: external_exports.record(external_exports.string(), external_exports.string()).optional(), + artifacts: external_exports.array(external_exports.object({ + id: external_exports.string().min(1), + type: external_exports.string().min(1), + packages: external_exports.array(external_exports.string().min(1)).optional() + })).optional(), + hardware: external_exports.object({ + hostname: external_exports.string().min(1), + disk: external_exports.object({ + size: external_exports.string().min(1) + }) + }).optional().nullable(), + settings: external_exports.object({ + pipeline: external_exports.object({ + skip_guest_setup: external_exports.boolean().optional() + }).optional().nullable(), + provisioning: external_exports.object({ + post_install_script: external_exports.string().min(1).optional(), + tags: external_exports.record(external_exports.string(), external_exports.string()).optional() + }).optional().nullable() + }).optional(), + tmt: external_exports.object({ + // https://tmt.readthedocs.io/en/stable/spec/context.html#dimension + context: external_exports.looseObject({ + distro: external_exports.string().min(1).optional(), + variant: external_exports.string().min(1).optional(), + arch: external_exports.string().min(1).optional(), + component: external_exports.string().min(1).optional(), + collection: external_exports.string().min(1).optional(), + module: external_exports.string().min(1).optional(), + initiator: external_exports.string().min(1).optional(), + trigger: external_exports.string().min(1).optional() + }).optional().nullable() + }).optional(), + kickstart: external_exports.any().optional() }); -var $ZodCustomStringFormat2 = /* @__PURE__ */ $constructor2("$ZodCustomStringFormat", (inst, def) => { - $ZodStringFormat2.init(inst, def); - inst._zod.check = (payload) => { - if (def.fn(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: def.format, - input: payload.value, - inst, - continue: !def.abort - }); - }; +var notificationSchema = external_exports.object({ + webhook: external_exports.object({ + url: urlSchema, + token: external_exports.string().min(1).optional() + }).optional() }); -var $ZodNumber2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.pattern = inst._zod.bag.pattern ?? number4; - 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) ? "Infinity" : void 0 : void 0; - payload.issues.push({ - expected: "number", - code: "invalid_type", - input, - inst, - ...received ? { received } : {} - }); - return payload; - }; +var settingsSchema = external_exports.object({ + worker: external_exports.object({ + image: external_exports.string().min(1).optional() + }).optional(), + pipeline: external_exports.object({ + timeout: external_exports.number().min(1).optional(), + type: external_exports.enum(["tmt-multihost"]).optional(), + "provision-error-failed-result": external_exports.boolean().optional(), + "parallel-limit": external_exports.number().nonnegative().optional() + }).optional() }); -var $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumberFormat", (inst, def) => { - $ZodCheckNumberFormat2.init(inst, def); - $ZodNumber2.init(inst, def); +var requestsFilterSchema = external_exports.object({ + state: external_exports.string(), + user_id: external_exports.string(), + created_before: external_exports.string(), + created_after: external_exports.string() }); -var $ZodBoolean2 = /* @__PURE__ */ $constructor2("$ZodBoolean", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.pattern = boolean4; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Boolean(payload.value); - } catch (_) { - } - const input = payload.value; - if (typeof input === "boolean") - return payload; - payload.issues.push({ - expected: "boolean", - code: "invalid_type", - input, - inst - }); - return payload; - }; +var newRequestSchema = external_exports.object({ + api_key: external_exports.any().optional(), + test: testObjectSchema, + environments: external_exports.array(environmentSchema).optional(), + notification: notificationSchema.optional().nullable(), + settings: settingsSchema.optional().nullable() }); -var $ZodBigInt2 = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.pattern = bigint4; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = BigInt(payload.value); - } catch (_) { - } - if (typeof payload.value === "bigint") - return payload; - payload.issues.push({ - expected: "bigint", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; +var newRequestResponseSchema = external_exports.object({ + id: requestIdSchema, + created: external_exports.string().datetime() }); -var $ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodBigIntFormat", (inst, def) => { - $ZodCheckBigIntFormat2.init(inst, def); - $ZodBigInt2.init(inst, def); +var noteSchema = external_exports.object({ + level: external_exports.string(), + message: external_exports.string() }); -var $ZodSymbol2 = /* @__PURE__ */ $constructor2("$ZodSymbol", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "symbol") - return payload; - payload.issues.push({ - expected: "symbol", - code: "invalid_type", - input, - inst - }); - return payload; - }; +var requestSchema = external_exports.object({ + id: requestIdSchema, + user_id: external_exports.string(), + created: external_exports.string(), + updated: external_exports.string(), + environments_requested: external_exports.array(external_exports.object({ + arch: external_exports.string(), + artifacts: external_exports.any(), + hardware: external_exports.any(), + os: external_exports.object({ + compose: external_exports.string() + }), + pool: external_exports.union([external_exports.string(), external_exports.null()]), + settings: external_exports.object({ + pipeline: external_exports.any(), + provisioning: external_exports.any() + }), + tmt: external_exports.object({ + context: external_exports.looseObject({}).nullable() + }), + variables: external_exports.record(external_exports.string(), external_exports.string()) + })), + state: external_exports.string(), + notes: external_exports.array(noteSchema), + result: external_exports.object({ + summary: external_exports.union([external_exports.string(), external_exports.null()]), + overall: external_exports.string(), + xunit: external_exports.string().nullable().optional() + }), + run: external_exports.object({ + console: external_exports.union([urlSchema, external_exports.null()]), + stages: external_exports.union([ + external_exports.array(external_exports.object({ + name: external_exports.string(), + notes: external_exports.array(noteSchema), + result: external_exports.string(), + log: urlSchema + })), + external_exports.null() + ]), + artifacts: urlSchema + }), + settings: external_exports.any() }); -var $ZodUndefined2 = /* @__PURE__ */ $constructor2("$ZodUndefined", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.pattern = _undefined4; - inst._zod.values = /* @__PURE__ */ new Set([void 0]); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "undefined", - code: "invalid_type", - input, - inst - }); - return payload; - }; +var cancelRequestSchema = external_exports.object({ + api_key: external_exports.any().optional() }); -var $ZodNull2 = /* @__PURE__ */ $constructor2("$ZodNull", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.pattern = _null4; - inst._zod.values = /* @__PURE__ */ new Set([null]); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input === null) - return payload; - payload.issues.push({ - expected: "null", - code: "invalid_type", - input, - inst - }); - return payload; - }; +var cancelRequestResponseSchema = external_exports.object({ + id: requestIdSchema, + state: external_exports.string(), + created: external_exports.string(), + updated: external_exports.string() }); -var $ZodAny2 = /* @__PURE__ */ $constructor2("$ZodAny", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload) => payload; +var ranchSchema = external_exports.union([external_exports.literal("public"), external_exports.literal("redhat")]); +var composeSchema = external_exports.object({ + name: external_exports.string() }); -var $ZodUnknown2 = /* @__PURE__ */ $constructor2("$ZodUnknown", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload) => payload; +var composesSchema = external_exports.object({ + composes: external_exports.array(composeSchema) }); -var $ZodNever2 = /* @__PURE__ */ $constructor2("$ZodNever", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - payload.issues.push({ - expected: "never", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; +var aboutSchema = external_exports.object({ + version: external_exports.string(), + release_notes: external_exports.string() }); -var $ZodVoid2 = /* @__PURE__ */ $constructor2("$ZodVoid", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "void", - code: "invalid_type", - input, - inst - }); - return payload; - }; +var errorResponseSchema = external_exports.object({ + code: external_exports.number(), + message: external_exports.string() }); -var $ZodDate2 = /* @__PURE__ */ $constructor2("$ZodDate", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) { - try { - payload.value = new Date(payload.value); - } catch (_err) { - } + +// node_modules/testing-farm/dist/index.js +var TestingFarmAPI = class { + constructor(instance, apiKey) { + if (!apiKey) { + this.link = new PublicLink(new URL(instance)); + } else { + this.link = new ApiKeyLink(new URL(instance), apiKey); } - const input = payload.value; - const isDate3 = input instanceof Date; - const isValidDate = isDate3 && !Number.isNaN(input.getTime()); - if (isValidDate) - return payload; - payload.issues.push({ - expected: "date", - code: "invalid_type", - input, - ...isDate3 ? { received: "Invalid Date" } : {}, - inst - }); - return payload; - }; -}); -function handleArrayResult2(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues2(index, result.issues)); } - final.value[index] = result.value; -} -var $ZodArray2 = /* @__PURE__ */ $constructor2("$ZodArray", (inst, def) => { - $ZodType2.init(inst, def); - 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 = Array(input.length); - const proms = []; - 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((result2) => handleArrayResult2(result2, payload, i))); - } else { - handleArrayResult2(result, payload, i); - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); + async whoami(strict) { + if (!this.isStrict(strict)) { + return this.link.get("whoami"); } - return payload; - }; -}); -function handlePropertyResult2(result, final, key, input, isOptionalIn, isOptionalOut) { - const isPresent = key in input; - if (result.issues.length) { - if (isOptionalIn && isOptionalOut && !isPresent) { - return; + return whoamiSchema.parse(await this.link.get("whoami")); + } + async requests(filter2, strict) { + if (!this.isStrict(strict)) { + return this.link.get("requests", filter2); } - final.issues.push(...prefixIssues2(key, result.issues)); + return requestSchema.array().parse(await this.link.get("requests", filter2)); } - if (!isPresent && !isOptionalIn) { - if (!result.issues.length) { - final.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: void 0, - path: [key] - }); + async newRequest(request2, strict) { + const data = newRequestSchema.parse(request2); + if (!this.isStrict(strict)) { + return this.link.post("requests", data); } - return; + return newRequestResponseSchema.parse(await this.link.post("requests", data)); } - if (result.value === void 0) { - if (isPresent) { - final.value[key] = void 0; + async unsafeNewRequest(request2) { + return await this.link.post("requests", request2); + } + async requestDetails(requestId, strict) { + const id = requestIdSchema.parse(requestId); + if (!this.isStrict(strict)) { + return this.link.get(`requests/${id}`); } - } else { - final.value[key] = result.value; + return requestSchema.parse(await this.link.get(`requests/${id}`)); } -} -function normalizeDef2(def) { - const keys = Object.keys(def.shape); - for (const k of keys) { - if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { - throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + async cancelRequest(requestId, request2, strict) { + const id = requestIdSchema.parse(requestId); + const data = cancelRequestSchema.parse(request2); + if (!this.isStrict(strict)) { + return this.link.delete(`requests/${id}`, data); } + return cancelRequestResponseSchema.parse(await this.link.delete(`requests/${id}`, data)); } - const okeys = optionalKeys2(def.shape); - return { - ...def, - keys, - keySet: new Set(keys), - numKeys: keys.length, - optionalKeys: new Set(okeys) - }; -} -function handleCatchall2(proms, input, payload, ctx, def, inst) { - const unrecognized = []; - const keySet = def.keySet; - const _catchall = def.catchall._zod; - const t = _catchall.def.type; - const isOptionalIn = _catchall.optin === "optional"; - const isOptionalOut = _catchall.optout === "optional"; - for (const key in input) { - if (key === "__proto__") - continue; - if (keySet.has(key)) - continue; - if (t === "never") { - unrecognized.push(key); - continue; + async composes(strict) { + if (!this.isStrict(strict)) { + return this.link.get("composes"); } - const r = _catchall.run({ value: input[key], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((r2) => handlePropertyResult2(r2, payload, key, input, isOptionalIn, isOptionalOut))); - } else { - handlePropertyResult2(r, payload, key, input, isOptionalIn, isOptionalOut); + return composesSchema.parse(await this.link.get("composes")); + } + async ranchComposes(ranch, strict) { + const requestedRanch = ranchSchema.parse(ranch); + if (!this.isStrict(strict)) { + return this.link.get(`composes/${requestedRanch}`); } + return composesSchema.parse(await this.link.get(`composes/${requestedRanch}`)); } - if (unrecognized.length) { - payload.issues.push({ - code: "unrecognized_keys", - keys: unrecognized, - input, - inst - }); + async about(strict) { + if (!this.isStrict(strict)) { + return this.link.get("about"); + } + return aboutSchema.parse(await this.link.get("about")); } - if (!proms.length) - return payload; - return Promise.all(proms).then(() => { - return payload; - }); -} -var $ZodObject2 = /* @__PURE__ */ $constructor2("$ZodObject", (inst, def) => { - $ZodType2.init(inst, def); - const desc = Object.getOwnPropertyDescriptor(def, "shape"); - if (!desc?.get) { - const sh = def.shape; - Object.defineProperty(def, "shape", { - get: () => { - const newSh = { ...sh }; - Object.defineProperty(def, "shape", { - value: newSh - }); - return newSh; - } - }); + isStrict(strict) { + return strict === void 0 || strict; } - const _normalized = cached2(() => normalizeDef2(def)); - defineLazy2(inst._zod, "propValues", () => { - const shape = def.shape; - const propValues = {}; - for (const key in shape) { - const field = shape[key]._zod; - if (field.values) { - propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); - for (const v of field.values) - propValues[key].add(v); - } - } - return propValues; - }); - const isObject5 = isObject3; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject5(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst - }); - return payload; - } - payload.value = {}; - const proms = []; - const shape = value.shape; - for (const key of value.keys) { - const el = shape[key]; - const isOptionalIn = el._zod.optin === "optional"; - const isOptionalOut = el._zod.optout === "optional"; - const r = el._zod.run({ value: input[key], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((r2) => handlePropertyResult2(r2, payload, key, input, isOptionalIn, isOptionalOut))); - } else { - handlePropertyResult2(r, payload, key, input, isOptionalIn, isOptionalOut); - } - } - if (!catchall) { - return proms.length ? Promise.all(proms).then(() => payload) : payload; - } - return handleCatchall2(proms, input, payload, ctx, _normalized.value, inst); - }; -}); -var $ZodObjectJIT2 = /* @__PURE__ */ $constructor2("$ZodObjectJIT", (inst, def) => { - $ZodObject2.init(inst, def); - const superParse = inst._zod.parse; - const _normalized = cached2(() => normalizeDef2(def)); - const generateFastpass = (shape) => { - const doc = new Doc2(["shape", "payload", "ctx"]); - const normalized = _normalized.value; - const parseStr = (key) => { - const k = esc2(key); - return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; - }; - doc.write(`const input = payload.value;`); - const ids = /* @__PURE__ */ Object.create(null); - let counter = 0; - for (const key of normalized.keys) { - ids[key] = `key_${counter++}`; - } - doc.write(`const newResult = {};`); - for (const key of normalized.keys) { - const id = ids[key]; - const k = esc2(key); - const schema = shape[key]; - const isOptionalIn = schema?._zod?.optin === "optional"; - const isOptionalOut = schema?._zod?.optout === "optional"; - doc.write(`const ${id} = ${parseStr(key)};`); - if (isOptionalIn && isOptionalOut) { - doc.write(` - if (${id}.issues.length) { - if (${k} in input) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); - } - } - - if (${id}.value === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - newResult[${k}] = ${id}.value; - } - - `); - } else if (!isOptionalIn) { - doc.write(` - const ${id}_present = ${k} in input; - if (${id}.issues.length) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); - } - if (!${id}_present && !${id}.issues.length) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: undefined, - path: [${k}] - }); - } +}; - if (${id}_present) { - if (${id}.value === undefined) { - newResult[${k}] = undefined; - } else { - newResult[${k}] = ${id}.value; - } - } +// src/action.ts +import { setTimeout as setTimeout2 } from "timers/promises"; - `); - } else { - doc.write(` - if (${id}.issues.length) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); - } - - if (${id}.value === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - newResult[${k}] = ${id}.value; - } - - `); - } - } - doc.write(`payload.value = newResult;`); - doc.write(`return payload;`); - const fn = doc.compile(); - return (payload, ctx) => fn(shape, payload, ctx); - }; - let fastpass; - const isObject5 = isObject3; - const jit = !globalConfig2.jitless; - const allowsEval4 = allowsEval2; - const fastEnabled = jit && allowsEval4.value; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject5(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst - }); - return payload; - } - if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { - if (!fastpass) - fastpass = generateFastpass(def.shape); - payload = fastpass(payload, ctx); - if (!catchall) - return payload; - return handleCatchall2([], input, payload, ctx, value, inst); - } - return superParse(payload, ctx); - }; -}); -function handleUnionResults2(results, final, inst, ctx) { - for (const result of results) { - if (result.issues.length === 0) { - final.value = result.value; - return final; - } - } - const nonaborted = results.filter((r) => !aborted2(r)); - if (nonaborted.length === 1) { - final.value = nonaborted[0].value; - return nonaborted[0]; +// src/error.ts +var TFError = class extends Error { + constructor(message2, url4) { + super(message2); + this.url = url4; } - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) - }); - return final; +}; + +// src/state.ts +var isPost = !!getState("isPost"); +function setTfRequestId(requestId) { + saveState("requestId", requestId); } -var $ZodUnion2 = /* @__PURE__ */ $constructor2("$ZodUnion", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); - defineLazy2(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); - defineLazy2(inst._zod, "values", () => { - if (def.options.every((o) => o._zod.values)) { - return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); - } - return void 0; - }); - defineLazy2(inst._zod, "pattern", () => { - if (def.options.every((o) => o._zod.pattern)) { - const patterns = def.options.map((o) => o._zod.pattern); - return new RegExp(`^(${patterns.map((p) => cleanRegex2(p.source)).join("|")})$`); - } - return void 0; - }); - const first = def.options.length === 1 ? def.options[0]._zod.run : null; - inst._zod.parse = (payload, ctx) => { - if (first) { - return first(payload, ctx); - } - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - if (result.issues.length === 0) - return result; - results.push(result); - } - } - if (!async) - return handleUnionResults2(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleUnionResults2(results2, payload, inst, ctx); - }); - }; -}); -function handleExclusiveUnionResults2(results, final, inst, ctx) { - const successes = results.filter((r) => r.issues.length === 0); - if (successes.length === 1) { - final.value = successes[0].value; - return final; - } - if (successes.length === 0) { - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) - }); - } else { - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: [], - inclusive: false - }); - } - return final; +function getTfRequestId() { + return getState("requestId"); } -var $ZodXor2 = /* @__PURE__ */ $constructor2("$ZodXor", (inst, def) => { - $ZodUnion2.init(inst, def); - def.inclusive = false; - const first = def.options.length === 1 ? def.options[0]._zod.run : null; - inst._zod.parse = (payload, ctx) => { - if (first) { - return first(payload, ctx); - } - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - results.push(result); - } - } - if (!async) - return handleExclusiveUnionResults2(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleExclusiveUnionResults2(results2, payload, inst, ctx); - }); - }; -}); -var $ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor2("$ZodDiscriminatedUnion", (inst, def) => { - def.inclusive = false; - $ZodUnion2.init(inst, def); - const _super = inst._zod.parse; - defineLazy2(inst._zod, "propValues", () => { - const propValues = {}; - for (const option of def.options) { - const pv = option._zod.propValues; - if (!pv || Object.keys(pv).length === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); - for (const [k, v] of Object.entries(pv)) { - if (!propValues[k]) - propValues[k] = /* @__PURE__ */ new Set(); - for (const val of v) { - propValues[k].add(val); - } - } - } - return propValues; - }); - const disc = cached2(() => { - const opts = def.options; - const map4 = /* @__PURE__ */ new Map(); - for (const o of opts) { - const values = o._zod.propValues?.[def.discriminator]; - if (!values || values.size === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); - for (const v of values) { - if (map4.has(v)) { - throw new Error(`Duplicate discriminator value "${String(v)}"`); - } - map4.set(v, o); - } - } - return map4; - }); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isObject3(input)) { - payload.issues.push({ - code: "invalid_type", - expected: "object", - input, - inst - }); - return payload; - } - const opt = disc.value.get(input?.[def.discriminator]); - if (opt) { - return opt._zod.run(payload, ctx); - } - if (def.unionFallback || ctx.direction === "backward") { - return _super(payload, ctx); - } - payload.issues.push({ - code: "invalid_union", - errors: [], - note: "No matching discriminator", - discriminator: def.discriminator, - options: Array.from(disc.value.keys()), - input, - path: [def.discriminator], - inst - }); - return payload; - }; -}); -var $ZodIntersection2 = /* @__PURE__ */ $constructor2("$ZodIntersection", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - const left = def.left._zod.run({ value: input, issues: [] }, ctx); - const right = def.right._zod.run({ value: input, issues: [] }, ctx); - const async = left instanceof Promise || right instanceof Promise; - if (async) { - return Promise.all([left, right]).then(([left2, right2]) => { - return handleIntersectionResults2(payload, left2, right2); - }); - } - return handleIntersectionResults2(payload, left, right); - }; -}); -function mergeValues2(a, b) { - if (a === b) { - return { valid: true, data: a }; - } - if (a instanceof Date && b instanceof Date && +a === +b) { - return { valid: true, data: a }; - } - if (isPlainObject3(a) && isPlainObject3(b)) { - const bKeys = Object.keys(b); - const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues2(a[key], b[key]); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [key, ...sharedValue.mergeErrorPath] - }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return { valid: false, mergeErrorPath: [] }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues2(itemA, itemB); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [index, ...sharedValue.mergeErrorPath] - }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; +function setTfArtifactUrl(requestUrl) { + saveState("artifactUrl", requestUrl); +} +function getTfArtifactUrl() { + return getState("artifactUrl"); +} +if (!isPost) { + saveState("isPost", "true"); +} + +// node_modules/date-fns/constants.js +var daysInYear = 365.2425; +var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3; +var minTime = -maxTime; +var millisecondsInWeek = 6048e5; +var millisecondsInDay = 864e5; +var secondsInHour = 3600; +var secondsInDay = secondsInHour * 24; +var secondsInWeek = secondsInDay * 7; +var secondsInYear = secondsInDay * daysInYear; +var secondsInMonth = secondsInYear / 12; +var secondsInQuarter = secondsInMonth * 3; +var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom"); + +// node_modules/date-fns/constructFrom.js +function constructFrom(date9, value) { + if (typeof date9 === "function") return date9(value); + if (date9 && typeof date9 === "object" && constructFromSymbol in date9) + return date9[constructFromSymbol](value); + if (date9 instanceof Date) return new date9.constructor(value); + return new Date(value); +} + +// node_modules/date-fns/toDate.js +function toDate(argument, context3) { + return constructFrom(context3 || argument, argument); +} + +// node_modules/date-fns/_lib/defaultOptions.js +var defaultOptions = {}; +function getDefaultOptions() { + return defaultOptions; +} + +// node_modules/date-fns/startOfWeek.js +function startOfWeek(date9, options) { + const defaultOptions2 = getDefaultOptions(); + const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0; + const _date3 = toDate(date9, options?.in); + const day = _date3.getDay(); + const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + _date3.setDate(_date3.getDate() - diff); + _date3.setHours(0, 0, 0, 0); + return _date3; +} + +// node_modules/date-fns/startOfISOWeek.js +function startOfISOWeek(date9, options) { + return startOfWeek(date9, { ...options, weekStartsOn: 1 }); +} + +// node_modules/date-fns/getISOWeekYear.js +function getISOWeekYear(date9, options) { + const _date3 = toDate(date9, options?.in); + const year = _date3.getFullYear(); + const fourthOfJanuaryOfNextYear = constructFrom(_date3, 0); + fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); + fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); + const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear); + const fourthOfJanuaryOfThisYear = constructFrom(_date3, 0); + fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); + fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); + const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear); + if (_date3.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (_date3.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; } - return { valid: false, mergeErrorPath: [] }; } -function handleIntersectionResults2(result, left, right) { - const unrecKeys = /* @__PURE__ */ new Map(); - let unrecIssue; - for (const iss of left.issues) { - if (iss.code === "unrecognized_keys") { - unrecIssue ?? (unrecIssue = iss); - for (const k of iss.keys) { - if (!unrecKeys.has(k)) - unrecKeys.set(k, {}); - unrecKeys.get(k).l = true; - } - } else { - result.issues.push(iss); - } + +// node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +function getTimezoneOffsetInMilliseconds(date9) { + const _date3 = toDate(date9); + const utcDate = new Date( + Date.UTC( + _date3.getFullYear(), + _date3.getMonth(), + _date3.getDate(), + _date3.getHours(), + _date3.getMinutes(), + _date3.getSeconds(), + _date3.getMilliseconds() + ) + ); + utcDate.setUTCFullYear(_date3.getFullYear()); + return +date9 - +utcDate; +} + +// node_modules/date-fns/_lib/normalizeDates.js +function normalizeDates(context3, ...dates) { + const normalize = constructFrom.bind( + null, + context3 || dates.find((date9) => typeof date9 === "object") + ); + return dates.map(normalize); +} + +// node_modules/date-fns/startOfDay.js +function startOfDay(date9, options) { + const _date3 = toDate(date9, options?.in); + _date3.setHours(0, 0, 0, 0); + return _date3; +} + +// node_modules/date-fns/differenceInCalendarDays.js +function differenceInCalendarDays(laterDate, earlierDate, options) { + const [laterDate_, earlierDate_] = normalizeDates( + options?.in, + laterDate, + earlierDate + ); + const laterStartOfDay = startOfDay(laterDate_); + const earlierStartOfDay = startOfDay(earlierDate_); + const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay); + const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay); + return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay); +} + +// node_modules/date-fns/startOfISOWeekYear.js +function startOfISOWeekYear(date9, options) { + const year = getISOWeekYear(date9, options); + const fourthOfJanuary = constructFrom(options?.in || date9, 0); + fourthOfJanuary.setFullYear(year, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + return startOfISOWeek(fourthOfJanuary); +} + +// node_modules/date-fns/isDate.js +function isDate2(value) { + return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]"; +} + +// node_modules/date-fns/isValid.js +function isValid(date9) { + return !(!isDate2(date9) && typeof date9 !== "number" || isNaN(+toDate(date9))); +} + +// node_modules/date-fns/startOfYear.js +function startOfYear(date9, options) { + const date_ = toDate(date9, options?.in); + date_.setFullYear(date_.getFullYear(), 0, 1); + date_.setHours(0, 0, 0, 0); + return date_; +} + +// node_modules/date-fns/locale/en-US/_lib/formatDistance.js +var formatDistanceLocale = { + lessThanXSeconds: { + one: "less than a second", + other: "less than {{count}} seconds" + }, + xSeconds: { + one: "1 second", + other: "{{count}} seconds" + }, + halfAMinute: "half a minute", + lessThanXMinutes: { + one: "less than a minute", + other: "less than {{count}} minutes" + }, + xMinutes: { + one: "1 minute", + other: "{{count}} minutes" + }, + aboutXHours: { + one: "about 1 hour", + other: "about {{count}} hours" + }, + xHours: { + one: "1 hour", + other: "{{count}} hours" + }, + xDays: { + one: "1 day", + other: "{{count}} days" + }, + aboutXWeeks: { + one: "about 1 week", + other: "about {{count}} weeks" + }, + xWeeks: { + one: "1 week", + other: "{{count}} weeks" + }, + aboutXMonths: { + one: "about 1 month", + other: "about {{count}} months" + }, + xMonths: { + one: "1 month", + other: "{{count}} months" + }, + aboutXYears: { + one: "about 1 year", + other: "about {{count}} years" + }, + xYears: { + one: "1 year", + other: "{{count}} years" + }, + overXYears: { + one: "over 1 year", + other: "over {{count}} years" + }, + almostXYears: { + one: "almost 1 year", + other: "almost {{count}} years" } - for (const iss of right.issues) { - if (iss.code === "unrecognized_keys") { - for (const k of iss.keys) { - if (!unrecKeys.has(k)) - unrecKeys.set(k, {}); - unrecKeys.get(k).r = true; - } +}; +var formatDistance = (token, count, options) => { + let result; + const tokenValue = formatDistanceLocale[token]; + if (typeof tokenValue === "string") { + result = tokenValue; + } else if (count === 1) { + result = tokenValue.one; + } else { + result = tokenValue.other.replace("{{count}}", count.toString()); + } + if (options?.addSuffix) { + if (options.comparison && options.comparison > 0) { + return "in " + result; } else { - result.issues.push(iss); + return result + " ago"; } } - const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); - if (bothKeys.length && unrecIssue) { - result.issues.push({ ...unrecIssue, keys: bothKeys }); - } - if (aborted2(result)) - return result; - const merged = mergeValues2(left.value, right.value); - if (!merged.valid) { - throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); - } - result.value = merged.data; return result; -} -var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => { - $ZodType2.init(inst, def); - const items = def.items; - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - input, - inst, - expected: "tuple", - code: "invalid_type" - }); - return payload; - } - payload.value = []; - const proms = []; - const optinStart = getTupleOptStart(items, "optin"); - const optoutStart = getTupleOptStart(items, "optout"); - if (!def.rest) { - if (input.length < optinStart) { - payload.issues.push({ - code: "too_small", - minimum: optinStart, - inclusive: true, - input, - inst, - origin: "array" - }); - return payload; - } - if (input.length > items.length) { - payload.issues.push({ - code: "too_big", - maximum: items.length, - inclusive: true, - input, - inst, - origin: "array" - }); - } - } - const itemResults = new Array(items.length); - for (let i = 0; i < items.length; i++) { - const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((rr) => { - itemResults[i] = rr; - })); - } else { - itemResults[i] = r; - } - } - if (def.rest) { - let i = items.length - 1; - const rest = input.slice(items.length); - for (const el of rest) { - i++; - const result = def.rest._zod.run({ value: el, issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((r) => handleTupleResult2(r, payload, i))); - } else { - handleTupleResult2(result, payload, i); - } - } - } - if (proms.length) { - return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart)); - } - return handleTupleResults(itemResults, payload, items, input, optoutStart); +}; + +// node_modules/date-fns/locale/_lib/buildFormatLongFn.js +function buildFormatLongFn(args) { + return (options = {}) => { + const width = options.width ? String(options.width) : args.defaultWidth; + const format2 = args.formats[width] || args.formats[args.defaultWidth]; + return format2; }; -}); -function getTupleOptStart(items, key) { - for (let i = items.length - 1; i >= 0; i--) { - if (items[i]._zod[key] !== "optional") - return i + 1; - } - return 0; -} -function handleTupleResult2(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues2(index, result.issues)); - } - final.value[index] = result.value; } -function handleTupleResults(itemResults, final, items, input, optoutStart) { - for (let i = 0; i < items.length; i++) { - const r = itemResults[i]; - const isPresent = i < input.length; - if (r.issues.length) { - if (!isPresent && i >= optoutStart) { - final.value.length = i; - break; - } - final.issues.push(...prefixIssues2(i, r.issues)); - } - final.value[i] = r.value; - } - for (let i = final.value.length - 1; i >= input.length; i--) { - if (items[i]._zod.optout === "optional" && final.value[i] === void 0) { - final.value.length = i; + +// node_modules/date-fns/locale/en-US/_lib/formatLong.js +var dateFormats = { + full: "EEEE, MMMM do, y", + long: "MMMM do, y", + medium: "MMM d, y", + short: "MM/dd/yyyy" +}; +var timeFormats = { + full: "h:mm:ss a zzzz", + long: "h:mm:ss a z", + medium: "h:mm:ss a", + short: "h:mm a" +}; +var dateTimeFormats = { + full: "{{date}} 'at' {{time}}", + long: "{{date}} 'at' {{time}}", + medium: "{{date}}, {{time}}", + short: "{{date}}, {{time}}" +}; +var formatLong = { + date: buildFormatLongFn({ + formats: dateFormats, + defaultWidth: "full" + }), + time: buildFormatLongFn({ + formats: timeFormats, + defaultWidth: "full" + }), + dateTime: buildFormatLongFn({ + formats: dateTimeFormats, + defaultWidth: "full" + }) +}; + +// node_modules/date-fns/locale/en-US/_lib/formatRelative.js +var formatRelativeLocale = { + lastWeek: "'last' eeee 'at' p", + yesterday: "'yesterday at' p", + today: "'today at' p", + tomorrow: "'tomorrow at' p", + nextWeek: "eeee 'at' p", + other: "P" +}; +var formatRelative = (token, _date3, _baseDate, _options) => formatRelativeLocale[token]; + +// node_modules/date-fns/locale/_lib/buildLocalizeFn.js +function buildLocalizeFn(args) { + return (value, options) => { + const context3 = options?.context ? String(options.context) : "standalone"; + let valuesArray; + if (context3 === "formatting" && args.formattingValues) { + const defaultWidth = args.defaultFormattingWidth || args.defaultWidth; + const width = options?.width ? String(options.width) : defaultWidth; + valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; } else { - break; + const defaultWidth = args.defaultWidth; + const width = options?.width ? String(options.width) : args.defaultWidth; + valuesArray = args.values[width] || args.values[defaultWidth]; } - } - return final; + const index = args.argumentCallback ? args.argumentCallback(value) : value; + return valuesArray[index]; + }; } -var $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isPlainObject3(input)) { - payload.issues.push({ - expected: "record", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - const values = def.keyType._zod.values; - if (values) { - payload.value = {}; - const recordKeys = /* @__PURE__ */ new Set(); - for (const key of values) { - if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { - recordKeys.add(typeof key === "number" ? key.toString() : key); - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - if (keyResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - if (keyResult.issues.length) { - payload.issues.push({ - code: "invalid_key", - origin: "record", - issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())), - input: key, - path: [key], - inst - }); - continue; - } - const outKey = keyResult.value; - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues2(key, result2.issues)); - } - payload.value[outKey] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues2(key, result.issues)); - } - payload.value[outKey] = result.value; - } - } - } - let unrecognized; - for (const key in input) { - if (!recordKeys.has(key)) { - unrecognized = unrecognized ?? []; - unrecognized.push(key); - } - } - if (unrecognized && unrecognized.length > 0) { - payload.issues.push({ - code: "unrecognized_keys", - input, - inst, - keys: unrecognized - }); - } - } else { - payload.value = {}; - for (const key of Reflect.ownKeys(input)) { - if (key === "__proto__") - continue; - if (!Object.prototype.propertyIsEnumerable.call(input, key)) - continue; - let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - if (keyResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - const checkNumericKey = typeof key === "string" && number4.test(key) && keyResult.issues.length; - if (checkNumericKey) { - const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); - if (retryResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - if (retryResult.issues.length === 0) { - keyResult = retryResult; - } - } - if (keyResult.issues.length) { - if (def.mode === "loose") { - payload.value[key] = input[key]; - } else { - payload.issues.push({ - code: "invalid_key", - origin: "record", - issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())), - input: key, - path: [key], - inst - }); - } - continue; - } - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues2(key, result2.issues)); - } - payload.value[keyResult.value] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues2(key, result.issues)); - } - payload.value[keyResult.value] = result.value; - } - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; -}); -var $ZodMap2 = /* @__PURE__ */ $constructor2("$ZodMap", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Map)) { - payload.issues.push({ - expected: "map", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - payload.value = /* @__PURE__ */ new Map(); - for (const [key, value] of input) { - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); - if (keyResult instanceof Promise || valueResult instanceof Promise) { - proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { - handleMapResult2(keyResult2, valueResult2, payload, key, input, inst, ctx); - })); - } else { - handleMapResult2(keyResult, valueResult, payload, key, input, inst, ctx); - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleMapResult2(keyResult, valueResult, final, key, input, inst, ctx) { - if (keyResult.issues.length) { - if (propertyKeyTypes2.has(typeof key)) { - final.issues.push(...prefixIssues2(key, keyResult.issues)); - } else { - final.issues.push({ - code: "invalid_key", - origin: "map", - input, - inst, - issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) - }); - } + +// node_modules/date-fns/locale/en-US/_lib/localize.js +var eraValues = { + narrow: ["B", "A"], + abbreviated: ["BC", "AD"], + wide: ["Before Christ", "Anno Domini"] +}; +var quarterValues = { + narrow: ["1", "2", "3", "4"], + abbreviated: ["Q1", "Q2", "Q3", "Q4"], + wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] +}; +var monthValues = { + narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], + abbreviated: [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + wide: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] +}; +var dayValues = { + narrow: ["S", "M", "T", "W", "T", "F", "S"], + short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + wide: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] +}; +var dayPeriodValues = { + narrow: { + am: "a", + pm: "p", + midnight: "mi", + noon: "n", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + }, + abbreviated: { + am: "AM", + pm: "PM", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + }, + wide: { + am: "a.m.", + pm: "p.m.", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" } - if (valueResult.issues.length) { - if (propertyKeyTypes2.has(typeof key)) { - final.issues.push(...prefixIssues2(key, valueResult.issues)); - } else { - final.issues.push({ - origin: "map", - code: "invalid_element", - input, - inst, - key, - issues: valueResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) - }); - } +}; +var formattingDayPeriodValues = { + narrow: { + am: "a", + pm: "p", + midnight: "mi", + noon: "n", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + }, + abbreviated: { + am: "AM", + pm: "PM", + midnight: "midnight", + noon: "noon", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + }, + wide: { + am: "a.m.", + pm: "p.m.", + midnight: "midnight", + noon: "noon", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" } - final.value.set(keyResult.value, valueResult.value); -} -var $ZodSet2 = /* @__PURE__ */ $constructor2("$ZodSet", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Set)) { - payload.issues.push({ - input, - inst, - expected: "set", - code: "invalid_type" - }); - return payload; +}; +var ordinalNumber = (dirtyNumber, _options) => { + const number7 = Number(dirtyNumber); + const rem100 = number7 % 100; + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number7 + "st"; + case 2: + return number7 + "nd"; + case 3: + return number7 + "rd"; } - const proms = []; - payload.value = /* @__PURE__ */ new Set(); - for (const item of input) { - const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleSetResult2(result2, payload))); - } else - handleSetResult2(result, payload); + } + return number7 + "th"; +}; +var localize = { + ordinalNumber, + era: buildLocalizeFn({ + values: eraValues, + defaultWidth: "wide" + }), + quarter: buildLocalizeFn({ + values: quarterValues, + defaultWidth: "wide", + argumentCallback: (quarter) => quarter - 1 + }), + month: buildLocalizeFn({ + values: monthValues, + defaultWidth: "wide" + }), + day: buildLocalizeFn({ + values: dayValues, + defaultWidth: "wide" + }), + dayPeriod: buildLocalizeFn({ + values: dayPeriodValues, + defaultWidth: "wide", + formattingValues: formattingDayPeriodValues, + defaultFormattingWidth: "wide" + }) +}; + +// node_modules/date-fns/locale/_lib/buildMatchFn.js +function buildMatchFn(args) { + return (string7, options = {}) => { + const width = options.width; + const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth]; + const matchResult = string7.match(matchPattern); + if (!matchResult) { + return null; } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; + const matchedString = matchResult[0]; + const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth]; + const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : ( + // [TODO] -- I challenge you to fix the type + findKey2(parsePatterns, (pattern) => pattern.test(matchedString)) + ); + let value; + value = args.valueCallback ? args.valueCallback(key) : key; + value = options.valueCallback ? ( + // [TODO] -- I challenge you to fix the type + options.valueCallback(value) + ) : value; + const rest = string7.slice(matchedString.length); + return { value, rest }; }; -}); -function handleSetResult2(result, final) { - if (result.issues.length) { - final.issues.push(...result.issues); - } - final.value.add(result.value); } -var $ZodEnum2 = /* @__PURE__ */ $constructor2("$ZodEnum", (inst, def) => { - $ZodType2.init(inst, def); - const values = getEnumValues2(def.entries); - const valuesSet = new Set(values); - inst._zod.values = valuesSet; - inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes2.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex2(o) : o.toString()).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (valuesSet.has(input)) { - return payload; +function findKey2(object3, predicate) { + for (const key in object3) { + if (Object.prototype.hasOwnProperty.call(object3, key) && predicate(object3[key])) { + return key; } - payload.issues.push({ - code: "invalid_value", - values, - input, - inst - }); - return payload; - }; -}); -var $ZodLiteral2 = /* @__PURE__ */ $constructor2("$ZodLiteral", (inst, def) => { - $ZodType2.init(inst, def); - if (def.values.length === 0) { - throw new Error("Cannot create literal schema with no valid values"); } - const values = new Set(def.values); - inst._zod.values = values; - inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex2(o) : o ? escapeRegex2(o.toString()) : String(o)).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (values.has(input)) { - return payload; - } - payload.issues.push({ - code: "invalid_value", - values: def.values, - input, - inst - }); - return payload; - }; -}); -var $ZodFile2 = /* @__PURE__ */ $constructor2("$ZodFile", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input instanceof File) - return payload; - payload.issues.push({ - expected: "file", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodTransform2 = /* @__PURE__ */ $constructor2("$ZodTransform", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.optin = "optional"; - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - throw new $ZodEncodeError2(inst.constructor.name); - } - const _out = def.transform(payload.value, payload); - if (ctx.async) { - const output = _out instanceof Promise ? _out : Promise.resolve(_out); - return output.then((output2) => { - payload.value = output2; - payload.fallback = true; - return payload; - }); - } - if (_out instanceof Promise) { - throw new $ZodAsyncError2(); + return void 0; +} +function findIndex(array3, predicate) { + for (let key = 0; key < array3.length; key++) { + if (predicate(array3[key])) { + return key; } - payload.value = _out; - payload.fallback = true; - return payload; - }; -}); -function handleOptionalResult2(result, input) { - if (input === void 0 && (result.issues.length || result.fallback)) { - return { issues: [], value: void 0 }; } - return result; + return void 0; } -var $ZodOptional2 = /* @__PURE__ */ $constructor2("$ZodOptional", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - defineLazy2(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; - }); - defineLazy2(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex2(pattern.source)})?$`) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - if (def.innerType._zod.optin === "optional") { - const input = payload.value; - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) - return result.then((r) => handleOptionalResult2(r, input)); - return handleOptionalResult2(result, input); - } - if (payload.value === void 0) { - return payload; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodExactOptional2 = /* @__PURE__ */ $constructor2("$ZodExactOptional", (inst, def) => { - $ZodOptional2.init(inst, def); - defineLazy2(inst._zod, "values", () => def.innerType._zod.values); - defineLazy2(inst._zod, "pattern", () => def.innerType._zod.pattern); - inst._zod.parse = (payload, ctx) => { - return def.innerType._zod.run(payload, ctx); + +// node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +function buildMatchPatternFn(args) { + return (string7, options = {}) => { + const matchResult = string7.match(args.matchPattern); + if (!matchResult) return null; + const matchedString = matchResult[0]; + const parseResult = string7.match(args.parsePattern); + if (!parseResult) return null; + let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; + value = options.valueCallback ? options.valueCallback(value) : value; + const rest = string7.slice(matchedString.length); + return { value, rest }; }; -}); -var $ZodNullable2 = /* @__PURE__ */ $constructor2("$ZodNullable", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy2(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex2(pattern.source)}|null)$`) : void 0; - }); - defineLazy2(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...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); - }; -}); -var $ZodDefault2 = /* @__PURE__ */ $constructor2("$ZodDefault", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.optin = "optional"; - defineLazy2(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - payload.value = def.defaultValue; - return payload; - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleDefaultResult2(result2, def)); - } - return handleDefaultResult2(result, def); - }; -}); -function handleDefaultResult2(payload, def) { - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return payload; } -var $ZodPrefault2 = /* @__PURE__ */ $constructor2("$ZodPrefault", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.optin = "optional"; - defineLazy2(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodNonOptional2 = /* @__PURE__ */ $constructor2("$ZodNonOptional", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "values", () => { - const v = def.innerType._zod.values; - return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleNonOptionalResult2(result2, inst)); - } - return handleNonOptionalResult2(result, inst); - }; -}); -function handleNonOptionalResult2(payload, inst) { - if (!payload.issues.length && payload.value === void 0) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: payload.value, - inst - }); + +// node_modules/date-fns/locale/en-US/_lib/match.js +var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; +var parseOrdinalNumberPattern = /\d+/i; +var matchEraPatterns = { + narrow: /^(b|a)/i, + abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, + wide: /^(before christ|before common era|anno domini|common era)/i +}; +var parseEraPatterns = { + any: [/^b/i, /^(a|c)/i] +}; +var matchQuarterPatterns = { + narrow: /^[1234]/i, + abbreviated: /^q[1234]/i, + wide: /^[1234](th|st|nd|rd)? quarter/i +}; +var parseQuarterPatterns = { + any: [/1/i, /2/i, /3/i, /4/i] +}; +var matchMonthPatterns = { + narrow: /^[jfmasond]/i, + abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, + wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i +}; +var parseMonthPatterns = { + narrow: [ + /^j/i, + /^f/i, + /^m/i, + /^a/i, + /^m/i, + /^j/i, + /^j/i, + /^a/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ], + any: [ + /^ja/i, + /^f/i, + /^mar/i, + /^ap/i, + /^may/i, + /^jun/i, + /^jul/i, + /^au/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ] +}; +var matchDayPatterns = { + narrow: /^[smtwf]/i, + short: /^(su|mo|tu|we|th|fr|sa)/i, + abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, + wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i +}; +var parseDayPatterns = { + narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], + any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] +}; +var matchDayPeriodPatterns = { + narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, + any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i +}; +var parseDayPeriodPatterns = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^mi/i, + noon: /^no/i, + morning: /morning/i, + afternoon: /afternoon/i, + evening: /evening/i, + night: /night/i } - return payload; -} -var $ZodSuccess2 = /* @__PURE__ */ $constructor2("$ZodSuccess", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - throw new $ZodEncodeError2("ZodSuccess"); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.issues.length === 0; - return payload; - }); - } - payload.value = result.issues.length === 0; - return payload; - }; -}); -var $ZodCatch2 = /* @__PURE__ */ $constructor2("$ZodCatch", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.optin = "optional"; - defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy2(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.value; - if (result2.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result2.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) - }, - input: payload.value - }); - payload.issues = []; - payload.fallback = true; - } - return payload; - }); - } - payload.value = result.value; - if (result.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) - }, - input: payload.value - }); - payload.issues = []; - payload.fallback = true; - } - return payload; - }; -}); -var $ZodNaN2 = /* @__PURE__ */ $constructor2("$ZodNaN", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - expected: "nan", - code: "invalid_type" - }); - return payload; - } - return payload; - }; -}); -var $ZodPipe2 = /* @__PURE__ */ $constructor2("$ZodPipe", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "values", () => def.in._zod.values); - defineLazy2(inst._zod, "optin", () => def.in._zod.optin); - defineLazy2(inst._zod, "optout", () => def.out._zod.optout); - defineLazy2(inst._zod, "propValues", () => def.in._zod.propValues); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - const right = def.out._zod.run(payload, ctx); - if (right instanceof Promise) { - return right.then((right2) => handlePipeResult2(right2, def.in, ctx)); - } - return handlePipeResult2(right, def.in, ctx); - } - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handlePipeResult2(left2, def.out, ctx)); - } - return handlePipeResult2(left, def.out, ctx); - }; -}); -function handlePipeResult2(left, next, ctx) { - if (left.issues.length) { - left.aborted = true; - return left; +}; +var match = { + ordinalNumber: buildMatchPatternFn({ + matchPattern: matchOrdinalNumberPattern, + parsePattern: parseOrdinalNumberPattern, + valueCallback: (value) => parseInt(value, 10) + }), + era: buildMatchFn({ + matchPatterns: matchEraPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseEraPatterns, + defaultParseWidth: "any" + }), + quarter: buildMatchFn({ + matchPatterns: matchQuarterPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseQuarterPatterns, + defaultParseWidth: "any", + valueCallback: (index) => index + 1 + }), + month: buildMatchFn({ + matchPatterns: matchMonthPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseMonthPatterns, + defaultParseWidth: "any" + }), + day: buildMatchFn({ + matchPatterns: matchDayPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseDayPatterns, + defaultParseWidth: "any" + }), + dayPeriod: buildMatchFn({ + matchPatterns: matchDayPeriodPatterns, + defaultMatchWidth: "any", + parsePatterns: parseDayPeriodPatterns, + defaultParseWidth: "any" + }) +}; + +// node_modules/date-fns/locale/en-US.js +var enUS = { + code: "en-US", + formatDistance, + formatLong, + formatRelative, + localize, + match, + options: { + weekStartsOn: 0, + firstWeekContainsDate: 1 } - return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx); +}; + +// node_modules/date-fns/getDayOfYear.js +function getDayOfYear(date9, options) { + const _date3 = toDate(date9, options?.in); + const diff = differenceInCalendarDays(_date3, startOfYear(_date3)); + const dayOfYear = diff + 1; + return dayOfYear; } -var $ZodCodec2 = /* @__PURE__ */ $constructor2("$ZodCodec", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "values", () => def.in._zod.values); - defineLazy2(inst._zod, "optin", () => def.in._zod.optin); - defineLazy2(inst._zod, "optout", () => def.out._zod.optout); - defineLazy2(inst._zod, "propValues", () => def.in._zod.propValues); - inst._zod.parse = (payload, ctx) => { - const direction = ctx.direction || "forward"; - if (direction === "forward") { - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handleCodecAResult2(left2, def, ctx)); - } - return handleCodecAResult2(left, def, ctx); - } else { - const right = def.out._zod.run(payload, ctx); - if (right instanceof Promise) { - return right.then((right2) => handleCodecAResult2(right2, def, ctx)); - } - return handleCodecAResult2(right, def, ctx); - } - }; -}); -function handleCodecAResult2(result, def, ctx) { - if (result.issues.length) { - result.aborted = true; - return result; - } - const direction = ctx.direction || "forward"; - if (direction === "forward") { - const transformed = def.transform(result.value, result); - if (transformed instanceof Promise) { - return transformed.then((value) => handleCodecTxResult2(result, value, def.out, ctx)); - } - return handleCodecTxResult2(result, transformed, def.out, ctx); + +// node_modules/date-fns/getISOWeek.js +function getISOWeek(date9, options) { + const _date3 = toDate(date9, options?.in); + const diff = +startOfISOWeek(_date3) - +startOfISOWeekYear(_date3); + return Math.round(diff / millisecondsInWeek) + 1; +} + +// node_modules/date-fns/getWeekYear.js +function getWeekYear(date9, options) { + const _date3 = toDate(date9, options?.in); + const year = _date3.getFullYear(); + const defaultOptions2 = getDefaultOptions(); + const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; + const firstWeekOfNextYear = constructFrom(options?.in || date9, 0); + firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate); + firstWeekOfNextYear.setHours(0, 0, 0, 0); + const startOfNextYear = startOfWeek(firstWeekOfNextYear, options); + const firstWeekOfThisYear = constructFrom(options?.in || date9, 0); + firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate); + firstWeekOfThisYear.setHours(0, 0, 0, 0); + const startOfThisYear = startOfWeek(firstWeekOfThisYear, options); + if (+_date3 >= +startOfNextYear) { + return year + 1; + } else if (+_date3 >= +startOfThisYear) { + return year; } else { - const transformed = def.reverseTransform(result.value, result); - if (transformed instanceof Promise) { - return transformed.then((value) => handleCodecTxResult2(result, value, def.in, ctx)); - } - return handleCodecTxResult2(result, transformed, def.in, ctx); + return year - 1; } } -function handleCodecTxResult2(left, value, nextSchema, ctx) { - if (left.issues.length) { - left.aborted = true; - return left; - } - return nextSchema._zod.run({ value, issues: left.issues }, ctx); + +// node_modules/date-fns/startOfWeekYear.js +function startOfWeekYear(date9, options) { + const defaultOptions2 = getDefaultOptions(); + const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; + const year = getWeekYear(date9, options); + const firstWeek = constructFrom(options?.in || date9, 0); + firstWeek.setFullYear(year, 0, firstWeekContainsDate); + firstWeek.setHours(0, 0, 0, 0); + const _date3 = startOfWeek(firstWeek, options); + return _date3; } -var $ZodPreprocess = /* @__PURE__ */ $constructor2("$ZodPreprocess", (inst, def) => { - $ZodPipe2.init(inst, def); -}); -var $ZodReadonly2 = /* @__PURE__ */ $constructor2("$ZodReadonly", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "propValues", () => def.innerType._zod.propValues); - defineLazy2(inst._zod, "values", () => def.innerType._zod.values); - defineLazy2(inst._zod, "optin", () => def.innerType?._zod?.optin); - defineLazy2(inst._zod, "optout", () => def.innerType?._zod?.optout); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then(handleReadonlyResult2); - } - return handleReadonlyResult2(result); - }; -}); -function handleReadonlyResult2(payload) { - payload.value = Object.freeze(payload.value); - return payload; + +// node_modules/date-fns/getWeek.js +function getWeek(date9, options) { + const _date3 = toDate(date9, options?.in); + const diff = +startOfWeek(_date3, options) - +startOfWeekYear(_date3, options); + return Math.round(diff / millisecondsInWeek) + 1; } -var $ZodTemplateLiteral2 = /* @__PURE__ */ $constructor2("$ZodTemplateLiteral", (inst, def) => { - $ZodType2.init(inst, def); - const regexParts = []; - for (const part of def.parts) { - if (typeof part === "object" && part !== null) { - if (!part._zod.pattern) { - throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); - } - const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; - if (!source) - throw new Error(`Invalid template literal part: ${part._zod.traits}`); - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - regexParts.push(source.slice(start, end)); - } else if (part === null || primitiveTypes2.has(typeof part)) { - regexParts.push(escapeRegex2(`${part}`)); - } else { - throw new Error(`Invalid template literal part: ${part}`); + +// node_modules/date-fns/_lib/addLeadingZeros.js +function addLeadingZeros(number7, targetLength) { + const sign = number7 < 0 ? "-" : ""; + const output = Math.abs(number7).toString().padStart(targetLength, "0"); + return sign + output; +} + +// node_modules/date-fns/_lib/format/lightFormatters.js +var lightFormatters = { + // Year + y(date9, token) { + const signedYear = date9.getFullYear(); + const year = signedYear > 0 ? signedYear : 1 - signedYear; + return addLeadingZeros(token === "yy" ? year % 100 : year, token.length); + }, + // Month + M(date9, token) { + const month = date9.getMonth(); + return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2); + }, + // Day of the month + d(date9, token) { + return addLeadingZeros(date9.getDate(), token.length); + }, + // AM or PM + a(date9, token) { + const dayPeriodEnumValue = date9.getHours() / 12 >= 1 ? "pm" : "am"; + switch (token) { + case "a": + case "aa": + return dayPeriodEnumValue.toUpperCase(); + case "aaa": + return dayPeriodEnumValue; + case "aaaaa": + return dayPeriodEnumValue[0]; + case "aaaa": + default: + return dayPeriodEnumValue === "am" ? "a.m." : "p.m."; } + }, + // Hour [1-12] + h(date9, token) { + return addLeadingZeros(date9.getHours() % 12 || 12, token.length); + }, + // Hour [0-23] + H(date9, token) { + return addLeadingZeros(date9.getHours(), token.length); + }, + // Minute + m(date9, token) { + return addLeadingZeros(date9.getMinutes(), token.length); + }, + // Second + s(date9, token) { + return addLeadingZeros(date9.getSeconds(), token.length); + }, + // Fraction of second + S(date9, token) { + const numberOfDigits = token.length; + const milliseconds = date9.getMilliseconds(); + const fractionalSeconds = Math.trunc( + milliseconds * Math.pow(10, numberOfDigits - 3) + ); + return addLeadingZeros(fractionalSeconds, token.length); } - inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "string") { - payload.issues.push({ - input: payload.value, - inst, - expected: "string", - code: "invalid_type" - }); - return payload; +}; + +// node_modules/date-fns/_lib/format/formatters.js +var dayPeriodEnum = { + am: "am", + pm: "pm", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" +}; +var formatters = { + // Era + G: function(date9, token, localize2) { + const era = date9.getFullYear() > 0 ? 1 : 0; + switch (token) { + // AD, BC + case "G": + case "GG": + case "GGG": + return localize2.era(era, { width: "abbreviated" }); + // A, B + case "GGGGG": + return localize2.era(era, { width: "narrow" }); + // Anno Domini, Before Christ + case "GGGG": + default: + return localize2.era(era, { width: "wide" }); } - inst._zod.pattern.lastIndex = 0; - if (!inst._zod.pattern.test(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - code: "invalid_format", - format: def.format ?? "template_literal", - pattern: inst._zod.pattern.source - }); - return payload; - } - return payload; - }; -}); -var $ZodFunction2 = /* @__PURE__ */ $constructor2("$ZodFunction", (inst, def) => { - $ZodType2.init(inst, def); - inst._def = def; - inst._zod.def = def; - inst.implement = (func) => { - if (typeof func !== "function") { - throw new Error("implement() must be called with a function"); - } - return function(...args) { - const parsedArgs = inst._def.input ? parse3(inst._def.input, args) : args; - const result = Reflect.apply(func, this, parsedArgs); - if (inst._def.output) { - return parse3(inst._def.output, result); - } - return result; - }; - }; - inst.implementAsync = (func) => { - if (typeof func !== "function") { - throw new Error("implementAsync() must be called with a function"); + }, + // Year + y: function(date9, token, localize2) { + if (token === "yo") { + const signedYear = date9.getFullYear(); + const year = signedYear > 0 ? signedYear : 1 - signedYear; + return localize2.ordinalNumber(year, { unit: "year" }); } - return async function(...args) { - const parsedArgs = inst._def.input ? await parseAsync3(inst._def.input, args) : args; - const result = await Reflect.apply(func, this, parsedArgs); - if (inst._def.output) { - return await parseAsync3(inst._def.output, result); - } - return result; - }; - }; - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "function") { - payload.issues.push({ - code: "invalid_type", - expected: "function", - input: payload.value, - inst - }); - return payload; + return lightFormatters.y(date9, token); + }, + // Local week-numbering year + Y: function(date9, token, localize2, options) { + const signedWeekYear = getWeekYear(date9, options); + const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; + if (token === "YY") { + const twoDigitYear = weekYear % 100; + return addLeadingZeros(twoDigitYear, 2); } - const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; - if (hasPromiseOutput) { - payload.value = inst.implementAsync(payload.value); - } else { - payload.value = inst.implement(payload.value); + if (token === "Yo") { + return localize2.ordinalNumber(weekYear, { unit: "year" }); } - return payload; - }; - inst.input = (...args) => { - const F = inst.constructor; - if (Array.isArray(args[0])) { - return new F({ - type: "function", - input: new $ZodTuple2({ - type: "tuple", - items: args[0], - rest: args[1] - }), - output: inst._def.output - }); + return addLeadingZeros(weekYear, token.length); + }, + // ISO week-numbering year + R: function(date9, token) { + const isoWeekYear = getISOWeekYear(date9); + return addLeadingZeros(isoWeekYear, token.length); + }, + // Extended year. This is a single number designating the year of this calendar system. + // The main difference between `y` and `u` localizers are B.C. years: + // | Year | `y` | `u` | + // |------|-----|-----| + // | AC 1 | 1 | 1 | + // | BC 1 | 1 | 0 | + // | BC 2 | 2 | -1 | + // Also `yy` always returns the last two digits of a year, + // while `uu` pads single digit years to 2 characters and returns other years unchanged. + u: function(date9, token) { + const year = date9.getFullYear(); + return addLeadingZeros(year, token.length); + }, + // Quarter + Q: function(date9, token, localize2) { + const quarter = Math.ceil((date9.getMonth() + 1) / 3); + switch (token) { + // 1, 2, 3, 4 + case "Q": + return String(quarter); + // 01, 02, 03, 04 + case "QQ": + return addLeadingZeros(quarter, 2); + // 1st, 2nd, 3rd, 4th + case "Qo": + return localize2.ordinalNumber(quarter, { unit: "quarter" }); + // Q1, Q2, Q3, Q4 + case "QQQ": + return localize2.quarter(quarter, { + width: "abbreviated", + context: "formatting" + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + case "QQQQQ": + return localize2.quarter(quarter, { + width: "narrow", + context: "formatting" + }); + // 1st quarter, 2nd quarter, ... + case "QQQQ": + default: + return localize2.quarter(quarter, { + width: "wide", + context: "formatting" + }); } - return new F({ - type: "function", - input: args[0], - output: inst._def.output - }); - }; - inst.output = (output) => { - const F = inst.constructor; - return new F({ - type: "function", - input: inst._def.input, - output - }); - }; - return inst; -}); -var $ZodPromise2 = /* @__PURE__ */ $constructor2("$ZodPromise", (inst, def) => { - $ZodType2.init(inst, def); - inst._zod.parse = (payload, ctx) => { - return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); - }; -}); -var $ZodLazy2 = /* @__PURE__ */ $constructor2("$ZodLazy", (inst, def) => { - $ZodType2.init(inst, def); - defineLazy2(inst._zod, "innerType", () => { - const d = def; - if (!d._cachedInner) - d._cachedInner = def.getter(); - return d._cachedInner; - }); - defineLazy2(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); - defineLazy2(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); - defineLazy2(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); - defineLazy2(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); - inst._zod.parse = (payload, ctx) => { - const inner = inst._zod.innerType; - return inner._zod.run(payload, ctx); - }; -}); -var $ZodCustom2 = /* @__PURE__ */ $constructor2("$ZodCustom", (inst, def) => { - $ZodCheck2.init(inst, def); - $ZodType2.init(inst, def); - inst._zod.parse = (payload, _) => { - return payload; - }; - inst._zod.check = (payload) => { - const input = payload.value; - const r = def.fn(input); - if (r instanceof Promise) { - return r.then((r2) => handleRefineResult2(r2, payload, input, inst)); + }, + // Stand-alone quarter + q: function(date9, token, localize2) { + const quarter = Math.ceil((date9.getMonth() + 1) / 3); + switch (token) { + // 1, 2, 3, 4 + case "q": + return String(quarter); + // 01, 02, 03, 04 + case "qq": + return addLeadingZeros(quarter, 2); + // 1st, 2nd, 3rd, 4th + case "qo": + return localize2.ordinalNumber(quarter, { unit: "quarter" }); + // Q1, Q2, Q3, Q4 + case "qqq": + return localize2.quarter(quarter, { + width: "abbreviated", + context: "standalone" + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + case "qqqqq": + return localize2.quarter(quarter, { + width: "narrow", + context: "standalone" + }); + // 1st quarter, 2nd quarter, ... + case "qqqq": + default: + return localize2.quarter(quarter, { + width: "wide", + context: "standalone" + }); } - handleRefineResult2(r, payload, input, inst); - return; - }; -}); -function handleRefineResult2(result, payload, input, inst) { - if (!result) { - const _iss = { - code: "custom", - input, - inst, - // incorporates params.error into issue reporting - path: [...inst._zod.def.path ?? []], - // incorporates params.error into issue reporting - continue: !inst._zod.def.abort - // params: inst._zod.def.params, - }; - if (inst._zod.def.params) - _iss.params = inst._zod.def.params; - payload.issues.push(issue3(_iss)); - } -} - -// node_modules/zod/v4/locales/index.js -var locales_exports2 = {}; -__export(locales_exports2, { - ar: () => ar_default2, - az: () => az_default2, - be: () => be_default2, - bg: () => bg_default2, - ca: () => ca_default2, - cs: () => cs_default2, - da: () => da_default2, - de: () => de_default2, - el: () => el_default, - en: () => en_default2, - eo: () => eo_default2, - es: () => es_default2, - fa: () => fa_default2, - fi: () => fi_default2, - fr: () => fr_default2, - frCA: () => fr_CA_default2, - he: () => he_default2, - hr: () => hr_default, - hu: () => hu_default2, - hy: () => hy_default2, - id: () => id_default2, - is: () => is_default2, - it: () => it_default2, - ja: () => ja_default2, - ka: () => ka_default2, - kh: () => kh_default2, - km: () => km_default2, - ko: () => ko_default2, - lt: () => lt_default2, - mk: () => mk_default2, - ms: () => ms_default2, - nl: () => nl_default2, - no: () => no_default2, - ota: () => ota_default2, - pl: () => pl_default2, - ps: () => ps_default2, - pt: () => pt_default2, - ro: () => ro_default, - ru: () => ru_default2, - sl: () => sl_default2, - sv: () => sv_default2, - ta: () => ta_default2, - th: () => th_default2, - tr: () => tr_default2, - ua: () => ua_default2, - uk: () => uk_default2, - ur: () => ur_default2, - uz: () => uz_default2, - vi: () => vi_default2, - yo: () => yo_default2, - zhCN: () => zh_CN_default2, - zhTW: () => zh_TW_default2 -}); - -// node_modules/zod/v4/locales/ar.js -var error49 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0645\u062F\u062E\u0644", - email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", - url: "\u0631\u0627\u0628\u0637", - emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", - ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", - cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", - cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", - base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", - base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", - json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", - e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", - jwt: "JWT", - template_literal: "\u0645\u062F\u062E\u0644" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue5.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; - } - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive2(issue5.values[0])}`; - return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue5.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; - return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue5.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue5.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue5.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue5.prefix}"`; - if (_issue.format === "ends_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; - } - case "not_multiple_of": - return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue5.divisor}`; - case "unrecognized_keys": - return `\u0645\u0639\u0631\u0641${issue5.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue5.keys.length > 1 ? "\u0629" : ""}: ${joinValues2(issue5.keys, "\u060C ")}`; - case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue5.origin}`; - case "invalid_union": - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; - case "invalid_element": - return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue5.origin}`; + }, + // Month + M: function(date9, token, localize2) { + const month = date9.getMonth(); + switch (token) { + case "M": + case "MM": + return lightFormatters.M(date9, token); + // 1st, 2nd, ..., 12th + case "Mo": + return localize2.ordinalNumber(month + 1, { unit: "month" }); + // Jan, Feb, ..., Dec + case "MMM": + return localize2.month(month, { + width: "abbreviated", + context: "formatting" + }); + // J, F, ..., D + case "MMMMM": + return localize2.month(month, { + width: "narrow", + context: "formatting" + }); + // January, February, ..., December + case "MMMM": default: - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + return localize2.month(month, { width: "wide", context: "formatting" }); } - }; -}; -function ar_default2() { - return { - localeError: error49() - }; -} - -// node_modules/zod/v4/locales/az.js -var error50 = () => { - const Sizable = { - string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "element", verb: "olmal\u0131d\u0131r" }, - set: { unit: "element", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "email address", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datetime", - date: "ISO date", - time: "ISO time", - duration: "ISO duration", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded string", - base64url: "base64url-encoded string", - json_string: "JSON string", - e164: "E.164 number", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue5.expected}, daxil olan ${received}`; - } - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive2(issue5.values[0])}`; - return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue5.origin ?? "d\u0259y\u0259r"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "element"}`; - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue5.origin ?? "d\u0259y\u0259r"} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue5.origin} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; - if (_issue.format === "ends_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; - if (_issue.format === "includes") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; - if (_issue.format === "regex") - return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; - return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue5.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; - case "unrecognized_keys": - return `Tan\u0131nmayan a\xE7ar${issue5.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; - case "invalid_union": - return "Yanl\u0131\u015F d\u0259y\u0259r"; - case "invalid_element": - return `${issue5.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + }, + // Stand-alone month + L: function(date9, token, localize2) { + const month = date9.getMonth(); + switch (token) { + // 1, 2, ..., 12 + case "L": + return String(month + 1); + // 01, 02, ..., 12 + case "LL": + return addLeadingZeros(month + 1, 2); + // 1st, 2nd, ..., 12th + case "Lo": + return localize2.ordinalNumber(month + 1, { unit: "month" }); + // Jan, Feb, ..., Dec + case "LLL": + return localize2.month(month, { + width: "abbreviated", + context: "standalone" + }); + // J, F, ..., D + case "LLLLL": + return localize2.month(month, { + width: "narrow", + context: "standalone" + }); + // January, February, ..., December + case "LLLL": default: - return `Yanl\u0131\u015F d\u0259y\u0259r`; + return localize2.month(month, { width: "wide", context: "standalone" }); } - }; -}; -function az_default2() { - return { - localeError: error50() - }; -} - -// node_modules/zod/v4/locales/be.js -function getBelarusianPlural2(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; - } - if (lastDigit === 1) { - return one; - } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; - } - return many; -} -var error51 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0456\u043C\u0432\u0430\u043B", - few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", - many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u044B", - many: "\u0431\u0430\u0439\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" + }, + // Local week of year + w: function(date9, token, localize2, options) { + const week = getWeek(date9, options); + if (token === "wo") { + return localize2.ordinalNumber(week, { unit: "week" }); } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0443\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0430\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0447\u0430\u0441", - duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", - cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", - base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", - json_string: "JSON \u0440\u0430\u0434\u043E\u043A", - e164: "\u043D\u0443\u043C\u0430\u0440 E.164", - jwt: "JWT", - template_literal: "\u0443\u0432\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u043B\u0456\u043A", - array: "\u043C\u0430\u0441\u0456\u045E" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue5.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; - } - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive2(issue5.values[0])}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const maxValue = Number(issue5.maximum); - const unit = getBelarusianPlural2(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue5.maximum.toString()} ${unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const minValue = Number(issue5.minimum); - const unit = getBelarusianPlural2(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue5.minimum.toString()} ${unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue5.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue5.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; - case "invalid_element": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue5.origin}`; - default: - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; + return addLeadingZeros(week, token.length); + }, + // ISO week of year + I: function(date9, token, localize2) { + const isoWeek = getISOWeek(date9); + if (token === "Io") { + return localize2.ordinalNumber(isoWeek, { unit: "week" }); } - }; -}; -function be_default2() { - return { - localeError: error51() - }; -} - -// node_modules/zod/v4/locales/bg.js -var error52 = () => { - const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0445\u043E\u0434", - email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", - base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", - json_string: "JSON \u043D\u0438\u0437", - e164: "E.164 \u043D\u043E\u043C\u0435\u0440", - jwt: "JWT", - template_literal: "\u0432\u0445\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0438\u0432" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue5.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; - } - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive2(issue5.values[0])}`; - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue5.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; - let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; - if (_issue.format === "emoji") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "datetime") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "date") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; - if (_issue.format === "time") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "duration") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; - return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue5.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue5.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; - case "invalid_element": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue5.origin}`; + return addLeadingZeros(isoWeek, token.length); + }, + // Day of the month + d: function(date9, token, localize2) { + if (token === "do") { + return localize2.ordinalNumber(date9.getDate(), { unit: "date" }); + } + return lightFormatters.d(date9, token); + }, + // Day of year + D: function(date9, token, localize2) { + const dayOfYear = getDayOfYear(date9); + if (token === "Do") { + return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" }); + } + return addLeadingZeros(dayOfYear, token.length); + }, + // Day of week + E: function(date9, token, localize2) { + const dayOfWeek = date9.getDay(); + switch (token) { + // Tue + case "E": + case "EE": + case "EEE": + return localize2.day(dayOfWeek, { + width: "abbreviated", + context: "formatting" + }); + // T + case "EEEEE": + return localize2.day(dayOfWeek, { + width: "narrow", + context: "formatting" + }); + // Tu + case "EEEEEE": + return localize2.day(dayOfWeek, { + width: "short", + context: "formatting" + }); + // Tuesday + case "EEEE": default: - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; + return localize2.day(dayOfWeek, { + width: "wide", + context: "formatting" + }); } - }; -}; -function bg_default2() { - return { - localeError: error52() - }; -} - -// node_modules/zod/v4/locales/ca.js -var error53 = () => { - const Sizable = { - string: { unit: "car\xE0cters", verb: "contenir" }, - file: { unit: "bytes", verb: "contenir" }, - array: { unit: "elements", verb: "contenir" }, - set: { unit: "elements", verb: "contenir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "entrada", - email: "adre\xE7a electr\xF2nica", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "durada ISO", - ipv4: "adre\xE7a IPv4", - ipv6: "adre\xE7a IPv6", - cidrv4: "rang IPv4", - cidrv6: "rang IPv6", - base64: "cadena codificada en base64", - base64url: "cadena codificada en base64url", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Tipus inv\xE0lid: s'esperava instanceof ${issue5.expected}, s'ha rebut ${received}`; - } - return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive2(issue5.values[0])}`; - return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues2(issue5.values, " o ")}`; - case "too_big": { - const adj = issue5.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Massa gran: s'esperava que ${issue5.origin ?? "el valor"} contingu\xE9s ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Massa gran: s'esperava que ${issue5.origin ?? "el valor"} fos ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Massa petit: s'esperava que ${issue5.origin} contingu\xE9s ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Massa petit: s'esperava que ${issue5.origin} fos ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; - return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue5.divisor}`; - case "unrecognized_keys": - return `Clau${issue5.keys.length > 1 ? "s" : ""} no reconeguda${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Clau inv\xE0lida a ${issue5.origin}`; - case "invalid_union": - return "Entrada inv\xE0lida"; - // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general - case "invalid_element": - return `Element inv\xE0lid a ${issue5.origin}`; + }, + // Local day of week + e: function(date9, token, localize2, options) { + const dayOfWeek = date9.getDay(); + const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; + switch (token) { + // Numerical value (Nth day of week with current locale or weekStartsOn) + case "e": + return String(localDayOfWeek); + // Padded numerical value + case "ee": + return addLeadingZeros(localDayOfWeek, 2); + // 1st, 2nd, ..., 7th + case "eo": + return localize2.ordinalNumber(localDayOfWeek, { unit: "day" }); + case "eee": + return localize2.day(dayOfWeek, { + width: "abbreviated", + context: "formatting" + }); + // T + case "eeeee": + return localize2.day(dayOfWeek, { + width: "narrow", + context: "formatting" + }); + // Tu + case "eeeeee": + return localize2.day(dayOfWeek, { + width: "short", + context: "formatting" + }); + // Tuesday + case "eeee": default: - return `Entrada inv\xE0lida`; + return localize2.day(dayOfWeek, { + width: "wide", + context: "formatting" + }); } - }; -}; -function ca_default2() { - return { - localeError: error53() - }; -} - -// node_modules/zod/v4/locales/cs.js -var error54 = () => { - const Sizable = { - string: { unit: "znak\u016F", verb: "m\xEDt" }, - file: { unit: "bajt\u016F", verb: "m\xEDt" }, - array: { unit: "prvk\u016F", verb: "m\xEDt" }, - set: { unit: "prvk\u016F", verb: "m\xEDt" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "regul\xE1rn\xED v\xFDraz", - email: "e-mailov\xE1 adresa", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "datum a \u010Das ve form\xE1tu ISO", - date: "datum ve form\xE1tu ISO", - time: "\u010Das ve form\xE1tu ISO", - duration: "doba trv\xE1n\xED ISO", - ipv4: "IPv4 adresa", - ipv6: "IPv6 adresa", - cidrv4: "rozsah IPv4", - cidrv6: "rozsah IPv6", - base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", - base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", - json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", - e164: "\u010D\xEDslo E.164", - jwt: "JWT", - template_literal: "vstup" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u010D\xEDslo", - string: "\u0159et\u011Bzec", - function: "funkce", - array: "pole" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue5.expected}, obdr\u017Eeno ${received}`; - } - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive2(issue5.values[0])}`; - return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue5.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; - } - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue5.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue5.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue5.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; - } - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue5.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; - return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue5.divisor}`; - case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue5.origin}`; - case "invalid_union": - return "Neplatn\xFD vstup"; - case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue5.origin}`; + }, + // Stand-alone local day of week + c: function(date9, token, localize2, options) { + const dayOfWeek = date9.getDay(); + const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; + switch (token) { + // Numerical value (same as in `e`) + case "c": + return String(localDayOfWeek); + // Padded numerical value + case "cc": + return addLeadingZeros(localDayOfWeek, token.length); + // 1st, 2nd, ..., 7th + case "co": + return localize2.ordinalNumber(localDayOfWeek, { unit: "day" }); + case "ccc": + return localize2.day(dayOfWeek, { + width: "abbreviated", + context: "standalone" + }); + // T + case "ccccc": + return localize2.day(dayOfWeek, { + width: "narrow", + context: "standalone" + }); + // Tu + case "cccccc": + return localize2.day(dayOfWeek, { + width: "short", + context: "standalone" + }); + // Tuesday + case "cccc": default: - return `Neplatn\xFD vstup`; + return localize2.day(dayOfWeek, { + width: "wide", + context: "standalone" + }); } - }; -}; -function cs_default2() { - return { - localeError: error54() - }; -} - -// node_modules/zod/v4/locales/da.js -var error55 = () => { - const Sizable = { - string: { unit: "tegn", verb: "havde" }, - file: { unit: "bytes", verb: "havde" }, - array: { unit: "elementer", verb: "indeholdt" }, - set: { unit: "elementer", verb: "indeholdt" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "e-mailadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkesl\xE6t", - date: "ISO-dato", - time: "ISO-klokkesl\xE6t", - duration: "ISO-varighed", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodet streng", - base64url: "base64url-kodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - string: "streng", - number: "tal", - boolean: "boolean", - array: "liste", - object: "objekt", - set: "s\xE6t", - file: "fil" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ugyldigt input: forventede instanceof ${issue5.expected}, fik ${received}`; - } - return `Ugyldigt input: forventede ${expected}, fik ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive2(issue5.values[0])}`; - return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) - return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) { - return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `For lille: forventede ${origin2} havde ${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ugyldig streng: skal starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: skal ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ugyldig streng: skal indeholde "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Ugyldigt tal: skal v\xE6re deleligt med ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8gle i ${issue5.origin}`; - case "invalid_union": - return "Ugyldigt input: matcher ingen af de tilladte typer"; - case "invalid_element": - return `Ugyldig v\xE6rdi i ${issue5.origin}`; + }, + // ISO day of week + i: function(date9, token, localize2) { + const dayOfWeek = date9.getDay(); + const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek; + switch (token) { + // 2 + case "i": + return String(isoDayOfWeek); + // 02 + case "ii": + return addLeadingZeros(isoDayOfWeek, token.length); + // 2nd + case "io": + return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" }); + // Tue + case "iii": + return localize2.day(dayOfWeek, { + width: "abbreviated", + context: "formatting" + }); + // T + case "iiiii": + return localize2.day(dayOfWeek, { + width: "narrow", + context: "formatting" + }); + // Tu + case "iiiiii": + return localize2.day(dayOfWeek, { + width: "short", + context: "formatting" + }); + // Tuesday + case "iiii": default: - return `Ugyldigt input`; + return localize2.day(dayOfWeek, { + width: "wide", + context: "formatting" + }); } - }; -}; -function da_default2() { - return { - localeError: error55() - }; -} - -// node_modules/zod/v4/locales/de.js -var error56 = () => { - const Sizable = { - string: { unit: "Zeichen", verb: "zu haben" }, - file: { unit: "Bytes", verb: "zu haben" }, - array: { unit: "Elemente", verb: "zu haben" }, - set: { unit: "Elemente", verb: "zu haben" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "Eingabe", - email: "E-Mail-Adresse", - url: "URL", - emoji: "Emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-Datum und -Uhrzeit", - date: "ISO-Datum", - time: "ISO-Uhrzeit", - duration: "ISO-Dauer", - ipv4: "IPv4-Adresse", - ipv6: "IPv6-Adresse", - cidrv4: "IPv4-Bereich", - cidrv6: "IPv6-Bereich", - base64: "Base64-codierter String", - base64url: "Base64-URL-codierter String", - json_string: "JSON-String", - e164: "E.164-Nummer", - jwt: "JWT", - template_literal: "Eingabe" - }; - const TypeDictionary = { - nan: "NaN", - number: "Zahl", - array: "Array" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ung\xFCltige Eingabe: erwartet instanceof ${issue5.expected}, erhalten ${received}`; - } - return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive2(issue5.values[0])}`; - return `Ung\xFCltige Option: erwartet eine von ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Zu gro\xDF: erwartet, dass ${issue5.origin ?? "Wert"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; - return `Zu gro\xDF: erwartet, dass ${issue5.origin ?? "Wert"} ${adj}${issue5.maximum.toString()} ist`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Zu klein: erwartet, dass ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} hat`; - } - return `Zu klein: erwartet, dass ${issue5.origin} ${adj}${issue5.minimum.toString()} ist`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; - if (_issue.format === "ends_with") - return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; - if (_issue.format === "includes") - return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; - if (_issue.format === "regex") - return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; - return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue5.divisor} sein`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue5.origin}`; - case "invalid_union": - return "Ung\xFCltige Eingabe"; - case "invalid_element": - return `Ung\xFCltiger Wert in ${issue5.origin}`; + }, + // AM or PM + a: function(date9, token, localize2) { + const hours = date9.getHours(); + const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am"; + switch (token) { + case "a": + case "aa": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "abbreviated", + context: "formatting" + }); + case "aaa": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "abbreviated", + context: "formatting" + }).toLowerCase(); + case "aaaaa": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "narrow", + context: "formatting" + }); + case "aaaa": default: - return `Ung\xFCltige Eingabe`; + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "wide", + context: "formatting" + }); } - }; -}; -function de_default2() { - return { - localeError: error56() - }; -} - -// node_modules/zod/v4/locales/el.js -var error57 = () => { - const Sizable = { - string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, - file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, - array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, - set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, - map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2", - email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1", - date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1", - time: "ISO \u03CE\u03C1\u03B1", - duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1", - ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4", - ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6", - mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC", - cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4", - cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6", - base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64", - base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url", - json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON", - e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164", - jwt: "JWT", - template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (typeof issue5.expected === "string" && /^[A-Z]/.test(issue5.expected)) { - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue5.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`; - } - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive2(issue5.values[0])}`; - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue5.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`; - return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue5.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue5.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue5.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`; - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue5.divisor}`; - case "unrecognized_keys": - return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue5.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue5.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue5.origin}`; - case "invalid_union": - return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"; - case "invalid_element": - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue5.origin}`; + }, + // AM, PM, midnight, noon + b: function(date9, token, localize2) { + const hours = date9.getHours(); + let dayPeriodEnumValue; + if (hours === 12) { + dayPeriodEnumValue = dayPeriodEnum.noon; + } else if (hours === 0) { + dayPeriodEnumValue = dayPeriodEnum.midnight; + } else { + dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am"; + } + switch (token) { + case "b": + case "bb": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "abbreviated", + context: "formatting" + }); + case "bbb": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "abbreviated", + context: "formatting" + }).toLowerCase(); + case "bbbbb": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "narrow", + context: "formatting" + }); + case "bbbb": default: - return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`; + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "wide", + context: "formatting" + }); } - }; + }, + // in the morning, in the afternoon, in the evening, at night + B: function(date9, token, localize2) { + const hours = date9.getHours(); + let dayPeriodEnumValue; + if (hours >= 17) { + dayPeriodEnumValue = dayPeriodEnum.evening; + } else if (hours >= 12) { + dayPeriodEnumValue = dayPeriodEnum.afternoon; + } else if (hours >= 4) { + dayPeriodEnumValue = dayPeriodEnum.morning; + } else { + dayPeriodEnumValue = dayPeriodEnum.night; + } + switch (token) { + case "B": + case "BB": + case "BBB": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "abbreviated", + context: "formatting" + }); + case "BBBBB": + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "narrow", + context: "formatting" + }); + case "BBBB": + default: + return localize2.dayPeriod(dayPeriodEnumValue, { + width: "wide", + context: "formatting" + }); + } + }, + // Hour [1-12] + h: function(date9, token, localize2) { + if (token === "ho") { + let hours = date9.getHours() % 12; + if (hours === 0) hours = 12; + return localize2.ordinalNumber(hours, { unit: "hour" }); + } + return lightFormatters.h(date9, token); + }, + // Hour [0-23] + H: function(date9, token, localize2) { + if (token === "Ho") { + return localize2.ordinalNumber(date9.getHours(), { unit: "hour" }); + } + return lightFormatters.H(date9, token); + }, + // Hour [0-11] + K: function(date9, token, localize2) { + const hours = date9.getHours() % 12; + if (token === "Ko") { + return localize2.ordinalNumber(hours, { unit: "hour" }); + } + return addLeadingZeros(hours, token.length); + }, + // Hour [1-24] + k: function(date9, token, localize2) { + let hours = date9.getHours(); + if (hours === 0) hours = 24; + if (token === "ko") { + return localize2.ordinalNumber(hours, { unit: "hour" }); + } + return addLeadingZeros(hours, token.length); + }, + // Minute + m: function(date9, token, localize2) { + if (token === "mo") { + return localize2.ordinalNumber(date9.getMinutes(), { unit: "minute" }); + } + return lightFormatters.m(date9, token); + }, + // Second + s: function(date9, token, localize2) { + if (token === "so") { + return localize2.ordinalNumber(date9.getSeconds(), { unit: "second" }); + } + return lightFormatters.s(date9, token); + }, + // Fraction of second + S: function(date9, token) { + return lightFormatters.S(date9, token); + }, + // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) + X: function(date9, token, _localize) { + const timezoneOffset = date9.getTimezoneOffset(); + if (timezoneOffset === 0) { + return "Z"; + } + switch (token) { + // Hours and optional minutes + case "X": + return formatTimezoneWithOptionalMinutes(timezoneOffset); + // Hours, minutes and optional seconds without `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `XX` + case "XXXX": + case "XX": + return formatTimezone(timezoneOffset); + // Hours, minutes and optional seconds with `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `XXX` + case "XXXXX": + case "XXX": + // Hours and minutes with `:` delimiter + default: + return formatTimezone(timezoneOffset, ":"); + } + }, + // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) + x: function(date9, token, _localize) { + const timezoneOffset = date9.getTimezoneOffset(); + switch (token) { + // Hours and optional minutes + case "x": + return formatTimezoneWithOptionalMinutes(timezoneOffset); + // Hours, minutes and optional seconds without `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `xx` + case "xxxx": + case "xx": + return formatTimezone(timezoneOffset); + // Hours, minutes and optional seconds with `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `xxx` + case "xxxxx": + case "xxx": + // Hours and minutes with `:` delimiter + default: + return formatTimezone(timezoneOffset, ":"); + } + }, + // Timezone (GMT) + O: function(date9, token, _localize) { + const timezoneOffset = date9.getTimezoneOffset(); + switch (token) { + // Short + case "O": + case "OO": + case "OOO": + return "GMT" + formatTimezoneShort(timezoneOffset, ":"); + // Long + case "OOOO": + default: + return "GMT" + formatTimezone(timezoneOffset, ":"); + } + }, + // Timezone (specific non-location) + z: function(date9, token, _localize) { + const timezoneOffset = date9.getTimezoneOffset(); + switch (token) { + // Short + case "z": + case "zz": + case "zzz": + return "GMT" + formatTimezoneShort(timezoneOffset, ":"); + // Long + case "zzzz": + default: + return "GMT" + formatTimezone(timezoneOffset, ":"); + } + }, + // Seconds timestamp + t: function(date9, token, _localize) { + const timestamp = Math.trunc(+date9 / 1e3); + return addLeadingZeros(timestamp, token.length); + }, + // Milliseconds timestamp + T: function(date9, token, _localize) { + return addLeadingZeros(+date9, token.length); + } }; -function el_default() { - return { - localeError: error57() - }; +function formatTimezoneShort(offset, delimiter = "") { + const sign = offset > 0 ? "-" : "+"; + const absOffset = Math.abs(offset); + const hours = Math.trunc(absOffset / 60); + const minutes = absOffset % 60; + if (minutes === 0) { + return sign + String(hours); + } + return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2); } - -// node_modules/zod/v4/locales/en.js -var error58 = () => { - const Sizable = { - string: { unit: "characters", verb: "to have" }, - file: { unit: "bytes", verb: "to have" }, - array: { unit: "items", verb: "to have" }, - set: { unit: "items", verb: "to have" }, - map: { unit: "entries", verb: "to have" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +function formatTimezoneWithOptionalMinutes(offset, delimiter) { + if (offset % 60 === 0) { + const sign = offset > 0 ? "-" : "+"; + return sign + addLeadingZeros(Math.abs(offset) / 60, 2); } - const FormatDictionary = { - regex: "input", - email: "email address", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datetime", - date: "ISO date", - time: "ISO time", - duration: "ISO duration", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - mac: "MAC address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded string", - base64url: "base64url-encoded string", - json_string: "JSON string", - e164: "E.164 number", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - // Compatibility: "nan" -> "NaN" for display - nan: "NaN" - // All other type names omitted - they fall back to raw values via ?? operator - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - return `Invalid input: expected ${expected}, received ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive2(issue5.values[0])}`; - return `Invalid option: expected one of ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Too big: expected ${issue5.origin ?? "value"} to have ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue5.origin ?? "value"} to be ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Too small: expected ${issue5.origin} to have ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Too small: expected ${issue5.origin} to be ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Invalid string: must start with "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Invalid string: must end with "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Invalid string: must include "${_issue.includes}"`; - if (_issue.format === "regex") - return `Invalid string: must match pattern ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue5.divisor}`; - case "unrecognized_keys": - return `Unrecognized key${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Invalid key in ${issue5.origin}`; - case "invalid_union": - if (issue5.options && Array.isArray(issue5.options) && issue5.options.length > 0) { - const opts = issue5.options.map((o) => `'${o}'`).join(" | "); - return `Invalid discriminator value. Expected ${opts}`; - } - return "Invalid input"; - case "invalid_element": - return `Invalid value in ${issue5.origin}`; - default: - return `Invalid input`; - } - }; -}; -function en_default2() { - return { - localeError: error58() - }; + return formatTimezone(offset, delimiter); +} +function formatTimezone(offset, delimiter = "") { + const sign = offset > 0 ? "-" : "+"; + const absOffset = Math.abs(offset); + const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2); + const minutes = addLeadingZeros(absOffset % 60, 2); + return sign + hours + delimiter + minutes; } -// node_modules/zod/v4/locales/eo.js -var error59 = () => { - const Sizable = { - string: { unit: "karaktrojn", verb: "havi" }, - file: { unit: "bajtojn", verb: "havi" }, - array: { unit: "elementojn", verb: "havi" }, - set: { unit: "elementojn", verb: "havi" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// node_modules/date-fns/_lib/format/longFormatters.js +var dateLongFormatter = (pattern, formatLong2) => { + switch (pattern) { + case "P": + return formatLong2.date({ width: "short" }); + case "PP": + return formatLong2.date({ width: "medium" }); + case "PPP": + return formatLong2.date({ width: "long" }); + case "PPPP": + default: + return formatLong2.date({ width: "full" }); } - const FormatDictionary = { - regex: "enigo", - email: "retadreso", - url: "URL", - emoji: "emo\u011Dio", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datotempo", - date: "ISO-dato", - time: "ISO-tempo", - duration: "ISO-da\u016Dro", - ipv4: "IPv4-adreso", - ipv6: "IPv6-adreso", - cidrv4: "IPv4-rango", - cidrv6: "IPv6-rango", - base64: "64-ume kodita karaktraro", - base64url: "URL-64-ume kodita karaktraro", - json_string: "JSON-karaktraro", - e164: "E.164-nombro", - jwt: "JWT", - template_literal: "enigo" - }; - const TypeDictionary = { - nan: "NaN", - number: "nombro", - array: "tabelo", - null: "senvalora" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Nevalida enigo: atendi\u011Dis instanceof ${issue5.expected}, ricevi\u011Dis ${received}`; - } - return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive2(issue5.values[0])}`; - return `Nevalida opcio: atendi\u011Dis unu el ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Tro granda: atendi\u011Dis ke ${issue5.origin ?? "valoro"} havu ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementojn"}`; - return `Tro granda: atendi\u011Dis ke ${issue5.origin ?? "valoro"} havu ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue5.origin} havu ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Tro malgranda: atendi\u011Dis ke ${issue5.origin} estu ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; - if (_issue.format === "regex") - return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; - return `Nevalida ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue5.divisor}`; - case "unrecognized_keys": - return `Nekonata${issue5.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue5.keys.length > 1 ? "j" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue5.origin}`; - case "invalid_union": - return "Nevalida enigo"; - case "invalid_element": - return `Nevalida valoro en ${issue5.origin}`; - default: - return `Nevalida enigo`; - } - }; }; -function eo_default2() { - return { - localeError: error59() - }; -} - -// node_modules/zod/v4/locales/es.js -var error60 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "tener" }, - file: { unit: "bytes", verb: "tener" }, - array: { unit: "elementos", verb: "tener" }, - set: { unit: "elementos", verb: "tener" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var timeLongFormatter = (pattern, formatLong2) => { + switch (pattern) { + case "p": + return formatLong2.time({ width: "short" }); + case "pp": + return formatLong2.time({ width: "medium" }); + case "ppp": + return formatLong2.time({ width: "long" }); + case "pppp": + default: + return formatLong2.time({ width: "full" }); } - const FormatDictionary = { - regex: "entrada", - email: "direcci\xF3n de correo electr\xF3nico", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "fecha y hora ISO", - date: "fecha ISO", - time: "hora ISO", - duration: "duraci\xF3n ISO", - ipv4: "direcci\xF3n IPv4", - ipv6: "direcci\xF3n IPv6", - cidrv4: "rango IPv4", - cidrv6: "rango IPv6", - base64: "cadena codificada en base64", - base64url: "URL codificada en base64", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN", - string: "texto", - number: "n\xFAmero", - boolean: "booleano", - array: "arreglo", - object: "objeto", - set: "conjunto", - file: "archivo", - date: "fecha", - bigint: "n\xFAmero grande", - symbol: "s\xEDmbolo", - undefined: "indefinido", - null: "nulo", - function: "funci\xF3n", - map: "mapa", - record: "registro", - tuple: "tupla", - enum: "enumeraci\xF3n", - union: "uni\xF3n", - literal: "literal", - promise: "promesa", - void: "vac\xEDo", - never: "nunca", - unknown: "desconocido", - any: "cualquiera" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Entrada inv\xE1lida: se esperaba instanceof ${issue5.expected}, recibido ${received}`; - } - return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive2(issue5.values[0])}`; - return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) - return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) { - return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; - return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue5.divisor}`; - case "unrecognized_keys": - return `Llave${issue5.keys.length > 1 ? "s" : ""} desconocida${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Llave inv\xE1lida en ${TypeDictionary[issue5.origin] ?? issue5.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido en ${TypeDictionary[issue5.origin] ?? issue5.origin}`; - default: - return `Entrada inv\xE1lida`; - } - }; }; -function es_default2() { - return { - localeError: error60() - }; +var dateTimeLongFormatter = (pattern, formatLong2) => { + const matchResult = pattern.match(/(P+)(p+)?/) || []; + const datePattern = matchResult[1]; + const timePattern = matchResult[2]; + if (!timePattern) { + return dateLongFormatter(pattern, formatLong2); + } + let dateTimeFormat; + switch (datePattern) { + case "P": + dateTimeFormat = formatLong2.dateTime({ width: "short" }); + break; + case "PP": + dateTimeFormat = formatLong2.dateTime({ width: "medium" }); + break; + case "PPP": + dateTimeFormat = formatLong2.dateTime({ width: "long" }); + break; + case "PPPP": + default: + dateTimeFormat = formatLong2.dateTime({ width: "full" }); + break; + } + return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2)); +}; +var longFormatters = { + p: timeLongFormatter, + P: dateTimeLongFormatter +}; + +// node_modules/date-fns/_lib/protectedTokens.js +var dayOfYearTokenRE = /^D+$/; +var weekYearTokenRE = /^Y+$/; +var throwTokens = ["D", "DD", "YY", "YYYY"]; +function isProtectedDayOfYearToken(token) { + return dayOfYearTokenRE.test(token); +} +function isProtectedWeekYearToken(token) { + return weekYearTokenRE.test(token); +} +function warnOrThrowProtectedError(token, format2, input) { + const _message = message(token, format2, input); + console.warn(_message); + if (throwTokens.includes(token)) throw new RangeError(_message); +} +function message(token, format2, input) { + const subject = token[0] === "Y" ? "years" : "days of the month"; + return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; } -// node_modules/zod/v4/locales/fa.js -var error61 = () => { - const Sizable = { - string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// node_modules/date-fns/format.js +var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; +var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; +var escapedStringRegExp = /^'([^]*?)'?$/; +var doubleQuoteRegExp = /''/g; +var unescapedLatinCharacterRegExp = /[a-zA-Z]/; +function format(date9, formatStr, options) { + const defaultOptions2 = getDefaultOptions(); + const locale = options?.locale ?? defaultOptions2.locale ?? enUS; + const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; + const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0; + const originalDate = toDate(date9, options?.in); + if (!isValid(originalDate)) { + throw new RangeError("Invalid time value"); } - const FormatDictionary = { - regex: "\u0648\u0631\u0648\u062F\u06CC", - email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", - url: "URL", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", - time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - ipv4: "IPv4 \u0622\u062F\u0631\u0633", - ipv6: "IPv6 \u0622\u062F\u0631\u0633", - cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", - cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", - base64: "base64-encoded \u0631\u0634\u062A\u0647", - base64url: "base64url-encoded \u0631\u0634\u062A\u0647", - json_string: "JSON \u0631\u0634\u062A\u0647", - e164: "E.164 \u0639\u062F\u062F", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u06CC" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0639\u062F\u062F", - array: "\u0622\u0631\u0627\u06CC\u0647" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue5.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; - } - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; - } - case "invalid_value": - if (issue5.values.length === 1) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive2(issue5.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; - } - return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues2(issue5.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue5.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; - } - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue5.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} \u0628\u0627\u0634\u062F`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; - } - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} \u0628\u0627\u0634\u062F`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; - } - if (_issue.format === "ends_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; - } - if (_issue.format === "includes") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; - } - if (_issue.format === "regex") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; - } - return `${FormatDictionary[_issue.format] ?? issue5.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; - } - case "not_multiple_of": - return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue5.divisor} \u0628\u0627\u0634\u062F`; - case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue5.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue5.origin}`; - case "invalid_union": - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; - case "invalid_element": - return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue5.origin}`; - default: - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => { + const firstCharacter = substring[0]; + if (firstCharacter === "p" || firstCharacter === "P") { + const longFormatter = longFormatters[firstCharacter]; + return longFormatter(substring, locale.formatLong); } + return substring; + }).join("").match(formattingTokensRegExp).map((substring) => { + if (substring === "''") { + return { isToken: false, value: "'" }; + } + const firstCharacter = substring[0]; + if (firstCharacter === "'") { + return { isToken: false, value: cleanEscapedString(substring) }; + } + if (formatters[firstCharacter]) { + return { isToken: true, value: substring }; + } + if (firstCharacter.match(unescapedLatinCharacterRegExp)) { + throw new RangeError( + "Format string contains an unescaped latin alphabet character `" + firstCharacter + "`" + ); + } + return { isToken: false, value: substring }; + }); + if (locale.localize.preprocessor) { + parts = locale.localize.preprocessor(originalDate, parts); + } + const formatterOptions = { + firstWeekContainsDate, + weekStartsOn, + locale }; -}; -function fa_default2() { - return { - localeError: error61() - }; + return parts.map((part) => { + if (!part.isToken) return part.value; + const token = part.value; + if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) { + warnOrThrowProtectedError(token, formatStr, String(date9)); + } + const formatter = formatters[token[0]]; + return formatter(originalDate, token, locale.localize, formatterOptions); + }).join(""); +} +function cleanEscapedString(input) { + const matched = input.match(escapedStringRegExp); + if (!matched) { + return input; + } + return matched[1].replace(doubleQuoteRegExp, "'"); } -// node_modules/zod/v4/locales/fi.js -var error62 = () => { - const Sizable = { - string: { unit: "merkki\xE4", subject: "merkkijonon" }, - file: { unit: "tavua", subject: "tiedoston" }, - array: { unit: "alkiota", subject: "listan" }, - set: { unit: "alkiota", subject: "joukon" }, - number: { unit: "", subject: "luvun" }, - bigint: { unit: "", subject: "suuren kokonaisluvun" }, - int: { unit: "", subject: "kokonaisluvun" }, - date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// src/summary.ts +var Summary2 = class _Summary { + /** + * Summary constructor + * @param data - Array holding all results from all the testing farm jobs + * @param newData - The latest result from the current testing farm job + */ + constructor(data, newData) { + this.data = data; + this.newData = newData; + this.updateData(this.newData); } - const FormatDictionary = { - regex: "s\xE4\xE4nn\xF6llinen lauseke", - email: "s\xE4hk\xF6postiosoite", - url: "URL-osoite", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-aikaleima", - date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", - time: "ISO-aika", - duration: "ISO-kesto", - ipv4: "IPv4-osoite", - ipv6: "IPv6-osoite", - cidrv4: "IPv4-alue", - cidrv6: "IPv6-alue", - base64: "base64-koodattu merkkijono", - base64url: "base64url-koodattu merkkijono", - json_string: "JSON-merkkijono", - e164: "E.164-luku", - jwt: "JWT", - template_literal: "templaattimerkkijono" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Virheellinen tyyppi: odotettiin instanceof ${issue5.expected}, oli ${received}`; - } - return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive2(issue5.values[0])}`; - return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue5.maximum.toString()} ${sizing.unit}`.trim(); - } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue5.minimum.toString()} ${sizing.unit}`.trim(); - } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; - if (_issue.format === "regex") { - return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; - } - return `Virheellinen ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue5.divisor} monikerta`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return "Virheellinen avain tietueessa"; - case "invalid_union": - return "Virheellinen unioni"; - case "invalid_element": - return "Virheellinen arvo joukossa"; - default: - return `Virheellinen sy\xF6te`; + updateData(data) { + this.newData = data; + const { presence, index } = _Summary.isResultPresent(this.data, data.name); + if (presence && index !== void 0) { + this.data[index] = data; + } else { + this.data.push(data); } - }; -}; -function fi_default2() { - return { - localeError: error62() - }; -} - -// node_modules/zod/v4/locales/fr.js -var error63 = () => { - const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "entr\xE9e", - email: "adresse e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "date et heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", - jwt: "JWT", - template_literal: "entr\xE9e" - }; - const TypeDictionary = { - string: "cha\xEEne", - number: "nombre", - int: "entier", - boolean: "bool\xE9en", - bigint: "grand entier", - symbol: "symbole", - undefined: "ind\xE9fini", - null: "null", - never: "jamais", - void: "vide", - date: "date", - array: "tableau", - object: "objet", - tuple: "tuple", - record: "enregistrement", - map: "carte", - set: "ensemble", - file: "fichier", - nonoptional: "non-optionnel", - nan: "NaN", - function: "fonction" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Entr\xE9e invalide : instanceof ${issue5.expected} attendu, ${received} re\xE7u`; - } - return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Entr\xE9e invalide : ${stringifyPrimitive2(issue5.values[0])} attendu`; - return `Option invalide : une valeur parmi ${joinValues2(issue5.values, "|")} attendue`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Trop grand : ${TypeDictionary[issue5.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; - return `Trop grand : ${TypeDictionary[issue5.origin] ?? "valeur"} doit \xEAtre ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Trop petit : ${TypeDictionary[issue5.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - return `Trop petit : ${TypeDictionary[issue5.origin] ?? "valeur"} doit \xEAtre ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} invalide`; - } - case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue5.divisor}`; - case "unrecognized_keys": - return `Cl\xE9${issue5.keys.length > 1 ? "s" : ""} non reconnue${issue5.keys.length > 1 ? "s" : ""} : ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Cl\xE9 invalide dans ${issue5.origin}`; - case "invalid_union": - return "Entr\xE9e invalide"; - case "invalid_element": - return `Valeur invalide dans ${issue5.origin}`; - default: - return `Entr\xE9e invalide`; - } - }; -}; -function fr_default2() { - return { - localeError: error63() - }; -} - -// node_modules/zod/v4/locales/fr-CA.js -var error64 = () => { - const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + refreshData(data) { + this.data = data; + this.updateData(this.newData); } - const FormatDictionary = { - regex: "entr\xE9e", - email: "adresse courriel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "date-heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", - jwt: "JWT", - template_literal: "entr\xE9e" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Entr\xE9e invalide : attendu instanceof ${issue5.expected}, re\xE7u ${received}`; - } - return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Entr\xE9e invalide : attendu ${stringifyPrimitive2(issue5.values[0])}`; - return `Option invalide : attendu l'une des valeurs suivantes ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Trop grand : attendu que ${issue5.origin ?? "la valeur"} ait ${adj}${issue5.maximum.toString()} ${sizing.unit}`; - return `Trop grand : attendu que ${issue5.origin ?? "la valeur"} soit ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Trop petit : attendu que ${issue5.origin} ait ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Trop petit : attendu que ${issue5.origin} soit ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} invalide`; - } - case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue5.divisor}`; - case "unrecognized_keys": - return `Cl\xE9${issue5.keys.length > 1 ? "s" : ""} non reconnue${issue5.keys.length > 1 ? "s" : ""} : ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Cl\xE9 invalide dans ${issue5.origin}`; - case "invalid_union": - return "Entr\xE9e invalide"; - case "invalid_element": - return `Valeur invalide dans ${issue5.origin}`; - default: - return `Entr\xE9e invalide`; + getTableHeader() { + return [ + { data: "name", header: true }, + { data: "compose", header: true }, + { data: "arch", header: true }, + { data: "status", header: true }, + { data: "started (UTC)", header: true }, + { data: "time", header: true }, + { data: "logs", header: true } + ]; + } + getStatusIcon(status, outcome, infraError) { + if (infraError) { + return "\u26D4 infra error"; } - }; -}; -function fr_CA_default2() { - return { - localeError: error64() - }; -} - -// node_modules/zod/v4/locales/he.js -var error65 = () => { - const TypeNames = { - string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, - number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, - boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, - bigint: { label: "BigInt", gender: "m" }, - date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, - array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, - object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, - null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, - undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, - symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, - function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, - map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, - set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, - file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, - promise: { label: "Promise", gender: "m" }, - NaN: { label: "NaN", gender: "m" }, - unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, - value: { label: "\u05E2\u05E8\u05DA", gender: "m" } - }; - const Sizable = { - string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, - file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } - // no unit - }; - const typeEntry = (t) => t ? TypeNames[t] : void 0; - const typeLabel = (t) => { - const e = typeEntry(t); - if (e) - return e.label; - return t ?? TypeNames.unknown.label; - }; - const withDefinite = (t) => `\u05D4${typeLabel(t)}`; - const verbFor = (t) => { - const e = typeEntry(t); - const gender = e?.gender ?? "m"; - return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; - }; - const getSizing = (origin2) => { - if (!origin2) - return null; - return Sizable[origin2] ?? null; - }; - const FormatDictionary = { - regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, - url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, - emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, - uuid: { label: "UUID", gender: "m" }, - nanoid: { label: "nanoid", gender: "m" }, - guid: { label: "GUID", gender: "m" }, - cuid: { label: "cuid", gender: "m" }, - cuid2: { label: "cuid2", gender: "m" }, - ulid: { label: "ULID", gender: "m" }, - xid: { label: "XID", gender: "m" }, - ksuid: { label: "KSUID", gender: "m" }, - datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, - date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, - time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, - duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, - ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, - ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, - cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, - cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, - base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, - base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, - json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, - e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, - jwt: { label: "JWT", gender: "m" }, - ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expectedKey = issue5.expected; - const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue5.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; - } - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; - } - case "invalid_value": { - if (issue5.values.length === 1) { - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive2(issue5.values[0])}`; - } - const stringified = issue5.values.map((v) => stringifyPrimitive2(v)); - if (issue5.values.length === 2) { - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; - } - const lastValue = stringified[stringified.length - 1]; - const restValues = stringified.slice(0, -1).join(", "); - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; - } - case "too_big": { - const sizing = getSizing(issue5.origin); - const subject = withDefinite(issue5.origin ?? "value"); - if (issue5.origin === "string") { - return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue5.maximum.toString()} ${sizing?.unit ?? ""} ${issue5.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); - } - if (issue5.origin === "number") { - const comparison = issue5.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue5.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue5.maximum}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; - } - if (issue5.origin === "array" || issue5.origin === "set") { - const verb = issue5.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; - const comparison = issue5.inclusive ? `${issue5.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue5.maximum} ${sizing?.unit ?? ""}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); - } - const adj = issue5.inclusive ? "<=" : "<"; - const be = verbFor(issue5.origin ?? "value"); - if (sizing?.unit) { - return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.maximum.toString()} ${sizing.unit}`; - } - return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const sizing = getSizing(issue5.origin); - const subject = withDefinite(issue5.origin ?? "value"); - if (issue5.origin === "string") { - return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue5.minimum.toString()} ${sizing?.unit ?? ""} ${issue5.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); - } - if (issue5.origin === "number") { - const comparison = issue5.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue5.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue5.minimum}`; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; - } - if (issue5.origin === "array" || issue5.origin === "set") { - const verb = issue5.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; - if (issue5.minimum === 1 && issue5.inclusive) { - const singularPhrase = issue5.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; - } - const comparison = issue5.inclusive ? `${issue5.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue5.minimum} ${sizing?.unit ?? ""}`; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); - } - const adj = issue5.inclusive ? ">=" : ">"; - const be = verbFor(issue5.origin ?? "value"); - if (sizing?.unit) { - return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; - const nounEntry = FormatDictionary[_issue.format]; - const noun = nounEntry?.label ?? _issue.format; - const gender = nounEntry?.gender ?? "m"; - const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; - return `${noun} \u05DC\u05D0 ${adjective}`; - } - case "not_multiple_of": - return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue5.divisor}`; - case "unrecognized_keys": - return `\u05DE\u05E4\u05EA\u05D7${issue5.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue5.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": { - return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; - } - case "invalid_union": - return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; - case "invalid_element": { - const place = withDefinite(issue5.origin ?? "array"); - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; - } + let switchValue = status; + if (outcome) { + switchValue = outcome; + } + switch (switchValue) { + case "complete": + case "success": + case "passed": + return `\u2705 ${switchValue}`; + case "failed": + case "failure": + case "error": + return `\u274C ${switchValue}`; + case "new": + case "running": + case "queued": + case "pending": + return `\u23F3 ${switchValue}`; default: - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + return switchValue; } - }; + } + getTime(seconds) { + const hours = Math.floor(seconds / 3600); + const minutes = Math.floor(seconds % 3600 / 60); + const remainingSeconds = Math.round(seconds % 60); + return `${hours ? `${hours}h ` : ""}${minutes ? `${minutes}min ` : ""}${remainingSeconds ? `${remainingSeconds}s` : ""}`; + } + getTableRow(data) { + return [ + data.name, + data.compose || "<container image from plan>", + data.arch, + this.getStatusIcon(data.status, data.outcome, data.infrastructureFailure), + format(new Date(data.created), "dd.MM.yyyy HH:mm:ss"), + this.getTime(data.runTime), + data.results.join(" ") + ]; + } + getTableSummary() { + const table = summary.addTable([ + this.getTableHeader(), + ...this.data.map((rawRow) => this.getTableRow(rawRow)) + ]).stringify(); + summary.emptyBuffer(); + return table; + } + async setJobSummary() { + await summary.addHeading("Testing Farm as a GitHub Action summary").addTable([this.getTableHeader(), this.getTableRow(this.newData)]).write(); + } + static isResultPresent(data, name) { + const index = data.findIndex((result) => result.name === name); + return { presence: index !== -1, index: index !== -1 ? index : void 0 }; + } }; -function he_default2() { - return { - localeError: error65() - }; -} -// node_modules/zod/v4/locales/hr.js -var error66 = () => { - const Sizable = { - string: { unit: "znakova", verb: "imati" }, - file: { unit: "bajtova", verb: "imati" }, - array: { unit: "stavki", verb: "imati" }, - set: { unit: "stavki", verb: "imati" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "unos", - email: "email adresa", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum i vrijeme", - date: "ISO datum", - time: "ISO vrijeme", - duration: "ISO trajanje", - ipv4: "IPv4 adresa", - ipv6: "IPv6 adresa", - cidrv4: "IPv4 raspon", - cidrv6: "IPv6 raspon", - base64: "base64 kodirani tekst", - base64url: "base64url kodirani tekst", - json_string: "JSON tekst", - e164: "E.164 broj", - jwt: "JWT", - template_literal: "unos" - }; - const TypeDictionary = { - nan: "NaN", - string: "tekst", - number: "broj", - boolean: "boolean", - array: "niz", - object: "objekt", - set: "skup", - file: "datoteka", - date: "datum", - bigint: "bigint", - symbol: "simbol", - undefined: "undefined", - null: "null", - function: "funkcija", - map: "mapa" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Neispravan unos: o\u010Dekuje se instanceof ${issue5.expected}, a primljeno je ${received}`; - } - return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive2(issue5.values[0])}`; - return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) - return `Preveliko: o\u010Dekivano da ${origin2 ?? "vrijednost"} ima ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elemenata"}`; - return `Preveliko: o\u010Dekivano da ${origin2 ?? "vrijednost"} bude ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - if (sizing) { - return `Premalo: o\u010Dekivano da ${origin2} ima ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Premalo: o\u010Dekivano da ${origin2} bude ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`; - return `Neispravna ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue5.divisor}`; - case "unrecognized_keys": - return `Neprepoznat${issue5.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Neispravan klju\u010D u ${TypeDictionary[issue5.origin] ?? issue5.origin}`; - case "invalid_union": - return "Neispravan unos"; - case "invalid_element": - return `Neispravna vrijednost u ${TypeDictionary[issue5.origin] ?? issue5.origin}`; - default: - return `Neispravan unos`; - } - }; -}; -function hr_default() { - return { - localeError: error66() - }; -} - -// node_modules/zod/v4/locales/hu.js -var error67 = () => { - const Sizable = { - string: { unit: "karakter", verb: "legyen" }, - file: { unit: "byte", verb: "legyen" }, - array: { unit: "elem", verb: "legyen" }, - set: { unit: "elem", verb: "legyen" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "bemenet", - email: "email c\xEDm", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO id\u0151b\xE9lyeg", - date: "ISO d\xE1tum", - time: "ISO id\u0151", - duration: "ISO id\u0151intervallum", - ipv4: "IPv4 c\xEDm", - ipv6: "IPv6 c\xEDm", - cidrv4: "IPv4 tartom\xE1ny", - cidrv6: "IPv6 tartom\xE1ny", - base64: "base64-k\xF3dolt string", - base64url: "base64url-k\xF3dolt string", - json_string: "JSON string", - e164: "E.164 sz\xE1m", - jwt: "JWT", - template_literal: "bemenet" - }; - const TypeDictionary = { - nan: "NaN", - number: "sz\xE1m", - array: "t\xF6mb" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue5.expected}, a kapott \xE9rt\xE9k ${received}`; - } - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive2(issue5.values[0])}`; - return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `T\xFAl nagy: ${issue5.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elem"}`; - return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue5.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue5.origin} m\xE9rete t\xFAl kicsi ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue5.origin} t\xFAl kicsi ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; - if (_issue.format === "ends_with") - return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; - if (_issue.format === "includes") - return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; - if (_issue.format === "regex") - return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; - return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue5.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; - case "unrecognized_keys": - return `Ismeretlen kulcs${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue5.origin}`; - case "invalid_union": - return "\xC9rv\xE9nytelen bemenet"; - case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue5.origin}`; - default: - return `\xC9rv\xE9nytelen bemenet`; - } - }; -}; -function hu_default2() { - return { - localeError: error67() - }; -} +// node_modules/zod/v4/classic/external.js +var external_exports2 = {}; +__export(external_exports2, { + $brand: () => $brand2, + $input: () => $input2, + $output: () => $output2, + NEVER: () => NEVER2, + TimePrecision: () => TimePrecision2, + ZodAny: () => ZodAny2, + ZodArray: () => ZodArray2, + ZodBase64: () => ZodBase642, + ZodBase64URL: () => ZodBase64URL2, + ZodBigInt: () => ZodBigInt2, + ZodBigIntFormat: () => ZodBigIntFormat2, + ZodBoolean: () => ZodBoolean2, + ZodCIDRv4: () => ZodCIDRv42, + ZodCIDRv6: () => ZodCIDRv62, + ZodCUID: () => ZodCUID3, + ZodCUID2: () => ZodCUID22, + ZodCatch: () => ZodCatch2, + ZodCodec: () => ZodCodec2, + ZodCustom: () => ZodCustom2, + ZodCustomStringFormat: () => ZodCustomStringFormat2, + ZodDate: () => ZodDate2, + ZodDefault: () => ZodDefault2, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, + ZodE164: () => ZodE1642, + ZodEmail: () => ZodEmail2, + ZodEmoji: () => ZodEmoji2, + ZodEnum: () => ZodEnum2, + ZodError: () => ZodError2, + ZodExactOptional: () => ZodExactOptional2, + ZodFile: () => ZodFile2, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2, + ZodFunction: () => ZodFunction2, + ZodGUID: () => ZodGUID2, + ZodIPv4: () => ZodIPv42, + ZodIPv6: () => ZodIPv62, + ZodISODate: () => ZodISODate2, + ZodISODateTime: () => ZodISODateTime2, + ZodISODuration: () => ZodISODuration2, + ZodISOTime: () => ZodISOTime2, + ZodIntersection: () => ZodIntersection2, + ZodIssueCode: () => ZodIssueCode2, + ZodJWT: () => ZodJWT2, + ZodKSUID: () => ZodKSUID2, + ZodLazy: () => ZodLazy2, + ZodLiteral: () => ZodLiteral2, + ZodMAC: () => ZodMAC2, + ZodMap: () => ZodMap2, + ZodNaN: () => ZodNaN2, + ZodNanoID: () => ZodNanoID2, + ZodNever: () => ZodNever2, + ZodNonOptional: () => ZodNonOptional2, + ZodNull: () => ZodNull2, + ZodNullable: () => ZodNullable2, + ZodNumber: () => ZodNumber2, + ZodNumberFormat: () => ZodNumberFormat2, + ZodObject: () => ZodObject2, + ZodOptional: () => ZodOptional2, + ZodPipe: () => ZodPipe2, + ZodPrefault: () => ZodPrefault2, + ZodPreprocess: () => ZodPreprocess, + ZodPromise: () => ZodPromise2, + ZodReadonly: () => ZodReadonly2, + ZodRealError: () => ZodRealError2, + ZodRecord: () => ZodRecord2, + ZodSet: () => ZodSet2, + ZodString: () => ZodString2, + ZodStringFormat: () => ZodStringFormat2, + ZodSuccess: () => ZodSuccess2, + ZodSymbol: () => ZodSymbol2, + ZodTemplateLiteral: () => ZodTemplateLiteral2, + ZodTransform: () => ZodTransform2, + ZodTuple: () => ZodTuple2, + ZodType: () => ZodType2, + ZodULID: () => ZodULID2, + ZodURL: () => ZodURL2, + ZodUUID: () => ZodUUID2, + ZodUndefined: () => ZodUndefined2, + ZodUnion: () => ZodUnion2, + ZodUnknown: () => ZodUnknown2, + ZodVoid: () => ZodVoid2, + ZodXID: () => ZodXID2, + ZodXor: () => ZodXor2, + _ZodString: () => _ZodString2, + _default: () => _default4, + _function: () => _function2, + any: () => any2, + array: () => array2, + base64: () => base644, + base64url: () => base64url4, + bigint: () => bigint5, + boolean: () => boolean5, + catch: () => _catch4, + check: () => check2, + cidrv4: () => cidrv44, + cidrv6: () => cidrv64, + clone: () => clone2, + codec: () => codec2, + coerce: () => coerce_exports2, + config: () => config2, + core: () => core_exports4, + cuid: () => cuid5, + cuid2: () => cuid24, + custom: () => custom2, + date: () => date7, + decode: () => decode4, + decodeAsync: () => decodeAsync4, + describe: () => describe4, + discriminatedUnion: () => discriminatedUnion2, + e164: () => e1644, + email: () => email4, + emoji: () => emoji4, + encode: () => encode6, + encodeAsync: () => encodeAsync4, + endsWith: () => _endsWith2, + enum: () => _enum4, + exactOptional: () => exactOptional2, + file: () => file2, + flattenError: () => flattenError2, + float32: () => float322, + float64: () => float642, + formatError: () => formatError2, + fromJSONSchema: () => fromJSONSchema2, + function: () => _function2, + getErrorMap: () => getErrorMap2, + globalRegistry: () => globalRegistry2, + gt: () => _gt2, + gte: () => _gte2, + guid: () => guid4, + hash: () => hash2, + hex: () => hex4, + hostname: () => hostname4, + httpUrl: () => httpUrl2, + includes: () => _includes2, + instanceof: () => _instanceof2, + int: () => int2, + int32: () => int322, + int64: () => int642, + intersection: () => intersection2, + invertCodec: () => invertCodec, + ipv4: () => ipv44, + ipv6: () => ipv64, + iso: () => iso_exports2, + json: () => json2, + jwt: () => jwt2, + keyof: () => keyof2, + ksuid: () => ksuid4, + lazy: () => lazy2, + length: () => _length2, + literal: () => literal2, + locales: () => locales_exports2, + looseObject: () => looseObject2, + looseRecord: () => looseRecord2, + lowercase: () => _lowercase2, + lt: () => _lt2, + lte: () => _lte2, + mac: () => mac4, + map: () => map2, + maxLength: () => _maxLength2, + maxSize: () => _maxSize2, + meta: () => meta4, + mime: () => _mime2, + minLength: () => _minLength2, + minSize: () => _minSize2, + multipleOf: () => _multipleOf2, + nan: () => nan2, + nanoid: () => nanoid4, + nativeEnum: () => nativeEnum2, + negative: () => _negative2, + never: () => never2, + nonnegative: () => _nonnegative2, + nonoptional: () => nonoptional2, + nonpositive: () => _nonpositive2, + normalize: () => _normalize2, + null: () => _null6, + nullable: () => nullable2, + nullish: () => nullish4, + number: () => number5, + object: () => object2, + optional: () => optional2, + overwrite: () => _overwrite2, + parse: () => parse4, + parseAsync: () => parseAsync4, + partialRecord: () => partialRecord2, + pipe: () => pipe2, + positive: () => _positive2, + prefault: () => prefault2, + preprocess: () => preprocess2, + prettifyError: () => prettifyError2, + promise: () => promise2, + property: () => _property2, + readonly: () => readonly2, + record: () => record2, + refine: () => refine2, + regex: () => _regex2, + regexes: () => regexes_exports2, + registry: () => registry2, + safeDecode: () => safeDecode4, + safeDecodeAsync: () => safeDecodeAsync4, + safeEncode: () => safeEncode4, + safeEncodeAsync: () => safeEncodeAsync4, + safeParse: () => safeParse4, + safeParseAsync: () => safeParseAsync4, + set: () => set2, + setErrorMap: () => setErrorMap2, + size: () => _size2, + slugify: () => _slugify2, + startsWith: () => _startsWith2, + strictObject: () => strictObject2, + string: () => string5, + stringFormat: () => stringFormat2, + stringbool: () => stringbool2, + success: () => success2, + superRefine: () => superRefine2, + symbol: () => symbol2, + templateLiteral: () => templateLiteral2, + toJSONSchema: () => toJSONSchema2, + toLowerCase: () => _toLowerCase2, + toUpperCase: () => _toUpperCase2, + transform: () => transform2, + treeifyError: () => treeifyError2, + trim: () => _trim2, + tuple: () => tuple2, + uint32: () => uint322, + uint64: () => uint642, + ulid: () => ulid4, + undefined: () => _undefined6, + union: () => union2, + unknown: () => unknown2, + uppercase: () => _uppercase2, + url: () => url3, + util: () => util_exports2, + uuid: () => uuid5, + uuidv4: () => uuidv42, + uuidv6: () => uuidv62, + uuidv7: () => uuidv72, + void: () => _void4, + xid: () => xid4, + xor: () => xor2 +}); -// node_modules/zod/v4/locales/hy.js -function getArmenianPlural2(count, one, many) { - return Math.abs(count) === 1 ? one : many; -} -function withDefiniteArticle2(word) { - if (!word) - return ""; - const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; - const lastChar = word[word.length - 1]; - return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); -} -var error68 = () => { - const Sizable = { - string: { - unit: { - one: "\u0576\u0577\u0561\u0576", - many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - file: { - unit: { - one: "\u0562\u0561\u0575\u0569", - many: "\u0562\u0561\u0575\u0569\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - array: { - unit: { - one: "\u057F\u0561\u0580\u0580", - many: "\u057F\u0561\u0580\u0580\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - set: { - unit: { - one: "\u057F\u0561\u0580\u0580", - many: "\u057F\u0561\u0580\u0580\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0574\u0578\u0582\u057F\u0584", - email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", - url: "URL", - emoji: "\u0567\u0574\u0578\u057B\u056B", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", - date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", - time: "ISO \u056A\u0561\u0574", - duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", - ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", - ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", - cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", - cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", - base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", - base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", - json_string: "JSON \u057F\u0578\u0572", - e164: "E.164 \u0570\u0561\u0574\u0561\u0580", - jwt: "JWT", - template_literal: "\u0574\u0578\u0582\u057F\u0584" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0569\u056B\u057E", - array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue5.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; - } - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive2(issue5.values[1])}`; - return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const maxValue = Number(issue5.maximum); - const unit = getArmenianPlural2(maxValue, sizing.unit.one, sizing.unit.many); - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue5.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue5.maximum.toString()} ${unit}`; - } - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue5.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const minValue = Number(issue5.minimum); - const unit = getArmenianPlural2(minValue, sizing.unit.one, sizing.unit.many); - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue5.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue5.minimum.toString()} ${unit}`; - } - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue5.origin)} \u056C\u056B\u0576\u056B ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; - if (_issue.format === "ends_with") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; - if (_issue.format === "includes") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; - return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue5.divisor}-\u056B`; - case "unrecognized_keys": - return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue5.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle2(issue5.origin)}-\u0578\u0582\u0574`; - case "invalid_union": - return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; - case "invalid_element": - return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle2(issue5.origin)}-\u0578\u0582\u0574`; - default: - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; - } - }; -}; -function hy_default2() { - return { - localeError: error68() - }; -} +// node_modules/zod/v4/core/index.js +var core_exports4 = {}; +__export(core_exports4, { + $ZodAny: () => $ZodAny2, + $ZodArray: () => $ZodArray2, + $ZodAsyncError: () => $ZodAsyncError2, + $ZodBase64: () => $ZodBase642, + $ZodBase64URL: () => $ZodBase64URL2, + $ZodBigInt: () => $ZodBigInt2, + $ZodBigIntFormat: () => $ZodBigIntFormat2, + $ZodBoolean: () => $ZodBoolean2, + $ZodCIDRv4: () => $ZodCIDRv42, + $ZodCIDRv6: () => $ZodCIDRv62, + $ZodCUID: () => $ZodCUID3, + $ZodCUID2: () => $ZodCUID22, + $ZodCatch: () => $ZodCatch2, + $ZodCheck: () => $ZodCheck2, + $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat2, + $ZodCheckEndsWith: () => $ZodCheckEndsWith2, + $ZodCheckGreaterThan: () => $ZodCheckGreaterThan2, + $ZodCheckIncludes: () => $ZodCheckIncludes2, + $ZodCheckLengthEquals: () => $ZodCheckLengthEquals2, + $ZodCheckLessThan: () => $ZodCheckLessThan2, + $ZodCheckLowerCase: () => $ZodCheckLowerCase2, + $ZodCheckMaxLength: () => $ZodCheckMaxLength2, + $ZodCheckMaxSize: () => $ZodCheckMaxSize2, + $ZodCheckMimeType: () => $ZodCheckMimeType2, + $ZodCheckMinLength: () => $ZodCheckMinLength2, + $ZodCheckMinSize: () => $ZodCheckMinSize2, + $ZodCheckMultipleOf: () => $ZodCheckMultipleOf2, + $ZodCheckNumberFormat: () => $ZodCheckNumberFormat2, + $ZodCheckOverwrite: () => $ZodCheckOverwrite2, + $ZodCheckProperty: () => $ZodCheckProperty2, + $ZodCheckRegex: () => $ZodCheckRegex2, + $ZodCheckSizeEquals: () => $ZodCheckSizeEquals2, + $ZodCheckStartsWith: () => $ZodCheckStartsWith2, + $ZodCheckStringFormat: () => $ZodCheckStringFormat2, + $ZodCheckUpperCase: () => $ZodCheckUpperCase2, + $ZodCodec: () => $ZodCodec2, + $ZodCustom: () => $ZodCustom2, + $ZodCustomStringFormat: () => $ZodCustomStringFormat2, + $ZodDate: () => $ZodDate2, + $ZodDefault: () => $ZodDefault2, + $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion2, + $ZodE164: () => $ZodE1642, + $ZodEmail: () => $ZodEmail2, + $ZodEmoji: () => $ZodEmoji2, + $ZodEncodeError: () => $ZodEncodeError2, + $ZodEnum: () => $ZodEnum2, + $ZodError: () => $ZodError2, + $ZodExactOptional: () => $ZodExactOptional2, + $ZodFile: () => $ZodFile2, + $ZodFunction: () => $ZodFunction2, + $ZodGUID: () => $ZodGUID2, + $ZodIPv4: () => $ZodIPv42, + $ZodIPv6: () => $ZodIPv62, + $ZodISODate: () => $ZodISODate2, + $ZodISODateTime: () => $ZodISODateTime2, + $ZodISODuration: () => $ZodISODuration2, + $ZodISOTime: () => $ZodISOTime2, + $ZodIntersection: () => $ZodIntersection2, + $ZodJWT: () => $ZodJWT2, + $ZodKSUID: () => $ZodKSUID2, + $ZodLazy: () => $ZodLazy2, + $ZodLiteral: () => $ZodLiteral2, + $ZodMAC: () => $ZodMAC2, + $ZodMap: () => $ZodMap2, + $ZodNaN: () => $ZodNaN2, + $ZodNanoID: () => $ZodNanoID2, + $ZodNever: () => $ZodNever2, + $ZodNonOptional: () => $ZodNonOptional2, + $ZodNull: () => $ZodNull2, + $ZodNullable: () => $ZodNullable2, + $ZodNumber: () => $ZodNumber2, + $ZodNumberFormat: () => $ZodNumberFormat2, + $ZodObject: () => $ZodObject2, + $ZodObjectJIT: () => $ZodObjectJIT2, + $ZodOptional: () => $ZodOptional2, + $ZodPipe: () => $ZodPipe2, + $ZodPrefault: () => $ZodPrefault2, + $ZodPreprocess: () => $ZodPreprocess, + $ZodPromise: () => $ZodPromise2, + $ZodReadonly: () => $ZodReadonly2, + $ZodRealError: () => $ZodRealError2, + $ZodRecord: () => $ZodRecord2, + $ZodRegistry: () => $ZodRegistry2, + $ZodSet: () => $ZodSet2, + $ZodString: () => $ZodString2, + $ZodStringFormat: () => $ZodStringFormat2, + $ZodSuccess: () => $ZodSuccess2, + $ZodSymbol: () => $ZodSymbol2, + $ZodTemplateLiteral: () => $ZodTemplateLiteral2, + $ZodTransform: () => $ZodTransform2, + $ZodTuple: () => $ZodTuple2, + $ZodType: () => $ZodType2, + $ZodULID: () => $ZodULID2, + $ZodURL: () => $ZodURL2, + $ZodUUID: () => $ZodUUID2, + $ZodUndefined: () => $ZodUndefined2, + $ZodUnion: () => $ZodUnion2, + $ZodUnknown: () => $ZodUnknown2, + $ZodVoid: () => $ZodVoid2, + $ZodXID: () => $ZodXID2, + $ZodXor: () => $ZodXor2, + $brand: () => $brand2, + $constructor: () => $constructor2, + $input: () => $input2, + $output: () => $output2, + Doc: () => Doc2, + JSONSchema: () => json_schema_exports2, + JSONSchemaGenerator: () => JSONSchemaGenerator2, + NEVER: () => NEVER2, + TimePrecision: () => TimePrecision2, + _any: () => _any2, + _array: () => _array2, + _base64: () => _base642, + _base64url: () => _base64url2, + _bigint: () => _bigint2, + _boolean: () => _boolean2, + _catch: () => _catch3, + _check: () => _check2, + _cidrv4: () => _cidrv42, + _cidrv6: () => _cidrv62, + _coercedBigint: () => _coercedBigint2, + _coercedBoolean: () => _coercedBoolean2, + _coercedDate: () => _coercedDate2, + _coercedNumber: () => _coercedNumber2, + _coercedString: () => _coercedString2, + _cuid: () => _cuid3, + _cuid2: () => _cuid22, + _custom: () => _custom2, + _date: () => _date2, + _decode: () => _decode2, + _decodeAsync: () => _decodeAsync2, + _default: () => _default3, + _discriminatedUnion: () => _discriminatedUnion2, + _e164: () => _e1642, + _email: () => _email2, + _emoji: () => _emoji4, + _encode: () => _encode2, + _encodeAsync: () => _encodeAsync2, + _endsWith: () => _endsWith2, + _enum: () => _enum3, + _file: () => _file2, + _float32: () => _float322, + _float64: () => _float642, + _gt: () => _gt2, + _gte: () => _gte2, + _guid: () => _guid2, + _includes: () => _includes2, + _int: () => _int2, + _int32: () => _int322, + _int64: () => _int642, + _intersection: () => _intersection2, + _ipv4: () => _ipv42, + _ipv6: () => _ipv62, + _isoDate: () => _isoDate2, + _isoDateTime: () => _isoDateTime2, + _isoDuration: () => _isoDuration2, + _isoTime: () => _isoTime2, + _jwt: () => _jwt2, + _ksuid: () => _ksuid2, + _lazy: () => _lazy2, + _length: () => _length2, + _literal: () => _literal2, + _lowercase: () => _lowercase2, + _lt: () => _lt2, + _lte: () => _lte2, + _mac: () => _mac2, + _map: () => _map2, + _max: () => _lte2, + _maxLength: () => _maxLength2, + _maxSize: () => _maxSize2, + _mime: () => _mime2, + _min: () => _gte2, + _minLength: () => _minLength2, + _minSize: () => _minSize2, + _multipleOf: () => _multipleOf2, + _nan: () => _nan2, + _nanoid: () => _nanoid2, + _nativeEnum: () => _nativeEnum2, + _negative: () => _negative2, + _never: () => _never2, + _nonnegative: () => _nonnegative2, + _nonoptional: () => _nonoptional2, + _nonpositive: () => _nonpositive2, + _normalize: () => _normalize2, + _null: () => _null5, + _nullable: () => _nullable2, + _number: () => _number2, + _optional: () => _optional2, + _overwrite: () => _overwrite2, + _parse: () => _parse2, + _parseAsync: () => _parseAsync2, + _pipe: () => _pipe2, + _positive: () => _positive2, + _promise: () => _promise2, + _property: () => _property2, + _readonly: () => _readonly2, + _record: () => _record2, + _refine: () => _refine2, + _regex: () => _regex2, + _safeDecode: () => _safeDecode2, + _safeDecodeAsync: () => _safeDecodeAsync2, + _safeEncode: () => _safeEncode2, + _safeEncodeAsync: () => _safeEncodeAsync2, + _safeParse: () => _safeParse2, + _safeParseAsync: () => _safeParseAsync2, + _set: () => _set2, + _size: () => _size2, + _slugify: () => _slugify2, + _startsWith: () => _startsWith2, + _string: () => _string2, + _stringFormat: () => _stringFormat2, + _stringbool: () => _stringbool2, + _success: () => _success2, + _superRefine: () => _superRefine2, + _symbol: () => _symbol2, + _templateLiteral: () => _templateLiteral2, + _toLowerCase: () => _toLowerCase2, + _toUpperCase: () => _toUpperCase2, + _transform: () => _transform2, + _trim: () => _trim2, + _tuple: () => _tuple2, + _uint32: () => _uint322, + _uint64: () => _uint642, + _ulid: () => _ulid2, + _undefined: () => _undefined5, + _union: () => _union2, + _unknown: () => _unknown2, + _uppercase: () => _uppercase2, + _url: () => _url2, + _uuid: () => _uuid2, + _uuidv4: () => _uuidv42, + _uuidv6: () => _uuidv62, + _uuidv7: () => _uuidv72, + _void: () => _void3, + _xid: () => _xid2, + _xor: () => _xor2, + clone: () => clone2, + config: () => config2, + createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod2, + createToJSONSchemaMethod: () => createToJSONSchemaMethod2, + decode: () => decode3, + decodeAsync: () => decodeAsync3, + describe: () => describe3, + encode: () => encode5, + encodeAsync: () => encodeAsync3, + extractDefs: () => extractDefs2, + finalize: () => finalize2, + flattenError: () => flattenError2, + formatError: () => formatError2, + globalConfig: () => globalConfig2, + globalRegistry: () => globalRegistry2, + initializeContext: () => initializeContext2, + isValidBase64: () => isValidBase642, + isValidBase64URL: () => isValidBase64URL2, + isValidJWT: () => isValidJWT2, + locales: () => locales_exports2, + meta: () => meta3, + parse: () => parse3, + parseAsync: () => parseAsync3, + prettifyError: () => prettifyError2, + process: () => process3, + regexes: () => regexes_exports2, + registry: () => registry2, + safeDecode: () => safeDecode3, + safeDecodeAsync: () => safeDecodeAsync3, + safeEncode: () => safeEncode3, + safeEncodeAsync: () => safeEncodeAsync3, + safeParse: () => safeParse3, + safeParseAsync: () => safeParseAsync3, + toDotPath: () => toDotPath2, + toJSONSchema: () => toJSONSchema2, + treeifyError: () => treeifyError2, + util: () => util_exports2, + version: () => version2 +}); -// node_modules/zod/v4/locales/id.js -var error69 = () => { - const Sizable = { - string: { unit: "karakter", verb: "memiliki" }, - file: { unit: "byte", verb: "memiliki" }, - array: { unit: "item", verb: "memiliki" }, - set: { unit: "item", verb: "memiliki" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "alamat email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tanggal dan waktu format ISO", - date: "tanggal format ISO", - time: "jam format ISO", - duration: "durasi format ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "rentang alamat IPv4", - cidrv6: "rentang alamat IPv6", - base64: "string dengan enkode base64", - base64url: "string dengan enkode base64url", - json_string: "string JSON", - e164: "angka E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Input tidak valid: diharapkan instanceof ${issue5.expected}, diterima ${received}`; - } - return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Input tidak valid: diharapkan ${stringifyPrimitive2(issue5.values[0])}`; - return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Terlalu besar: diharapkan ${issue5.origin ?? "value"} memiliki ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: diharapkan ${issue5.origin ?? "value"} menjadi ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Terlalu kecil: diharapkan ${issue5.origin} memiliki ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: diharapkan ${issue5.origin} menjadi ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - return `String tidak valid: harus menyertakan "${_issue.includes}"`; - if (_issue.format === "regex") - return `String tidak valid: harus sesuai pola ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} tidak valid`; +// node_modules/zod/v4/core/core.js +var _a2; +var NEVER2 = /* @__PURE__ */ Object.freeze({ + status: "aborted" +}); +// @__NO_SIDE_EFFECTS__ +function $constructor2(name, initializer5, params) { + function init(inst, def) { + if (!inst._zod) { + Object.defineProperty(inst, "_zod", { + value: { + def, + constr: _, + traits: /* @__PURE__ */ new Set() + }, + enumerable: false + }); + } + if (inst._zod.traits.has(name)) { + return; + } + inst._zod.traits.add(name); + initializer5(inst, def); + const proto = _.prototype; + const keys = Object.keys(proto); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + if (!(k in inst)) { + inst[k] = proto[k].bind(inst); } - case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue5.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali ${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak valid di ${issue5.origin}`; - case "invalid_union": - return "Input tidak valid"; - case "invalid_element": - return `Nilai tidak valid di ${issue5.origin}`; - default: - return `Input tidak valid`; } - }; -}; -function id_default2() { - return { - localeError: error69() - }; -} - -// node_modules/zod/v4/locales/is.js -var error70 = () => { - const Sizable = { - string: { unit: "stafi", verb: "a\xF0 hafa" }, - file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, - array: { unit: "hluti", verb: "a\xF0 hafa" }, - set: { unit: "hluti", verb: "a\xF0 hafa" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "gildi", - email: "netfang", - url: "vefsl\xF3\xF0", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dagsetning og t\xEDmi", - date: "ISO dagsetning", - time: "ISO t\xEDmi", - duration: "ISO t\xEDmalengd", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded strengur", - base64url: "base64url-encoded strengur", - json_string: "JSON strengur", - e164: "E.164 t\xF6lugildi", - jwt: "JWT", - template_literal: "gildi" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\xFAmer", - array: "fylki" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue5.expected}`; - } - return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive2(issue5.values[0])}`; - return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin ?? "gildi"} hafi ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "hluti"}`; - return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin ?? "gildi"} s\xE9 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin} hafi ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue5.origin} s\xE9 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; - if (_issue.format === "regex") - return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; - return `Rangt ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue5.divisor}`; - case "unrecognized_keys": - return `\xD3\xFEekkt ${issue5.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Rangur lykill \xED ${issue5.origin}`; - case "invalid_union": - return "Rangt gildi"; - case "invalid_element": - return `Rangt gildi \xED ${issue5.origin}`; - default: - return `Rangt gildi`; + const Parent = params?.Parent ?? Object; + class Definition extends Parent { + } + Object.defineProperty(Definition, "name", { value: name }); + function _(def) { + var _a4; + const inst = params?.Parent ? new Definition() : this; + init(inst, def); + (_a4 = inst._zod).deferred ?? (_a4.deferred = []); + for (const fn of inst._zod.deferred) { + fn(); } - }; -}; -function is_default2() { - return { - localeError: error70() - }; -} - -// node_modules/zod/v4/locales/it.js -var error71 = () => { - const Sizable = { - string: { unit: "caratteri", verb: "avere" }, - file: { unit: "byte", verb: "avere" }, - array: { unit: "elementi", verb: "avere" }, - set: { unit: "elementi", verb: "avere" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + return inst; } - const FormatDictionary = { - regex: "input", - email: "indirizzo email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e ora ISO", - date: "data ISO", - time: "ora ISO", - duration: "durata ISO", - ipv4: "indirizzo IPv4", - ipv6: "indirizzo IPv6", - cidrv4: "intervallo IPv4", - cidrv6: "intervallo IPv6", - base64: "stringa codificata in base64", - base64url: "URL codificata in base64", - json_string: "stringa JSON", - e164: "numero E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "numero", - array: "vettore" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Input non valido: atteso instanceof ${issue5.expected}, ricevuto ${received}`; - } - return `Input non valido: atteso ${expected}, ricevuto ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Input non valido: atteso ${stringifyPrimitive2(issue5.values[0])}`; - return `Opzione non valida: atteso uno tra ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Troppo grande: ${issue5.origin ?? "valore"} deve avere ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementi"}`; - return `Troppo grande: ${issue5.origin ?? "valore"} deve essere ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Troppo piccolo: ${issue5.origin} deve avere ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Troppo piccolo: ${issue5.origin} deve essere ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Stringa non valida: deve terminare con "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Stringa non valida: deve includere "${_issue.includes}"`; - if (_issue.format === "regex") - return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; - return `Input non valido: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue5.divisor}`; - case "unrecognized_keys": - return `Chiav${issue5.keys.length > 1 ? "i" : "e"} non riconosciut${issue5.keys.length > 1 ? "e" : "a"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Chiave non valida in ${issue5.origin}`; - case "invalid_union": - return "Input non valido"; - case "invalid_element": - return `Valore non valido in ${issue5.origin}`; - default: - return `Input non valido`; + 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); } - }; -}; -function it_default2() { - return { - localeError: error71() - }; + }); + Object.defineProperty(_, "name", { value: name }); + return _; } - -// node_modules/zod/v4/locales/ja.js -var error72 = () => { - const Sizable = { - string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, - file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, - array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, - set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var $brand2 = /* @__PURE__ */ Symbol("zod_brand"); +var $ZodAsyncError2 = class extends Error { + constructor() { + super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); } - const FormatDictionary = { - regex: "\u5165\u529B\u5024", - email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", - url: "URL", - emoji: "\u7D75\u6587\u5B57", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u6642", - date: "ISO\u65E5\u4ED8", - time: "ISO\u6642\u523B", - duration: "ISO\u671F\u9593", - ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", - ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", - cidrv4: "IPv4\u7BC4\u56F2", - cidrv6: "IPv6\u7BC4\u56F2", - base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - json_string: "JSON\u6587\u5B57\u5217", - e164: "E.164\u756A\u53F7", - jwt: "JWT", - template_literal: "\u5165\u529B\u5024" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u6570\u5024", - array: "\u914D\u5217" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue5.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; - } - return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive2(issue5.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; - return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues2(issue5.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - case "too_big": { - const adj = issue5.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue5.origin ?? "\u5024"}\u306F${issue5.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue5.origin ?? "\u5024"}\u306F${issue5.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - } - case "too_small": { - const adj = issue5.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue5.origin}\u306F${issue5.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue5.origin}\u306F${issue5.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "ends_with") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "includes") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "regex") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u7121\u52B9\u306A\u6570\u5024: ${issue5.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - case "unrecognized_keys": - return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue5.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues2(issue5.keys, "\u3001")}`; - case "invalid_key": - return `${issue5.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; - case "invalid_union": - return "\u7121\u52B9\u306A\u5165\u529B"; - case "invalid_element": - return `${issue5.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; - default: - return `\u7121\u52B9\u306A\u5165\u529B`; - } - }; }; -function ja_default2() { - return { - localeError: error72() - }; +var $ZodEncodeError2 = class extends Error { + constructor(name) { + super(`Encountered unidirectional transform during encode: ${name}`); + this.name = "ZodEncodeError"; + } +}; +(_a2 = globalThis).__zod_globalConfig ?? (_a2.__zod_globalConfig = {}); +var globalConfig2 = globalThis.__zod_globalConfig; +function config2(newConfig) { + if (newConfig) + Object.assign(globalConfig2, newConfig); + return globalConfig2; } -// node_modules/zod/v4/locales/ka.js -var error73 = () => { - const Sizable = { - string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", - email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - url: "URL", - emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", - date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", - time: "\u10D3\u10E0\u10DD", - duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", - ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", - cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", - base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8", - base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8", - json_string: "JSON \u10D5\u10D4\u10DA\u10D8", - e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", - jwt: "JWT", - template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", - string: "\u10D5\u10D4\u10DA\u10D8", - boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", - function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", - array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue5.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; - } - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive2(issue5.values[0])}`; - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues2(issue5.values, "|")}-\u10D3\u10D0\u10DC`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit}`; - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue5.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; - } - if (_issue.format === "ends_with") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; - if (_issue.format === "includes") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; - if (_issue.format === "regex") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue5.format}`; +// node_modules/zod/v4/core/util.js +var util_exports2 = {}; +__export(util_exports2, { + BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES2, + Class: () => Class2, + NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES2, + aborted: () => aborted2, + allowsEval: () => allowsEval2, + assert: () => assert2, + assertEqual: () => assertEqual2, + assertIs: () => assertIs2, + assertNever: () => assertNever2, + assertNotEqual: () => assertNotEqual2, + assignProp: () => assignProp2, + base64ToUint8Array: () => base64ToUint8Array2, + base64urlToUint8Array: () => base64urlToUint8Array2, + cached: () => cached2, + captureStackTrace: () => captureStackTrace2, + cleanEnum: () => cleanEnum2, + cleanRegex: () => cleanRegex2, + clone: () => clone2, + cloneDef: () => cloneDef2, + createTransparentProxy: () => createTransparentProxy2, + defineLazy: () => defineLazy2, + esc: () => esc2, + escapeRegex: () => escapeRegex2, + explicitlyAborted: () => explicitlyAborted, + extend: () => extend3, + finalizeIssue: () => finalizeIssue2, + floatSafeRemainder: () => floatSafeRemainder2, + getElementAtPath: () => getElementAtPath2, + getEnumValues: () => getEnumValues2, + getLengthableOrigin: () => getLengthableOrigin2, + getParsedType: () => getParsedType2, + getSizableOrigin: () => getSizableOrigin2, + hexToUint8Array: () => hexToUint8Array2, + isObject: () => isObject3, + isPlainObject: () => isPlainObject3, + issue: () => issue3, + joinValues: () => joinValues2, + jsonStringifyReplacer: () => jsonStringifyReplacer2, + merge: () => merge3, + mergeDefs: () => mergeDefs2, + normalizeParams: () => normalizeParams2, + nullish: () => nullish3, + numKeys: () => numKeys2, + objectClone: () => objectClone2, + omit: () => omit2, + optionalKeys: () => optionalKeys2, + parsedType: () => parsedType2, + partial: () => partial2, + pick: () => pick2, + prefixIssues: () => prefixIssues2, + primitiveTypes: () => primitiveTypes2, + promiseAllObject: () => promiseAllObject2, + propertyKeyTypes: () => propertyKeyTypes2, + randomString: () => randomString2, + required: () => required2, + safeExtend: () => safeExtend2, + shallowClone: () => shallowClone2, + slugify: () => slugify2, + stringifyPrimitive: () => stringifyPrimitive2, + uint8ArrayToBase64: () => uint8ArrayToBase642, + uint8ArrayToBase64url: () => uint8ArrayToBase64url2, + uint8ArrayToHex: () => uint8ArrayToHex2, + unwrapMessage: () => unwrapMessage2 +}); +function assertEqual2(val) { + return val; +} +function assertNotEqual2(val) { + return val; +} +function assertIs2(_arg) { +} +function assertNever2(_x) { + throw new Error("Unexpected value in exhaustive check"); +} +function assert2(_) { +} +function getEnumValues2(entries) { + const numericValues = Object.values(entries).filter((v) => typeof v === "number"); + const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); + return values; +} +function joinValues2(array3, separator = "|") { + return array3.map((val) => stringifyPrimitive2(val)).join(separator); +} +function jsonStringifyReplacer2(_, value) { + if (typeof value === "bigint") + return value.toString(); + return value; +} +function cached2(getter) { + const set3 = false; + return { + get value() { + if (!set3) { + const value = getter(); + Object.defineProperty(this, "value", { value }); + return value; } - case "not_multiple_of": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue5.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; - case "unrecognized_keys": - return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue5.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue5.origin}-\u10E8\u10D8`; - case "invalid_union": - return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; - case "invalid_element": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue5.origin}-\u10E8\u10D8`; - default: - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; + throw new Error("cached value already set"); } }; -}; -function ka_default2() { - return { - localeError: error73() - }; } - -// node_modules/zod/v4/locales/km.js -var error74 = () => { - const Sizable = { - string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", - email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", - url: "URL", - emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", - date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", - time: "\u1798\u17C9\u17C4\u1784 ISO", - duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", - ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", - base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", - json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", - e164: "\u179B\u17C1\u1781 E.164", - jwt: "JWT", - template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u179B\u17C1\u1781", - array: "\u17A2\u17B6\u179A\u17C1 (Array)", - null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue5.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; - } - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive2(issue5.values[0])}`; - return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin} ${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue5.origin} ${adj} ${issue5.minimum.toString()}`; +function nullish3(input) { + return input === null || input === void 0; +} +function cleanRegex2(source) { + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + return source.slice(start, end); +} +function floatSafeRemainder2(val, step) { + const ratio = val / step; + const roundedRatio = Math.round(ratio); + const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1); + if (Math.abs(ratio - roundedRatio) < tolerance) + return 0; + return ratio - roundedRatio; +} +var EVALUATING2 = /* @__PURE__ */ Symbol("evaluating"); +function defineLazy2(object3, key, getter) { + let value = void 0; + Object.defineProperty(object3, key, { + get() { + if (value === EVALUATING2) { + return void 0; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; - return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue5.format}`; + if (value === void 0) { + value = EVALUATING2; + value = getter(); } - case "not_multiple_of": - return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue5.divisor}`; - case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue5.origin}`; - case "invalid_union": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - case "invalid_element": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue5.origin}`; - default: - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - } - }; -}; -function km_default2() { - return { - localeError: error74() - }; + return value; + }, + set(v) { + Object.defineProperty(object3, key, { + value: v + // configurable: true, + }); + }, + configurable: true + }); } - -// node_modules/zod/v4/locales/kh.js -function kh_default2() { - return km_default2(); +function objectClone2(obj) { + return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); } - -// node_modules/zod/v4/locales/ko.js -var error75 = () => { - const Sizable = { - string: { unit: "\uBB38\uC790", verb: "to have" }, - file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, - array: { unit: "\uAC1C", verb: "to have" }, - set: { unit: "\uAC1C", verb: "to have" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +function assignProp2(target, prop, value) { + Object.defineProperty(target, prop, { + value, + writable: true, + enumerable: true, + configurable: true + }); +} +function mergeDefs2(...defs) { + const mergedDescriptors = {}; + for (const def of defs) { + const descriptors = Object.getOwnPropertyDescriptors(def); + Object.assign(mergedDescriptors, descriptors); } - const FormatDictionary = { - regex: "\uC785\uB825", - email: "\uC774\uBA54\uC77C \uC8FC\uC18C", - url: "URL", - emoji: "\uC774\uBAA8\uC9C0", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", - date: "ISO \uB0A0\uC9DC", - time: "ISO \uC2DC\uAC04", - duration: "ISO \uAE30\uAC04", - ipv4: "IPv4 \uC8FC\uC18C", - ipv6: "IPv6 \uC8FC\uC18C", - cidrv4: "IPv4 \uBC94\uC704", - cidrv6: "IPv6 \uBC94\uC704", - base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - json_string: "JSON \uBB38\uC790\uC5F4", - e164: "E.164 \uBC88\uD638", - jwt: "JWT", - template_literal: "\uC785\uB825" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue5.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; - } - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + return Object.defineProperties({}, mergedDescriptors); +} +function cloneDef2(schema) { + return mergeDefs2(schema._zod.def); +} +function getElementAtPath2(obj, path) { + if (!path) + return obj; + return path.reduce((acc, key) => acc?.[key], obj); +} +function promiseAllObject2(promisesObj) { + const keys = Object.keys(promisesObj); + const promises3 = keys.map((key) => promisesObj[key]); + return Promise.all(promises3).then((results) => { + const resolvedObj = {}; + for (let i = 0; i < keys.length; i++) { + resolvedObj[keys[i]] = results[i]; + } + return resolvedObj; + }); +} +function randomString2(length = 10) { + const chars = "abcdefghijklmnopqrstuvwxyz"; + let str = ""; + for (let i = 0; i < length; i++) { + str += chars[Math.floor(Math.random() * chars.length)]; + } + return str; +} +function esc2(str) { + return JSON.stringify(str); +} +function slugify2(input) { + return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); +} +var captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { +}; +function isObject3(data) { + return typeof data === "object" && data !== null && !Array.isArray(data); +} +var allowsEval2 = /* @__PURE__ */ cached2(() => { + if (globalConfig2.jitless) { + return false; + } + if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { + return false; + } + try { + const F = Function; + new F(""); + return true; + } catch (_) { + return false; + } +}); +function isPlainObject3(o) { + if (isObject3(o) === false) + return false; + const ctor = o.constructor; + if (ctor === void 0) + return true; + if (typeof ctor !== "function") + return true; + const prot = ctor.prototype; + if (isObject3(prot) === false) + return false; + if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { + return false; + } + return true; +} +function shallowClone2(o) { + if (isPlainObject3(o)) + return { ...o }; + if (Array.isArray(o)) + return [...o]; + if (o instanceof Map) + return new Map(o); + if (o instanceof Set) + return new Set(o); + return o; +} +function numKeys2(data) { + let keyCount = 0; + for (const key in data) { + if (Object.prototype.hasOwnProperty.call(data, key)) { + keyCount++; + } + } + return keyCount; +} +var getParsedType2 = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return "undefined"; + case "string": + return "string"; + case "number": + return Number.isNaN(data) ? "nan" : "number"; + case "boolean": + return "boolean"; + case "function": + return "function"; + case "bigint": + return "bigint"; + case "symbol": + return "symbol"; + case "object": + if (Array.isArray(data)) { + return "array"; } - case "invalid_value": - if (issue5.values.length === 1) - return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive2(issue5.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues2(issue5.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "too_big": { - const adj = issue5.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; - const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue5.origin); - const unit = sizing?.unit ?? "\uC694\uC18C"; - if (sizing) - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue5.maximum.toString()}${unit} ${adj}${suffix}`; - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue5.maximum.toString()} ${adj}${suffix}`; + if (data === null) { + return "null"; } - case "too_small": { - const adj = issue5.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; - const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue5.origin); - const unit = sizing?.unit ?? "\uC694\uC18C"; - if (sizing) { - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue5.minimum.toString()}${unit} ${adj}${suffix}`; - } - return `${issue5.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue5.minimum.toString()} ${adj}${suffix}`; + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return "promise"; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; - } - if (_issue.format === "ends_with") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "includes") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "regex") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue5.format}`; + if (typeof Map !== "undefined" && data instanceof Map) { + return "map"; } - case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue5.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue5.origin}`; - case "invalid_union": - return `\uC798\uBABB\uB41C \uC785\uB825`; - case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue5.origin}`; - default: - return `\uC798\uBABB\uB41C \uC785\uB825`; - } - }; + if (typeof Set !== "undefined" && data instanceof Set) { + return "set"; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return "date"; + } + if (typeof File !== "undefined" && data instanceof File) { + return "file"; + } + return "object"; + default: + throw new Error(`Unknown data type: ${t}`); + } }; -function ko_default2() { - return { - localeError: error75() - }; +var propertyKeyTypes2 = /* @__PURE__ */ new Set(["string", "number", "symbol"]); +var primitiveTypes2 = /* @__PURE__ */ new Set([ + "string", + "number", + "bigint", + "boolean", + "symbol", + "undefined" +]); +function escapeRegex2(str) { + return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } - -// node_modules/zod/v4/locales/lt.js -var capitalizeFirstCharacter2 = (text) => { - return text.charAt(0).toUpperCase() + text.slice(1); -}; -function getUnitTypeFromNumber2(number8) { - const abs = Math.abs(number8); - const last = abs % 10; - const last2 = abs % 100; - if (last2 >= 11 && last2 <= 19 || last === 0) - return "many"; - if (last === 1) - return "one"; - return "few"; +function clone2(inst, def, params) { + const cl = new inst._zod.constr(def ?? inst._zod.def); + if (!def || params?.parent) + cl._zod.parent = inst; + return cl; } -var error76 = () => { - const Sizable = { - string: { - unit: { - one: "simbolis", - few: "simboliai", - many: "simboli\u0173" - }, - verb: { - smaller: { - inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", - notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" - }, - bigger: { - inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", - notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" - } - } +function normalizeParams2(_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 createTransparentProxy2(getter) { + let target; + return new Proxy({}, { + get(_, prop, receiver) { + target ?? (target = getter()); + return Reflect.get(target, prop, receiver); }, - file: { - unit: { - one: "baitas", - few: "baitai", - many: "bait\u0173" - }, - verb: { - smaller: { - inclusive: "turi b\u016Bti ne didesnis kaip", - notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" - }, - bigger: { - inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", - notInclusive: "turi b\u016Bti didesnis kaip" - } - } + set(_, prop, value, receiver) { + target ?? (target = getter()); + return Reflect.set(target, prop, value, receiver); }, - array: { - unit: { - one: "element\u0105", - few: "elementus", - many: "element\u0173" - }, - verb: { - smaller: { - inclusive: "turi tur\u0117ti ne daugiau kaip", - notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" - }, - bigger: { - inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", - notInclusive: "turi tur\u0117ti daugiau kaip" - } - } + has(_, prop) { + target ?? (target = getter()); + return Reflect.has(target, prop); }, - set: { - unit: { - one: "element\u0105", - few: "elementus", - many: "element\u0173" - }, - verb: { - smaller: { - inclusive: "turi tur\u0117ti ne daugiau kaip", - notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" - }, - bigger: { - inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", - notInclusive: "turi tur\u0117ti daugiau kaip" - } - } + deleteProperty(_, prop) { + target ?? (target = getter()); + return Reflect.deleteProperty(target, prop); + }, + ownKeys(_) { + target ?? (target = getter()); + return Reflect.ownKeys(target); + }, + getOwnPropertyDescriptor(_, prop) { + target ?? (target = getter()); + return Reflect.getOwnPropertyDescriptor(target, prop); + }, + defineProperty(_, prop, descriptor) { + target ?? (target = getter()); + return Reflect.defineProperty(target, prop, descriptor); } - }; - function getSizing(origin2, unitType, inclusive, targetShouldBe) { - const result = Sizable[origin2] ?? null; - if (result === null) - return result; - return { - unit: result.unit[unitType], - verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] - }; + }); +} +function stringifyPrimitive2(value) { + if (typeof value === "bigint") + return value.toString() + "n"; + if (typeof value === "string") + return `"${value}"`; + return `${value}`; +} +function optionalKeys2(shape) { + return Object.keys(shape).filter((k) => { + return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; + }); +} +var NUMBER_FORMAT_RANGES2 = { + safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], + int32: [-2147483648, 2147483647], + uint32: [0, 4294967295], + float32: [-34028234663852886e22, 34028234663852886e22], + float64: [-Number.MAX_VALUE, Number.MAX_VALUE] +}; +var BIGINT_FORMAT_RANGES2 = { + int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], + uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] +}; +function pick2(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".pick() cannot be used on object schemas containing refinements"); } - const FormatDictionary = { - regex: "\u012Fvestis", - email: "el. pa\u0161to adresas", - url: "URL", - emoji: "jaustukas", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO data ir laikas", - date: "ISO data", - time: "ISO laikas", - duration: "ISO trukm\u0117", - ipv4: "IPv4 adresas", - ipv6: "IPv6 adresas", - cidrv4: "IPv4 tinklo prefiksas (CIDR)", - cidrv6: "IPv6 tinklo prefiksas (CIDR)", - base64: "base64 u\u017Ekoduota eilut\u0117", - base64url: "base64url u\u017Ekoduota eilut\u0117", - json_string: "JSON eilut\u0117", - e164: "E.164 numeris", - jwt: "JWT", - template_literal: "\u012Fvestis" - }; - const TypeDictionary = { - nan: "NaN", - number: "skai\u010Dius", - bigint: "sveikasis skai\u010Dius", - string: "eilut\u0117", - boolean: "login\u0117 reik\u0161m\u0117", - undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", - function: "funkcija", - symbol: "simbolis", - array: "masyvas", - object: "objektas", - null: "nulin\u0117 reik\u0161m\u0117" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue5.expected}`; + const def = mergeDefs2(schema._zod.def, { + get shape() { + const newShape = {}; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); } - return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Privalo b\u016Bti ${stringifyPrimitive2(issue5.values[0])}`; - return `Privalo b\u016Bti vienas i\u0161 ${joinValues2(issue5.values, "|")} pasirinkim\u0173`; - case "too_big": { - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - const sizing = getSizing(issue5.origin, getUnitTypeFromNumber2(Number(issue5.maximum)), issue5.inclusive ?? false, "smaller"); - if (sizing?.verb) - return `${capitalizeFirstCharacter2(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue5.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; - const adj = issue5.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; - return `${capitalizeFirstCharacter2(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue5.maximum.toString()} ${sizing?.unit}`; - } - case "too_small": { - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - const sizing = getSizing(issue5.origin, getUnitTypeFromNumber2(Number(issue5.minimum)), issue5.inclusive ?? false, "bigger"); - if (sizing?.verb) - return `${capitalizeFirstCharacter2(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue5.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; - const adj = issue5.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; - return `${capitalizeFirstCharacter2(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue5.minimum.toString()} ${sizing?.unit}`; + if (!mask[key]) + continue; + newShape[key] = currDef.shape[key]; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + assignProp2(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone2(schema, def); +} +function omit2(schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".omit() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs2(schema._zod.def, { + get shape() { + const newShape = { ...schema._zod.def.shape }; + for (const key in mask) { + if (!(key in currDef.shape)) { + throw new Error(`Unrecognized key: "${key}"`); } - if (_issue.format === "ends_with") - return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; - if (_issue.format === "regex") - return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; - return `Neteisingas ${FormatDictionary[_issue.format] ?? issue5.format}`; + if (!mask[key]) + continue; + delete newShape[key]; } - case "not_multiple_of": - return `Skai\u010Dius privalo b\u016Bti ${issue5.divisor} kartotinis.`; - case "unrecognized_keys": - return `Neatpa\u017Eint${issue5.keys.length > 1 ? "i" : "as"} rakt${issue5.keys.length > 1 ? "ai" : "as"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return "Rastas klaidingas raktas"; - case "invalid_union": - return "Klaidinga \u012Fvestis"; - case "invalid_element": { - const origin2 = TypeDictionary[issue5.origin] ?? issue5.origin; - return `${capitalizeFirstCharacter2(origin2 ?? issue5.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + assignProp2(this, "shape", newShape); + return newShape; + }, + checks: [] + }); + return clone2(schema, def); +} +function extend3(schema, shape) { + if (!isPlainObject3(shape)) { + throw new Error("Invalid input to extend: expected a plain object"); + } + const checks = schema._zod.def.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + const existingShape = schema._zod.def.shape; + for (const key in shape) { + if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { + throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); } - default: - return "Klaidinga \u012Fvestis"; } - }; -}; -function lt_default2() { - return { - localeError: error76() - }; -} - -// node_modules/zod/v4/locales/mk.js -var error77 = () => { - const Sizable = { - string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "\u0432\u043D\u0435\u0441", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", - url: "URL", - emoji: "\u0435\u043C\u043E\u045F\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0443\u043C", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", - cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", - cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", - base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - json_string: "JSON \u043D\u0438\u0437\u0430", - e164: "E.164 \u0431\u0440\u043E\u0458", - jwt: "JWT", - template_literal: "\u0432\u043D\u0435\u0441" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0431\u0440\u043E\u0458", - array: "\u043D\u0438\u0437\u0430" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue5.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + const def = mergeDefs2(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp2(this, "shape", _shape); + return _shape; + } + }); + return clone2(schema, def); +} +function safeExtend2(schema, shape) { + if (!isPlainObject3(shape)) { + throw new Error("Invalid input to safeExtend: expected a plain object"); + } + const def = mergeDefs2(schema._zod.def, { + get shape() { + const _shape = { ...schema._zod.def.shape, ...shape }; + assignProp2(this, "shape", _shape); + return _shape; + } + }); + return clone2(schema, def); +} +function merge3(a, b) { + if (a._zod.def.checks?.length) { + throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead."); + } + const def = mergeDefs2(a._zod.def, { + get shape() { + const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; + assignProp2(this, "shape", _shape); + return _shape; + }, + get catchall() { + return b._zod.def.catchall; + }, + checks: b._zod.def.checks ?? [] + }); + return clone2(a, def); +} +function partial2(Class3, schema, mask) { + const currDef = schema._zod.def; + const checks = currDef.checks; + const hasChecks = checks && checks.length > 0; + if (hasChecks) { + throw new Error(".partial() cannot be used on object schemas containing refinements"); + } + const def = mergeDefs2(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in oldShape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; } - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive2(issue5.values[0])}`; - return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue5.minimum.toString()} ${sizing.unit}`; + } else { + for (const key in oldShape) { + shape[key] = Class3 ? new Class3({ + type: "optional", + innerType: oldShape[key] + }) : oldShape[key]; } - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue5.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue5.minimum.toString()}`; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + assignProp2(this, "shape", shape); + return shape; + }, + checks: [] + }); + return clone2(schema, def); +} +function required2(Class3, schema, mask) { + const def = mergeDefs2(schema._zod.def, { + get shape() { + const oldShape = schema._zod.def.shape; + const shape = { ...oldShape }; + if (mask) { + for (const key in mask) { + if (!(key in shape)) { + throw new Error(`Unrecognized key: "${key}"`); + } + if (!mask[key]) + continue; + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); + } + } else { + for (const key in oldShape) { + shape[key] = new Class3({ + type: "nonoptional", + innerType: oldShape[key] + }); } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue5.origin}`; - case "invalid_union": - return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; - case "invalid_element": - return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue5.origin}`; - default: - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; + assignProp2(this, "shape", shape); + return shape; } - }; -}; -function mk_default2() { - return { - localeError: error77() - }; + }); + return clone2(schema, def); } - -// node_modules/zod/v4/locales/ms.js -var error78 = () => { - const Sizable = { - string: { unit: "aksara", verb: "mempunyai" }, - file: { unit: "bait", verb: "mempunyai" }, - array: { unit: "elemen", verb: "mempunyai" }, - set: { unit: "elemen", verb: "mempunyai" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +function aborted2(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; + } } - const FormatDictionary = { - regex: "input", - email: "alamat e-mel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tarikh masa ISO", - date: "tarikh ISO", - time: "masa ISO", - duration: "tempoh ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "julat IPv4", - cidrv6: "julat IPv6", - base64: "string dikodkan base64", - base64url: "string dikodkan base64url", - json_string: "string JSON", - e164: "nombor E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "nombor" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Input tidak sah: dijangka instanceof ${issue5.expected}, diterima ${received}`; - } - return `Input tidak sah: dijangka ${expected}, diterima ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Input tidak sah: dijangka ${stringifyPrimitive2(issue5.values[0])}`; - return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Terlalu besar: dijangka ${issue5.origin ?? "nilai"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: dijangka ${issue5.origin ?? "nilai"} adalah ${adj}${issue5.maximum.toString()}`; + 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 prefixIssues2(path, issues) { + return issues.map((iss) => { + var _a4; + (_a4 = iss).path ?? (_a4.path = []); + iss.path.unshift(path); + return iss; + }); +} +function unwrapMessage2(message2) { + return typeof message2 === "string" ? message2 : message2?.message; +} +function finalizeIssue2(iss, ctx, config3) { + const message2 = iss.message ? iss.message : unwrapMessage2(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage2(ctx?.error?.(iss)) ?? unwrapMessage2(config3.customError?.(iss)) ?? unwrapMessage2(config3.localeError?.(iss)) ?? "Invalid input"; + const { inst: _inst, continue: _continue, input: _input, ...rest } = iss; + rest.path ?? (rest.path = []); + rest.message = message2; + if (ctx?.reportInput) { + rest.input = _input; + } + return rest; +} +function getSizableOrigin2(input) { + if (input instanceof Set) + return "set"; + if (input instanceof Map) + return "map"; + if (input instanceof File) + return "file"; + return "unknown"; +} +function getLengthableOrigin2(input) { + if (Array.isArray(input)) + return "array"; + if (typeof input === "string") + return "string"; + return "unknown"; +} +function parsedType2(data) { + const t = typeof data; + switch (t) { + case "number": { + return Number.isNaN(data) ? "nan" : "number"; + } + case "object": { + if (data === null) { + return "null"; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Terlalu kecil: dijangka ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: dijangka ${issue5.origin} adalah ${adj}${issue5.minimum.toString()}`; + if (Array.isArray(data)) { + return "array"; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - return `String tidak sah: mesti mengandungi "${_issue.includes}"`; - if (_issue.format === "regex") - return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} tidak sah`; + const obj = data; + if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { + return obj.constructor.name; } - case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue5.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak sah dalam ${issue5.origin}`; - case "invalid_union": - return "Input tidak sah"; - case "invalid_element": - return `Nilai tidak sah dalam ${issue5.origin}`; - default: - return `Input tidak sah`; } - }; -}; -function ms_default2() { - return { - localeError: error78() - }; + } + return t; +} +function issue3(...args) { + const [iss, input, inst] = args; + if (typeof iss === "string") { + return { + message: iss, + code: "custom", + input, + inst + }; + } + return { ...iss }; +} +function cleanEnum2(obj) { + return Object.entries(obj).filter(([k, _]) => { + return Number.isNaN(Number.parseInt(k, 10)); + }).map((el) => el[1]); +} +function base64ToUint8Array2(base645) { + const binaryString = atob(base645); + const bytes = new Uint8Array(binaryString.length); + for (let i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + return bytes; +} +function uint8ArrayToBase642(bytes) { + let binaryString = ""; + for (let i = 0; i < bytes.length; i++) { + binaryString += String.fromCharCode(bytes[i]); + } + return btoa(binaryString); +} +function base64urlToUint8Array2(base64url5) { + const base645 = base64url5.replace(/-/g, "+").replace(/_/g, "/"); + const padding = "=".repeat((4 - base645.length % 4) % 4); + return base64ToUint8Array2(base645 + padding); +} +function uint8ArrayToBase64url2(bytes) { + return uint8ArrayToBase642(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); +} +function hexToUint8Array2(hex5) { + const cleanHex = hex5.replace(/^0x/, ""); + if (cleanHex.length % 2 !== 0) { + throw new Error("Invalid hex string length"); + } + const bytes = new Uint8Array(cleanHex.length / 2); + for (let i = 0; i < cleanHex.length; i += 2) { + bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); + } + return bytes; } +function uint8ArrayToHex2(bytes) { + return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); +} +var Class2 = class { + constructor(..._args) { + } +}; -// node_modules/zod/v4/locales/nl.js -var error79 = () => { - const Sizable = { - string: { unit: "tekens", verb: "heeft" }, - file: { unit: "bytes", verb: "heeft" }, - array: { unit: "elementen", verb: "heeft" }, - set: { unit: "elementen", verb: "heeft" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// node_modules/zod/v4/core/errors.js +var initializer3 = (inst, def) => { + inst.name = "$ZodError"; + Object.defineProperty(inst, "_zod", { + value: inst._zod, + enumerable: false + }); + Object.defineProperty(inst, "issues", { + value: def, + enumerable: false + }); + inst.message = JSON.stringify(def, jsonStringifyReplacer2, 2); + Object.defineProperty(inst, "toString", { + value: () => inst.message, + enumerable: false + }); +}; +var $ZodError2 = $constructor2("$ZodError", initializer3); +var $ZodRealError2 = $constructor2("$ZodError", initializer3, { Parent: Error }); +function flattenError2(error99, mapper = (issue4) => issue4.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of error99.issues) { + if (sub.path.length > 0) { + fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; + fieldErrors[sub.path[0]].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } } - const FormatDictionary = { - regex: "invoer", - email: "emailadres", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum en tijd", - date: "ISO datum", - time: "ISO tijd", - duration: "ISO duur", - ipv4: "IPv4-adres", - ipv6: "IPv6-adres", - cidrv4: "IPv4-bereik", - cidrv6: "IPv6-bereik", - base64: "base64-gecodeerde tekst", - base64url: "base64 URL-gecodeerde tekst", - json_string: "JSON string", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "invoer" - }; - const TypeDictionary = { - nan: "NaN", - number: "getal" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ongeldige invoer: verwacht instanceof ${issue5.expected}, ontving ${received}`; + return { formErrors, fieldErrors }; +} +function formatError2(error99, mapper = (issue4) => issue4.message) { + const fieldErrors = { _errors: [] }; + const processError = (error100, path = []) => { + for (const issue4 of error100.issues) { + if (issue4.code === "invalid_union" && issue4.errors.length) { + issue4.errors.map((issues) => processError({ issues }, [...path, ...issue4.path])); + } else if (issue4.code === "invalid_key") { + processError({ issues: issue4.issues }, [...path, ...issue4.path]); + } else if (issue4.code === "invalid_element") { + processError({ issues: issue4.issues }, [...path, ...issue4.path]); + } else { + const fullpath = [...path, ...issue4.path]; + if (fullpath.length === 0) { + fieldErrors._errors.push(mapper(issue4)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < fullpath.length) { + const el = fullpath[i]; + const terminal = i === fullpath.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue4)); + } + curr = curr[el]; + i++; + } } - return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ongeldige invoer: verwacht ${stringifyPrimitive2(issue5.values[0])}`; - return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - const longName = issue5.origin === "date" ? "laat" : issue5.origin === "string" ? "lang" : "groot"; - if (sizing) - return `Te ${longName}: verwacht dat ${issue5.origin ?? "waarde"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; - return `Te ${longName}: verwacht dat ${issue5.origin ?? "waarde"} ${adj}${issue5.maximum.toString()} is`; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - const shortName = issue5.origin === "date" ? "vroeg" : issue5.origin === "string" ? "kort" : "klein"; - if (sizing) { - return `Te ${shortName}: verwacht dat ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} ${sizing.verb}`; + } + }; + processError(error99); + return fieldErrors; +} +function treeifyError2(error99, mapper = (issue4) => issue4.message) { + const result = { errors: [] }; + const processError = (error100, path = []) => { + var _a4, _b; + for (const issue4 of error100.issues) { + if (issue4.code === "invalid_union" && issue4.errors.length) { + issue4.errors.map((issues) => processError({ issues }, [...path, ...issue4.path])); + } else if (issue4.code === "invalid_key") { + processError({ issues: issue4.issues }, [...path, ...issue4.path]); + } else if (issue4.code === "invalid_element") { + processError({ issues: issue4.issues }, [...path, ...issue4.path]); + } else { + const fullpath = [...path, ...issue4.path]; + if (fullpath.length === 0) { + result.errors.push(mapper(issue4)); + continue; } - return `Te ${shortName}: verwacht dat ${issue5.origin} ${adj}${issue5.minimum.toString()} is`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + let curr = result; + let i = 0; + while (i < fullpath.length) { + const el = fullpath[i]; + const terminal = i === fullpath.length - 1; + if (typeof el === "string") { + curr.properties ?? (curr.properties = {}); + (_a4 = curr.properties)[el] ?? (_a4[el] = { errors: [] }); + curr = curr.properties[el]; + } else { + curr.items ?? (curr.items = []); + (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); + curr = curr.items[el]; + } + if (terminal) { + curr.errors.push(mapper(issue4)); + } + i++; } - if (_issue.format === "ends_with") - return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; - if (_issue.format === "includes") - return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; - if (_issue.format === "regex") - return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; - return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue5.divisor} zijn`; - case "unrecognized_keys": - return `Onbekende key${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Ongeldige key in ${issue5.origin}`; - case "invalid_union": - return "Ongeldige invoer"; - case "invalid_element": - return `Ongeldige waarde in ${issue5.origin}`; - default: - return `Ongeldige invoer`; } }; -}; -function nl_default2() { - return { - localeError: error79() - }; + processError(error99); + return result; } - -// node_modules/zod/v4/locales/no.js -var error80 = () => { - const Sizable = { - string: { unit: "tegn", verb: "\xE5 ha" }, - file: { unit: "bytes", verb: "\xE5 ha" }, - array: { unit: "elementer", verb: "\xE5 inneholde" }, - set: { unit: "elementer", verb: "\xE5 inneholde" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "e-postadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkeslett", - date: "ISO-dato", - time: "ISO-klokkeslett", - duration: "ISO-varighet", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spekter", - cidrv6: "IPv6-spekter", - base64: "base64-enkodet streng", - base64url: "base64url-enkodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "tall", - array: "liste" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ugyldig input: forventet instanceof ${issue5.expected}, fikk ${received}`; - } - return `Ugyldig input: forventet ${expected}, fikk ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ugyldig verdi: forventet ${stringifyPrimitive2(issue5.values[0])}`; - return `Ugyldig valg: forventet en av ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `For stor(t): forventet ${issue5.origin ?? "value"} til \xE5 ha ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor(t): forventet ${issue5.origin ?? "value"} til \xE5 ha ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `For lite(n): forventet ${issue5.origin} til \xE5 ha ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `For lite(n): forventet ${issue5.origin} til \xE5 ha ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue5.origin}`; - case "invalid_union": - return "Ugyldig input"; - case "invalid_element": - return `Ugyldig verdi i ${issue5.origin}`; - default: - return `Ugyldig input`; +function toDotPath2(_path) { + const segs = []; + const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); + for (const seg of path) { + if (typeof seg === "number") + segs.push(`[${seg}]`); + else if (typeof seg === "symbol") + segs.push(`[${JSON.stringify(String(seg))}]`); + else if (/[^\w$]/.test(seg)) + segs.push(`[${JSON.stringify(seg)}]`); + else { + if (segs.length) + segs.push("."); + segs.push(seg); } - }; -}; -function no_default2() { - return { - localeError: error80() - }; + } + return segs.join(""); } - -// node_modules/zod/v4/locales/ota.js -var error81 = () => { - const Sizable = { - string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, - set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +function prettifyError2(error99) { + const lines = []; + const issues = [...error99.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); + for (const issue4 of issues) { + lines.push(`\u2716 ${issue4.message}`); + if (issue4.path?.length) + lines.push(` \u2192 at ${toDotPath2(issue4.path)}`); } - const FormatDictionary = { - regex: "giren", - email: "epostag\xE2h", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO heng\xE2m\u0131", - date: "ISO tarihi", - time: "ISO zaman\u0131", - duration: "ISO m\xFCddeti", - ipv4: "IPv4 ni\u015F\xE2n\u0131", - ipv6: "IPv6 ni\u015F\xE2n\u0131", - cidrv4: "IPv4 menzili", - cidrv6: "IPv6 menzili", - base64: "base64-\u015Fifreli metin", - base64url: "base64url-\u015Fifreli metin", - json_string: "JSON metin", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "giren" - }; - const TypeDictionary = { - nan: "NaN", - number: "numara", - array: "saf", - null: "gayb" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `F\xE2sit giren: umulan instanceof ${issue5.expected}, al\u0131nan ${received}`; - } - return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `F\xE2sit giren: umulan ${stringifyPrimitive2(issue5.values[0])}`; - return `F\xE2sit tercih: m\xFBteberler ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Fazla b\xFCy\xFCk: ${issue5.origin ?? "value"}, ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; - return `Fazla b\xFCy\xFCk: ${issue5.origin ?? "value"}, ${adj}${issue5.maximum.toString()} olmal\u0131yd\u0131.`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Fazla k\xFC\xE7\xFCk: ${issue5.origin}, ${adj}${issue5.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; - } - return `Fazla k\xFC\xE7\xFCk: ${issue5.origin}, ${adj}${issue5.minimum.toString()} olmal\u0131yd\u0131.`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; - if (_issue.format === "ends_with") - return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; - if (_issue.format === "includes") - return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; - if (_issue.format === "regex") - return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; - return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue5.divisor} kat\u0131 olmal\u0131yd\u0131.`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} i\xE7in tan\u0131nmayan anahtar var.`; - case "invalid_union": - return "Giren tan\u0131namad\u0131."; - case "invalid_element": - return `${issue5.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; - default: - return `K\u0131ymet tan\u0131namad\u0131.`; - } - }; -}; -function ota_default2() { - return { - localeError: error81() - }; + return lines.join("\n"); } -// node_modules/zod/v4/locales/ps.js -var error82 = () => { - const Sizable = { - string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, - array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// node_modules/zod/v4/core/parse.js +var _parse2 = (_Err) => (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 $ZodAsyncError2(); } - const FormatDictionary = { - regex: "\u0648\u0631\u0648\u062F\u064A", - email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", - date: "\u0646\u06D0\u067C\u0647", - time: "\u0648\u062E\u062A", - duration: "\u0645\u0648\u062F\u0647", - ipv4: "\u062F IPv4 \u067E\u062A\u0647", - ipv6: "\u062F IPv6 \u067E\u062A\u0647", - cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", - cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", - base64: "base64-encoded \u0645\u062A\u0646", - base64url: "base64url-encoded \u0645\u062A\u0646", - json_string: "JSON \u0645\u062A\u0646", - e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u064A" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0639\u062F\u062F", - array: "\u0627\u0631\u06D0" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue5.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; - } - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; - } - case "invalid_value": - if (issue5.values.length === 1) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive2(issue5.values[0])} \u0648\u0627\u06CC`; - } - return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues2(issue5.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue5.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; - } - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue5.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue5.maximum.toString()} \u0648\u064A`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; - } - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue5.origin} \u0628\u0627\u06CC\u062F ${adj}${issue5.minimum.toString()} \u0648\u064A`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; - } - if (_issue.format === "ends_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; - } - if (_issue.format === "includes") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; - } - if (_issue.format === "regex") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; - } - return `${FormatDictionary[_issue.format] ?? issue5.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; - } - case "not_multiple_of": - return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue5.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; - case "unrecognized_keys": - return `\u0646\u0627\u0633\u0645 ${issue5.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue5.origin} \u06A9\u06D0`; - case "invalid_union": - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; - case "invalid_element": - return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue5.origin} \u06A9\u06D0`; - default: - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; - } - }; + if (result.issues.length) { + const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))); + captureStackTrace2(e, _params?.callee); + throw e; + } + return result.value; }; -function ps_default2() { - return { - localeError: error82() - }; -} - -// node_modules/zod/v4/locales/pl.js -var error83 = () => { - const Sizable = { - string: { unit: "znak\xF3w", verb: "mie\u0107" }, - file: { unit: "bajt\xF3w", verb: "mie\u0107" }, - array: { unit: "element\xF3w", verb: "mie\u0107" }, - set: { unit: "element\xF3w", verb: "mie\u0107" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var parse3 = /* @__PURE__ */ _parse2($ZodRealError2); +var _parseAsync2 = (_Err) => 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) => finalizeIssue2(iss, ctx, config2()))); + captureStackTrace2(e, params?.callee); + throw e; } - const FormatDictionary = { - regex: "wyra\u017Cenie", - email: "adres email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i godzina w formacie ISO", - date: "data w formacie ISO", - time: "godzina w formacie ISO", - duration: "czas trwania ISO", - ipv4: "adres IPv4", - ipv6: "adres IPv6", - cidrv4: "zakres IPv4", - cidrv6: "zakres IPv6", - base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", - base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", - json_string: "ci\u0105g znak\xF3w w formacie JSON", - e164: "liczba E.164", - jwt: "JWT", - template_literal: "wej\u015Bcie" - }; - const TypeDictionary = { - nan: "NaN", - number: "liczba", - array: "tablica" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue5.expected}, otrzymano ${received}`; - } - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive2(issue5.values[0])}`; - return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; - } - return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue5.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; - } - return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue5.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; - if (_issue.format === "regex") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; - return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue5.divisor}`; - case "unrecognized_keys": - return `Nierozpoznane klucze${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue5.origin}`; - case "invalid_union": - return "Nieprawid\u0142owe dane wej\u015Bciowe"; - case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue5.origin}`; - default: - return `Nieprawid\u0142owe dane wej\u015Bciowe`; - } - }; + return result.value; }; -function pl_default2() { - return { - localeError: error83() - }; -} - -// node_modules/zod/v4/locales/pt.js -var error84 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "ter" }, - file: { unit: "bytes", verb: "ter" }, - array: { unit: "itens", verb: "ter" }, - set: { unit: "itens", verb: "ter" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var parseAsync3 = /* @__PURE__ */ _parseAsync2($ZodRealError2); +var _safeParse2 = (_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 $ZodAsyncError2(); } - const FormatDictionary = { - regex: "padr\xE3o", - email: "endere\xE7o de e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "dura\xE7\xE3o ISO", - ipv4: "endere\xE7o IPv4", - ipv6: "endere\xE7o IPv6", - cidrv4: "faixa de IPv4", - cidrv6: "faixa de IPv6", - base64: "texto codificado em base64", - base64url: "URL codificada em base64", - json_string: "texto JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\xFAmero", - null: "nulo" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Tipo inv\xE1lido: esperado instanceof ${issue5.expected}, recebido ${received}`; - } - return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Entrada inv\xE1lida: esperado ${stringifyPrimitive2(issue5.values[0])}`; - return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Muito grande: esperado que ${issue5.origin ?? "valor"} tivesse ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Muito grande: esperado que ${issue5.origin ?? "valor"} fosse ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Muito pequeno: esperado que ${issue5.origin} tivesse ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Muito pequeno: esperado que ${issue5.origin} fosse ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; - if (_issue.format === "regex") - return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} inv\xE1lido`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue5.divisor}`; - case "unrecognized_keys": - return `Chave${issue5.keys.length > 1 ? "s" : ""} desconhecida${issue5.keys.length > 1 ? "s" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Chave inv\xE1lida em ${issue5.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido em ${issue5.origin}`; - default: - return `Campo inv\xE1lido`; - } - }; + return result.issues.length ? { + success: false, + error: new (_Err ?? $ZodError2)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + } : { success: true, data: result.value }; }; -function pt_default2() { - return { - localeError: error84() - }; -} +var safeParse3 = /* @__PURE__ */ _safeParse2($ZodRealError2); +var _safeParseAsync2 = (_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 ? { + success: false, + error: new _Err(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + } : { success: true, data: result.value }; +}; +var safeParseAsync3 = /* @__PURE__ */ _safeParseAsync2($ZodRealError2); +var _encode2 = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; + return _parse2(_Err)(schema, value, ctx); +}; +var encode5 = /* @__PURE__ */ _encode2($ZodRealError2); +var _decode2 = (_Err) => (schema, value, _ctx) => { + return _parse2(_Err)(schema, value, _ctx); +}; +var decode3 = /* @__PURE__ */ _decode2($ZodRealError2); +var _encodeAsync2 = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; + return _parseAsync2(_Err)(schema, value, ctx); +}; +var encodeAsync3 = /* @__PURE__ */ _encodeAsync2($ZodRealError2); +var _decodeAsync2 = (_Err) => async (schema, value, _ctx) => { + return _parseAsync2(_Err)(schema, value, _ctx); +}; +var decodeAsync3 = /* @__PURE__ */ _decodeAsync2($ZodRealError2); +var _safeEncode2 = (_Err) => (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; + return _safeParse2(_Err)(schema, value, ctx); +}; +var safeEncode3 = /* @__PURE__ */ _safeEncode2($ZodRealError2); +var _safeDecode2 = (_Err) => (schema, value, _ctx) => { + return _safeParse2(_Err)(schema, value, _ctx); +}; +var safeDecode3 = /* @__PURE__ */ _safeDecode2($ZodRealError2); +var _safeEncodeAsync2 = (_Err) => async (schema, value, _ctx) => { + const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" }; + return _safeParseAsync2(_Err)(schema, value, ctx); +}; +var safeEncodeAsync3 = /* @__PURE__ */ _safeEncodeAsync2($ZodRealError2); +var _safeDecodeAsync2 = (_Err) => async (schema, value, _ctx) => { + return _safeParseAsync2(_Err)(schema, value, _ctx); +}; +var safeDecodeAsync3 = /* @__PURE__ */ _safeDecodeAsync2($ZodRealError2); -// node_modules/zod/v4/locales/ro.js -var error85 = () => { - const Sizable = { - string: { unit: "caractere", verb: "s\u0103 aib\u0103" }, - file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" }, - array: { unit: "elemente", verb: "s\u0103 aib\u0103" }, - set: { unit: "elemente", verb: "s\u0103 aib\u0103" }, - map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "intrare", - email: "adres\u0103 de email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "dat\u0103 \u0219i or\u0103 ISO", - date: "dat\u0103 ISO", - time: "or\u0103 ISO", - duration: "durat\u0103 ISO", - ipv4: "adres\u0103 IPv4", - ipv6: "adres\u0103 IPv6", - mac: "adres\u0103 MAC", - cidrv4: "interval IPv4", - cidrv6: "interval IPv6", - base64: "\u0219ir codat base64", - base64url: "\u0219ir codat base64url", - json_string: "\u0219ir JSON", - e164: "num\u0103r E.164", - jwt: "JWT", - template_literal: "intrare" - }; - const TypeDictionary = { - nan: "NaN", - string: "\u0219ir", - number: "num\u0103r", - boolean: "boolean", - function: "func\u021Bie", - array: "matrice", - object: "obiect", - undefined: "nedefinit", - symbol: "simbol", - bigint: "num\u0103r mare", - void: "void", - never: "never", - map: "hart\u0103", - set: "set" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive2(issue5.values[0])}`; - return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Prea mare: a\u0219teptat ca ${issue5.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elemente"}`; - return `Prea mare: a\u0219teptat ca ${issue5.origin ?? "valoarea"} s\u0103 fie ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Prea mic: a\u0219teptat ca ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Prea mic: a\u0219teptat ca ${issue5.origin} s\u0103 fie ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`; - return `Format invalid: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue5.divisor}`; - case "unrecognized_keys": - return `Chei nerecunoscute: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Cheie invalid\u0103 \xEEn ${issue5.origin}`; - case "invalid_union": - return "Intrare invalid\u0103"; - case "invalid_element": - return `Valoare invalid\u0103 \xEEn ${issue5.origin}`; - default: - return `Intrare invalid\u0103`; - } - }; +// node_modules/zod/v4/core/regexes.js +var regexes_exports2 = {}; +__export(regexes_exports2, { + base64: () => base643, + base64url: () => base64url3, + bigint: () => bigint4, + boolean: () => boolean4, + browserEmail: () => browserEmail2, + cidrv4: () => cidrv43, + cidrv6: () => cidrv63, + cuid: () => cuid4, + cuid2: () => cuid23, + date: () => date5, + datetime: () => datetime3, + domain: () => domain2, + duration: () => duration3, + e164: () => e1643, + email: () => email3, + emoji: () => emoji3, + extendedDuration: () => extendedDuration2, + guid: () => guid3, + hex: () => hex3, + hostname: () => hostname3, + html5Email: () => html5Email2, + httpProtocol: () => httpProtocol, + idnEmail: () => idnEmail2, + integer: () => integer2, + ipv4: () => ipv43, + ipv6: () => ipv63, + ksuid: () => ksuid3, + lowercase: () => lowercase2, + mac: () => mac3, + md5_base64: () => md5_base642, + md5_base64url: () => md5_base64url2, + md5_hex: () => md5_hex2, + nanoid: () => nanoid3, + null: () => _null4, + number: () => number4, + rfc5322Email: () => rfc5322Email2, + sha1_base64: () => sha1_base642, + sha1_base64url: () => sha1_base64url2, + sha1_hex: () => sha1_hex2, + sha256_base64: () => sha256_base642, + sha256_base64url: () => sha256_base64url2, + sha256_hex: () => sha256_hex2, + sha384_base64: () => sha384_base642, + sha384_base64url: () => sha384_base64url2, + sha384_hex: () => sha384_hex2, + sha512_base64: () => sha512_base642, + sha512_base64url: () => sha512_base64url2, + sha512_hex: () => sha512_hex2, + string: () => string4, + time: () => time3, + ulid: () => ulid3, + undefined: () => _undefined4, + unicodeEmail: () => unicodeEmail2, + uppercase: () => uppercase2, + uuid: () => uuid3, + uuid4: () => uuid42, + uuid6: () => uuid62, + uuid7: () => uuid72, + xid: () => xid3 +}); +var cuid4 = /^[cC][0-9a-z]{6,}$/; +var cuid23 = /^[0-9a-z]+$/; +var ulid3 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; +var xid3 = /^[0-9a-vA-V]{20}$/; +var ksuid3 = /^[A-Za-z0-9]{27}$/; +var nanoid3 = /^[a-zA-Z0-9_-]{21}$/; +var duration3 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; +var extendedDuration2 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; +var guid3 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; +var uuid3 = (version3) => { + if (!version3) + return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); }; -function ro_default() { - return { - localeError: error85() - }; +var uuid42 = /* @__PURE__ */ uuid3(4); +var uuid62 = /* @__PURE__ */ uuid3(6); +var uuid72 = /* @__PURE__ */ uuid3(7); +var email3 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; +var html5Email2 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var rfc5322Email2 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; +var unicodeEmail2 = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; +var idnEmail2 = unicodeEmail2; +var browserEmail2 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; +var _emoji3 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; +function emoji3() { + return new RegExp(_emoji3, "u"); } - -// node_modules/zod/v4/locales/ru.js -function getRussianPlural2(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; - } - if (lastDigit === 1) { - return one; - } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; - } - return many; +var ipv43 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; +var ipv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; +var mac3 = (delimiter) => { + const escapedDelim = escapeRegex2(delimiter ?? ":"); + return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); +}; +var cidrv43 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; +var cidrv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; +var base643 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; +var base64url3 = /^[A-Za-z0-9_-]*$/; +var hostname3 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; +var domain2 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; +var httpProtocol = /^https?$/; +var e1643 = /^\+[1-9]\d{6,14}$/; +var dateSource2 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; +var date5 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`); +function timeSource2(args) { + const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; + const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; + return regex2; } -var error86 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0438\u043C\u0432\u043E\u043B", - few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", - many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u0430", - many: "\u0431\u0430\u0439\u0442" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" +function time3(args) { + return new RegExp(`^${timeSource2(args)}$`); +} +function datetime3(args) { + const time5 = timeSource2({ precision: args.precision }); + const opts = ["Z"]; + if (args.local) + opts.push(""); + if (args.offset) + opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); + const timeRegex = `${time5}(?:${opts.join("|")})`; + return new RegExp(`^${dateSource2}T(?:${timeRegex})$`); +} +var string4 = (params) => { + const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; + return new RegExp(`^${regex2}$`); +}; +var bigint4 = /^-?\d+n?$/; +var integer2 = /^-?\d+$/; +var number4 = /^-?\d+(?:\.\d+)?$/; +var boolean4 = /^(?:true|false)$/i; +var _null4 = /^null$/i; +var _undefined4 = /^undefined$/i; +var lowercase2 = /^[^A-Z]*$/; +var uppercase2 = /^[^a-z]*$/; +var hex3 = /^[0-9a-fA-F]*$/; +function fixedBase642(bodyLength, padding) { + return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); +} +function fixedBase64url2(length) { + return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); +} +var md5_hex2 = /^[0-9a-fA-F]{32}$/; +var md5_base642 = /* @__PURE__ */ fixedBase642(22, "=="); +var md5_base64url2 = /* @__PURE__ */ fixedBase64url2(22); +var sha1_hex2 = /^[0-9a-fA-F]{40}$/; +var sha1_base642 = /* @__PURE__ */ fixedBase642(27, "="); +var sha1_base64url2 = /* @__PURE__ */ fixedBase64url2(27); +var sha256_hex2 = /^[0-9a-fA-F]{64}$/; +var sha256_base642 = /* @__PURE__ */ fixedBase642(43, "="); +var sha256_base64url2 = /* @__PURE__ */ fixedBase64url2(43); +var sha384_hex2 = /^[0-9a-fA-F]{96}$/; +var sha384_base642 = /* @__PURE__ */ fixedBase642(64, ""); +var sha384_base64url2 = /* @__PURE__ */ fixedBase64url2(64); +var sha512_hex2 = /^[0-9a-fA-F]{128}$/; +var sha512_base642 = /* @__PURE__ */ fixedBase642(86, "=="); +var sha512_base64url2 = /* @__PURE__ */ fixedBase64url2(86); + +// node_modules/zod/v4/core/checks.js +var $ZodCheck2 = /* @__PURE__ */ $constructor2("$ZodCheck", (inst, def) => { + var _a4; + inst._zod ?? (inst._zod = {}); + inst._zod.def = def; + (_a4 = inst._zod).onattach ?? (_a4.onattach = []); +}); +var numericOriginMap2 = { + number: "number", + bigint: "bigint", + object: "date" +}; +var $ZodCheckLessThan2 = /* @__PURE__ */ $constructor2("$ZodCheckLessThan", (inst, def) => { + $ZodCheck2.init(inst, def); + const origin2 = numericOriginMap2[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; + if (def.value < curr) { + if (def.inclusive) + bag.maximum = def.value; + else + bag.exclusiveMaximum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { + return; } + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u044F", - duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", - base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", - json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0432\u043E\u0434" +}); +var $ZodCheckGreaterThan2 = /* @__PURE__ */ $constructor2("$ZodCheckGreaterThan", (inst, def) => { + $ZodCheck2.init(inst, def); + const origin2 = numericOriginMap2[typeof def.value]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; + if (def.value > curr) { + if (def.inclusive) + bag.minimum = def.value; + else + bag.exclusiveMinimum = def.value; + } + }); + inst._zod.check = (payload) => { + if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { + return; + } + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: typeof def.value === "object" ? def.value.getTime() : def.value, + input: payload.value, + inclusive: def.inclusive, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0441\u0438\u0432" +}); +var $ZodCheckMultipleOf2 = /* @__PURE__ */ $constructor2("$ZodCheckMultipleOf", (inst, def) => { + $ZodCheck2.init(inst, def); + inst._zod.onattach.push((inst2) => { + var _a4; + (_a4 = inst2._zod.bag).multipleOf ?? (_a4.multipleOf = def.value); + }); + inst._zod.check = (payload) => { + if (typeof payload.value !== typeof def.value) + throw new Error("Cannot mix number and bigint in multiple_of check."); + const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder2(payload.value, def.value) === 0; + if (isMultiple) + return; + payload.issues.push({ + origin: typeof payload.value, + code: "not_multiple_of", + divisor: def.value, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue5.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; - } - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive2(issue5.values[0])}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const maxValue = Number(issue5.maximum); - const unit = getRussianPlural2(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue5.maximum.toString()} ${unit}`; - } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue5.maximum.toString()}`; +}); +var $ZodCheckNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckNumberFormat", (inst, def) => { + $ZodCheck2.init(inst, def); + def.format = def.format || "float64"; + const isInt = def.format?.includes("int"); + const origin2 = isInt ? "int" : "number"; + const [minimum, maximum] = NUMBER_FORMAT_RANGES2[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + if (isInt) + bag.pattern = integer2; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (isInt) { + if (!Number.isInteger(input)) { + payload.issues.push({ + expected: origin2, + format: def.format, + code: "invalid_type", + continue: false, + input, + inst + }); + return; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - const minValue = Number(issue5.minimum); - const unit = getRussianPlural2(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue5.minimum.toString()} ${unit}`; + if (!Number.isSafeInteger(input)) { + if (input > 0) { + payload.issues.push({ + input, + code: "too_big", + maximum: Number.MAX_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); + } else { + payload.issues.push({ + input, + code: "too_small", + minimum: Number.MIN_SAFE_INTEGER, + note: "Integers must be within the safe integer range.", + inst, + origin: origin2, + inclusive: true, + continue: !def.abort + }); } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue5.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue5.format}`; + return; } - case "not_multiple_of": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue5.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue5.keys.length > 1 ? "\u0438" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; - case "invalid_element": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue5.origin}`; - default: - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + } + if (input < minimum) { + payload.issues.push({ + origin: "number", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "number", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); } }; -}; -function ru_default2() { - return { - localeError: error86() - }; -} - -// node_modules/zod/v4/locales/sl.js -var error87 = () => { - const Sizable = { - string: { unit: "znakov", verb: "imeti" }, - file: { unit: "bajtov", verb: "imeti" }, - array: { unit: "elementov", verb: "imeti" }, - set: { unit: "elementov", verb: "imeti" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "vnos", - email: "e-po\u0161tni naslov", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum in \u010Das", - date: "ISO datum", - time: "ISO \u010Das", - duration: "ISO trajanje", - ipv4: "IPv4 naslov", - ipv6: "IPv6 naslov", - cidrv4: "obseg IPv4", - cidrv6: "obseg IPv6", - base64: "base64 kodiran niz", - base64url: "base64url kodiran niz", - json_string: "JSON niz", - e164: "E.164 \u0161tevilka", - jwt: "JWT", - template_literal: "vnos" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0161tevilo", - array: "tabela" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue5.expected}, prejeto ${received}`; - } - return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive2(issue5.values[0])}`; - return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Preveliko: pri\u010Dakovano, da bo ${issue5.origin ?? "vrednost"} imelo ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "elementov"}`; - return `Preveliko: pri\u010Dakovano, da bo ${issue5.origin ?? "vrednost"} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue5.origin} imelo ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Premajhno: pri\u010Dakovano, da bo ${issue5.origin} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; - return `Neveljaven ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue5.divisor}`; - case "unrecognized_keys": - return `Neprepoznan${issue5.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Neveljaven klju\u010D v ${issue5.origin}`; - case "invalid_union": - return "Neveljaven vnos"; - case "invalid_element": - return `Neveljavna vrednost v ${issue5.origin}`; - default: - return "Neveljaven vnos"; +}); +var $ZodCheckBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckBigIntFormat", (inst, def) => { + $ZodCheck2.init(inst, def); + const [minimum, maximum] = BIGINT_FORMAT_RANGES2[def.format]; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + bag.minimum = minimum; + bag.maximum = maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + if (input < minimum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_small", + minimum, + inclusive: true, + inst, + continue: !def.abort + }); + } + if (input > maximum) { + payload.issues.push({ + origin: "bigint", + input, + code: "too_big", + maximum, + inclusive: true, + inst, + continue: !def.abort + }); } }; -}; -function sl_default2() { - return { - localeError: error87() +}); +var $ZodCheckMaxSize2 = /* @__PURE__ */ $constructor2("$ZodCheckMaxSize", (inst, def) => { + var _a4; + $ZodCheck2.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish3(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size <= def.maximum) + return; + payload.issues.push({ + origin: getSizableOrigin2(input), + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; -} - -// node_modules/zod/v4/locales/sv.js -var error88 = () => { - const Sizable = { - string: { unit: "tecken", verb: "att ha" }, - file: { unit: "bytes", verb: "att ha" }, - array: { unit: "objekt", verb: "att inneh\xE5lla" }, - set: { unit: "objekt", verb: "att inneh\xE5lla" } +}); +var $ZodCheckMinSize2 = /* @__PURE__ */ $constructor2("$ZodCheckMinSize", (inst, def) => { + var _a4; + $ZodCheck2.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish3(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size >= def.minimum) + return; + payload.issues.push({ + origin: getSizableOrigin2(input), + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "regulj\xE4rt uttryck", - email: "e-postadress", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datum och tid", - date: "ISO-datum", - time: "ISO-tid", - duration: "ISO-varaktighet", - ipv4: "IPv4-intervall", - ipv6: "IPv6-intervall", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodad str\xE4ng", - base64url: "base64url-kodad str\xE4ng", - json_string: "JSON-str\xE4ng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "mall-literal" +}); +var $ZodCheckSizeEquals2 = /* @__PURE__ */ $constructor2("$ZodCheckSizeEquals", (inst, def) => { + var _a4; + $ZodCheck2.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish3(val) && val.size !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.size; + bag.maximum = def.size; + bag.size = def.size; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const size = input.size; + if (size === def.size) + return; + const tooBig = size > def.size; + payload.issues.push({ + origin: getSizableOrigin2(input), + ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "antal", - array: "lista" +}); +var $ZodCheckMaxLength2 = /* @__PURE__ */ $constructor2("$ZodCheckMaxLength", (inst, def) => { + var _a4; + $ZodCheck2.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish3(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; + if (def.maximum < curr) + inst2._zod.bag.maximum = def.maximum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length <= def.maximum) + return; + const origin2 = getLengthableOrigin2(input); + payload.issues.push({ + origin: origin2, + code: "too_big", + maximum: def.maximum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue5.expected}, fick ${received}`; - } - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive2(issue5.values[0])}`; - return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "element"}`; - } - return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue5.origin ?? "v\xE4rdet"} att ha ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; - return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue5.divisor}`; - case "unrecognized_keys": - return `${issue5.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Ogiltig nyckel i ${issue5.origin ?? "v\xE4rdet"}`; - case "invalid_union": - return "Ogiltig input"; - case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue5.origin ?? "v\xE4rdet"}`; - default: - return `Ogiltig input`; - } +}); +var $ZodCheckMinLength2 = /* @__PURE__ */ $constructor2("$ZodCheckMinLength", (inst, def) => { + var _a4; + $ZodCheck2.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish3(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; + if (def.minimum > curr) + inst2._zod.bag.minimum = def.minimum; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length >= def.minimum) + return; + const origin2 = getLengthableOrigin2(input); + payload.issues.push({ + origin: origin2, + code: "too_small", + minimum: def.minimum, + inclusive: true, + input, + inst, + continue: !def.abort + }); }; -}; -function sv_default2() { - return { - localeError: error88() +}); +var $ZodCheckLengthEquals2 = /* @__PURE__ */ $constructor2("$ZodCheckLengthEquals", (inst, def) => { + var _a4; + $ZodCheck2.init(inst, def); + (_a4 = inst._zod.def).when ?? (_a4.when = (payload) => { + const val = payload.value; + return !nullish3(val) && val.length !== void 0; + }); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.minimum = def.length; + bag.maximum = def.length; + bag.length = def.length; + }); + inst._zod.check = (payload) => { + const input = payload.value; + const length = input.length; + if (length === def.length) + return; + const origin2 = getLengthableOrigin2(input); + const tooBig = length > def.length; + payload.issues.push({ + origin: origin2, + ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, + inclusive: true, + exact: true, + input: payload.value, + inst, + continue: !def.abort + }); }; -} - -// node_modules/zod/v4/locales/ta.js -var error89 = () => { - const Sizable = { - string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } +}); +var $ZodCheckStringFormat2 = /* @__PURE__ */ $constructor2("$ZodCheckStringFormat", (inst, def) => { + var _a4, _b; + $ZodCheck2.init(inst, def); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.format = def.format; + if (def.pattern) { + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(def.pattern); + } + }); + if (def.pattern) + (_a4 = inst._zod).check ?? (_a4.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 = () => { + }); +}); +var $ZodCheckRegex2 = /* @__PURE__ */ $constructor2("$ZodCheckRegex", (inst, def) => { + $ZodCheckStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + def.pattern.lastIndex = 0; + if (def.pattern.test(payload.value)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "regex", + input: payload.value, + pattern: def.pattern.toString(), + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", - email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", - time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", - ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", - e164: "E.164 \u0B8E\u0BA3\u0BCD", - jwt: "JWT", - template_literal: "input" +}); +var $ZodCheckLowerCase2 = /* @__PURE__ */ $constructor2("$ZodCheckLowerCase", (inst, def) => { + def.pattern ?? (def.pattern = lowercase2); + $ZodCheckStringFormat2.init(inst, def); +}); +var $ZodCheckUpperCase2 = /* @__PURE__ */ $constructor2("$ZodCheckUpperCase", (inst, def) => { + def.pattern ?? (def.pattern = uppercase2); + $ZodCheckStringFormat2.init(inst, def); +}); +var $ZodCheckIncludes2 = /* @__PURE__ */ $constructor2("$ZodCheckIncludes", (inst, def) => { + $ZodCheck2.init(inst, def); + const escapedRegex = escapeRegex2(def.includes); + const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); + def.pattern = pattern; + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.includes(def.includes, def.position)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "includes", + includes: def.includes, + input: payload.value, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "\u0B8E\u0BA3\u0BCD", - array: "\u0B85\u0BA3\u0BBF", - null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" +}); +var $ZodCheckStartsWith2 = /* @__PURE__ */ $constructor2("$ZodCheckStartsWith", (inst, def) => { + $ZodCheck2.init(inst, def); + const pattern = new RegExp(`^${escapeRegex2(def.prefix)}.*`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.startsWith(def.prefix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "starts_with", + prefix: def.prefix, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue5.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; - } - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive2(issue5.values[0])}`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues2(issue5.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue5.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue5.origin} ${adj}${issue5.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "ends_with") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "includes") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "regex") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue5.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - case "unrecognized_keys": - return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue5.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; - case "invalid_union": - return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; - case "invalid_element": - return `${issue5.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; - default: - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; - } - }; -}; -function ta_default2() { - return { - localeError: error89() +}); +var $ZodCheckEndsWith2 = /* @__PURE__ */ $constructor2("$ZodCheckEndsWith", (inst, def) => { + $ZodCheck2.init(inst, def); + const pattern = new RegExp(`.*${escapeRegex2(def.suffix)}$`); + def.pattern ?? (def.pattern = pattern); + inst._zod.onattach.push((inst2) => { + const bag = inst2._zod.bag; + bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); + bag.patterns.add(pattern); + }); + inst._zod.check = (payload) => { + if (payload.value.endsWith(def.suffix)) + return; + payload.issues.push({ + origin: "string", + code: "invalid_format", + format: "ends_with", + suffix: def.suffix, + input: payload.value, + inst, + continue: !def.abort + }); }; +}); +function handleCheckPropertyResult2(result, payload, property) { + if (result.issues.length) { + payload.issues.push(...prefixIssues2(property, result.issues)); + } } - -// node_modules/zod/v4/locales/th.js -var error90 = () => { - const Sizable = { - string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } +var $ZodCheckProperty2 = /* @__PURE__ */ $constructor2("$ZodCheckProperty", (inst, def) => { + $ZodCheck2.init(inst, def); + inst._zod.check = (payload) => { + const result = def.schema._zod.run({ + value: payload.value[def.property], + issues: [] + }, {}); + if (result instanceof Promise) { + return result.then((result2) => handleCheckPropertyResult2(result2, payload, def.property)); + } + handleCheckPropertyResult2(result, payload, def.property); + return; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", - email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", - url: "URL", - emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", - time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", - ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", - cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", - cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", - base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", - base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", - json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", - e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", - jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", - template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" +}); +var $ZodCheckMimeType2 = /* @__PURE__ */ $constructor2("$ZodCheckMimeType", (inst, def) => { + $ZodCheck2.init(inst, def); + const mimeSet = new Set(def.mime); + inst._zod.onattach.push((inst2) => { + inst2._zod.bag.mime = def.mime; + }); + inst._zod.check = (payload) => { + if (mimeSet.has(payload.value.type)) + return; + payload.issues.push({ + code: "invalid_value", + values: def.mime, + input: payload.value.type, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", - array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", - null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" +}); +var $ZodCheckOverwrite2 = /* @__PURE__ */ $constructor2("$ZodCheckOverwrite", (inst, def) => { + $ZodCheck2.init(inst, def); + inst._zod.check = (payload) => { + payload.value = def.tx(payload.value); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue5.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; - } - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive2(issue5.values[0])}`; - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue5.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; - if (_issue.format === "regex") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue5.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; - case "unrecognized_keys": - return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue5.origin}`; - case "invalid_union": - return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; - case "invalid_element": - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue5.origin}`; - default: - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; +}); + +// node_modules/zod/v4/core/doc.js +var Doc2 = class { + constructor(args = []) { + this.content = []; + this.indent = 0; + if (this) + this.args = args; + } + indented(fn) { + this.indent += 1; + fn(this); + this.indent -= 1; + } + write(arg) { + if (typeof arg === "function") { + arg(this, { execution: "sync" }); + arg(this, { execution: "async" }); + return; } - }; + const content = arg; + const lines = content.split("\n").filter((x) => x); + const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); + const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); + for (const line of dedented) { + this.content.push(line); + } + } + compile() { + const F = Function; + const args = this?.args; + const content = this?.content ?? [``]; + const lines = [...content.map((x) => ` ${x}`)]; + return new F(...args, lines.join("\n")); + } }; -function th_default2() { - return { - localeError: error90() - }; -} -// node_modules/zod/v4/locales/tr.js -var error91 = () => { - const Sizable = { - string: { unit: "karakter", verb: "olmal\u0131" }, - file: { unit: "bayt", verb: "olmal\u0131" }, - array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, - set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// node_modules/zod/v4/core/versions.js +var version2 = { + major: 4, + minor: 4, + patch: 3 +}; + +// node_modules/zod/v4/core/schemas.js +var $ZodType2 = /* @__PURE__ */ $constructor2("$ZodType", (inst, def) => { + var _a4; + inst ?? (inst = {}); + inst._zod.def = def; + inst._zod.bag = inst._zod.bag || {}; + inst._zod.version = version2; + const checks = [...inst._zod.def.checks ?? []]; + if (inst._zod.traits.has("$ZodCheck")) { + checks.unshift(inst); } - const FormatDictionary = { - regex: "girdi", - email: "e-posta adresi", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO tarih ve saat", - date: "ISO tarih", - time: "ISO saat", - duration: "ISO s\xFCre", - ipv4: "IPv4 adresi", - ipv6: "IPv6 adresi", - cidrv4: "IPv4 aral\u0131\u011F\u0131", - cidrv6: "IPv6 aral\u0131\u011F\u0131", - base64: "base64 ile \u015Fifrelenmi\u015F metin", - base64url: "base64url ile \u015Fifrelenmi\u015F metin", - json_string: "JSON dizesi", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "\u015Eablon dizesi" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue5.expected}, al\u0131nan ${received}`; + for (const ch of checks) { + for (const fn of ch._zod.onattach) { + fn(inst); + } + } + if (checks.length === 0) { + (_a4 = inst._zod).deferred ?? (_a4.deferred = []); + inst._zod.deferred?.push(() => { + inst._zod.run = inst._zod.parse; + }); + } else { + const runChecks = (payload, checks2, ctx) => { + let isAborted = aborted2(payload); + let asyncResult; + for (const ch of checks2) { + if (ch._zod.def.when) { + if (explicitlyAborted(payload)) + continue; + const shouldRun = ch._zod.def.when(payload); + if (!shouldRun) + continue; + } else if (isAborted) { + continue; + } + const currLen = payload.issues.length; + const _ = ch._zod.check(payload); + if (_ instanceof Promise && ctx?.async === false) { + throw new $ZodAsyncError2(); + } + if (asyncResult || _ instanceof Promise) { + asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { + await _; + const nextLen = payload.issues.length; + if (nextLen === currLen) + return; + if (!isAborted) + isAborted = aborted2(payload, currLen); + }); + } else { + const nextLen = payload.issues.length; + if (nextLen === currLen) + continue; + if (!isAborted) + isAborted = aborted2(payload, currLen); } - return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; } - case "invalid_value": - if (issue5.values.length === 1) - return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive2(issue5.values[0])}`; - return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ok b\xFCy\xFCk: beklenen ${issue5.origin ?? "de\u011Fer"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; - return `\xC7ok b\xFCy\xFCk: beklenen ${issue5.origin ?? "de\u011Fer"} ${adj}${issue5.maximum.toString()}`; + if (asyncResult) { + return asyncResult.then(() => { + return payload; + }); } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue5.origin} ${adj}${issue5.minimum.toString()}`; + return payload; + }; + const handleCanaryResult = (canary, payload, ctx) => { + if (aborted2(canary)) { + canary.aborted = true; + return canary; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; - if (_issue.format === "ends_with") - return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; - if (_issue.format === "includes") - return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; - if (_issue.format === "regex") - return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; - return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue5.format}`; + const checkResult = runChecks(payload, checks, ctx); + if (checkResult instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError2(); + return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx)); } - case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue5.divisor} ile tam b\xF6l\xFCnebilmeli`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue5.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} i\xE7inde ge\xE7ersiz anahtar`; - case "invalid_union": - return "Ge\xE7ersiz de\u011Fer"; - case "invalid_element": - return `${issue5.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; - default: - return `Ge\xE7ersiz de\u011Fer`; - } - }; -}; -function tr_default2() { - return { - localeError: error91() - }; -} - -// node_modules/zod/v4/locales/uk.js -var error92 = () => { - const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", - url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", - date: "\u0434\u0430\u0442\u0430 ISO", - time: "\u0447\u0430\u0441 ISO", - duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", - ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", - ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", - cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", - cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", - base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", - base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", - json_string: "\u0440\u044F\u0434\u043E\u043A JSON", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0438\u0432" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue5.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + 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((canary2) => { + return handleCanaryResult(canary2, payload, ctx); + }); } - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; + return handleCanaryResult(canary, payload, ctx); } - case "invalid_value": - if (issue5.values.length === 1) - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive2(issue5.values[0])}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue5.maximum.toString()}`; + const result = inst._zod.parse(payload, ctx); + if (result instanceof Promise) { + if (ctx.async === false) + throw new $ZodAsyncError2(); + return result.then((result2) => runChecks(result2, checks, ctx)); } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue5.origin} \u0431\u0443\u0434\u0435 ${adj}${issue5.minimum.toString()}`; + return runChecks(result, checks, ctx); + }; + } + defineLazy2(inst, "~standard", () => ({ + validate: (value) => { + try { + const r = safeParse3(inst, value); + return r.success ? { value: r.data } : { issues: r.error?.issues }; + } catch (_) { + return safeParseAsync3(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue5.format}`; + }, + vendor: "zod", + version: 1 + })); +}); +var $ZodString2 = /* @__PURE__ */ $constructor2("$ZodString", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string4(inst._zod.bag); + inst._zod.parse = (payload, _) => { + if (def.coerce) + try { + payload.value = String(payload.value); + } catch (_2) { } - case "not_multiple_of": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue5.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue5.keys.length > 1 ? "\u0456" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue5.origin}`; - case "invalid_union": - return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; - case "invalid_element": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue5.origin}`; - default: - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; - } - }; -}; -function uk_default2() { - return { - localeError: error92() - }; -} - -// node_modules/zod/v4/locales/ua.js -function ua_default2() { - return uk_default2(); -} - -// node_modules/zod/v4/locales/ur.js -var error93 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, - file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, - array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, - set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } + if (typeof payload.value === "string") + return payload; + payload.issues.push({ + expected: "string", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0627\u0646 \u067E\u0679", - email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", - uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", - nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", - guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", - ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", - xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", - ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", - date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", - time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", - duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", - ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", - ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", - cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", - cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", - base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", - e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", - jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", - template_literal: "\u0627\u0646 \u067E\u0679" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0646\u0645\u0628\u0631", - array: "\u0622\u0631\u06D2", - null: "\u0646\u0644" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue5.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; +}); +var $ZodStringFormat2 = /* @__PURE__ */ $constructor2("$ZodStringFormat", (inst, def) => { + $ZodCheckStringFormat2.init(inst, def); + $ZodString2.init(inst, def); +}); +var $ZodGUID2 = /* @__PURE__ */ $constructor2("$ZodGUID", (inst, def) => { + def.pattern ?? (def.pattern = guid3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodUUID2 = /* @__PURE__ */ $constructor2("$ZodUUID", (inst, def) => { + if (def.version) { + const versionMap = { + v1: 1, + v2: 2, + v3: 3, + v4: 4, + v5: 5, + v6: 6, + v7: 7, + v8: 8 + }; + const v = versionMap[def.version]; + if (v === void 0) + throw new Error(`Invalid UUID version: "${def.version}"`); + def.pattern ?? (def.pattern = uuid3(v)); + } else + def.pattern ?? (def.pattern = uuid3()); + $ZodStringFormat2.init(inst, def); +}); +var $ZodEmail2 = /* @__PURE__ */ $constructor2("$ZodEmail", (inst, def) => { + def.pattern ?? (def.pattern = email3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodURL2 = /* @__PURE__ */ $constructor2("$ZodURL", (inst, def) => { + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + try { + const trimmed = payload.value.trim(); + if (!def.normalize && def.protocol?.source === httpProtocol.source) { + if (!/^https?:\/\//i.test(trimmed)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid URL format", + input: payload.value, + inst, + continue: !def.abort + }); + return; } - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive2(issue5.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues2(issue5.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue5.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue5.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue5.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue5.origin} \u06A9\u06D2 ${adj}${issue5.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + const url4 = new URL(trimmed); + if (def.hostname) { + def.hostname.lastIndex = 0; + if (!def.hostname.test(url4.hostname)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid hostname", + pattern: def.hostname.source, + input: payload.value, + inst, + continue: !def.abort + }); } - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue5.origin} \u06A9\u0627 ${adj}${issue5.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (def.protocol) { + def.protocol.lastIndex = 0; + if (!def.protocol.test(url4.protocol.endsWith(":") ? url4.protocol.slice(0, -1) : url4.protocol)) { + payload.issues.push({ + code: "invalid_format", + format: "url", + note: "Invalid protocol", + pattern: def.protocol.source, + input: payload.value, + inst, + continue: !def.abort + }); } - if (_issue.format === "ends_with") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - if (_issue.format === "includes") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - if (_issue.format === "regex") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue5.format}`; } - case "not_multiple_of": - return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue5.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - case "unrecognized_keys": - return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue5.keys.length > 1 ? "\u0632" : ""}: ${joinValues2(issue5.keys, "\u060C ")}`; - case "invalid_key": - return `${issue5.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; - case "invalid_union": - return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; - case "invalid_element": - return `${issue5.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; - default: - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + if (def.normalize) { + payload.value = url4.href; + } else { + payload.value = trimmed; + } + return; + } catch (_) { + payload.issues.push({ + code: "invalid_format", + format: "url", + input: payload.value, + inst, + continue: !def.abort + }); } }; -}; -function ur_default2() { - return { - localeError: error93() +}); +var $ZodEmoji2 = /* @__PURE__ */ $constructor2("$ZodEmoji", (inst, def) => { + def.pattern ?? (def.pattern = emoji3()); + $ZodStringFormat2.init(inst, def); +}); +var $ZodNanoID2 = /* @__PURE__ */ $constructor2("$ZodNanoID", (inst, def) => { + def.pattern ?? (def.pattern = nanoid3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodCUID3 = /* @__PURE__ */ $constructor2("$ZodCUID", (inst, def) => { + def.pattern ?? (def.pattern = cuid4); + $ZodStringFormat2.init(inst, def); +}); +var $ZodCUID22 = /* @__PURE__ */ $constructor2("$ZodCUID2", (inst, def) => { + def.pattern ?? (def.pattern = cuid23); + $ZodStringFormat2.init(inst, def); +}); +var $ZodULID2 = /* @__PURE__ */ $constructor2("$ZodULID", (inst, def) => { + def.pattern ?? (def.pattern = ulid3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodXID2 = /* @__PURE__ */ $constructor2("$ZodXID", (inst, def) => { + def.pattern ?? (def.pattern = xid3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodKSUID2 = /* @__PURE__ */ $constructor2("$ZodKSUID", (inst, def) => { + def.pattern ?? (def.pattern = ksuid3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodISODateTime2 = /* @__PURE__ */ $constructor2("$ZodISODateTime", (inst, def) => { + def.pattern ?? (def.pattern = datetime3(def)); + $ZodStringFormat2.init(inst, def); +}); +var $ZodISODate2 = /* @__PURE__ */ $constructor2("$ZodISODate", (inst, def) => { + def.pattern ?? (def.pattern = date5); + $ZodStringFormat2.init(inst, def); +}); +var $ZodISOTime2 = /* @__PURE__ */ $constructor2("$ZodISOTime", (inst, def) => { + def.pattern ?? (def.pattern = time3(def)); + $ZodStringFormat2.init(inst, def); +}); +var $ZodISODuration2 = /* @__PURE__ */ $constructor2("$ZodISODuration", (inst, def) => { + def.pattern ?? (def.pattern = duration3); + $ZodStringFormat2.init(inst, def); +}); +var $ZodIPv42 = /* @__PURE__ */ $constructor2("$ZodIPv4", (inst, def) => { + def.pattern ?? (def.pattern = ipv43); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.format = `ipv4`; +}); +var $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => { + def.pattern ?? (def.pattern = ipv63); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.format = `ipv6`; + inst._zod.check = (payload) => { + try { + new URL(`http://[${payload.value}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "ipv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +var $ZodMAC2 = /* @__PURE__ */ $constructor2("$ZodMAC", (inst, def) => { + def.pattern ?? (def.pattern = mac3(def.delimiter)); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.format = `mac`; +}); +var $ZodCIDRv42 = /* @__PURE__ */ $constructor2("$ZodCIDRv4", (inst, def) => { + def.pattern ?? (def.pattern = cidrv43); + $ZodStringFormat2.init(inst, def); +}); +var $ZodCIDRv62 = /* @__PURE__ */ $constructor2("$ZodCIDRv6", (inst, def) => { + def.pattern ?? (def.pattern = cidrv63); + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + const parts = payload.value.split("/"); + try { + if (parts.length !== 2) + throw new Error(); + const [address, prefix] = parts; + if (!prefix) + throw new Error(); + const prefixNum = Number(prefix); + if (`${prefixNum}` !== prefix) + throw new Error(); + if (prefixNum < 0 || prefixNum > 128) + throw new Error(); + new URL(`http://[${address}]`); + } catch { + payload.issues.push({ + code: "invalid_format", + format: "cidrv6", + input: payload.value, + inst, + continue: !def.abort + }); + } + }; +}); +function isValidBase642(data) { + if (data === "") + return true; + if (/\s/.test(data)) + return false; + if (data.length % 4 !== 0) + return false; + try { + atob(data); + return true; + } catch { + return false; + } +} +var $ZodBase642 = /* @__PURE__ */ $constructor2("$ZodBase64", (inst, def) => { + def.pattern ?? (def.pattern = base643); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.contentEncoding = "base64"; + inst._zod.check = (payload) => { + if (isValidBase642(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64", + input: payload.value, + inst, + continue: !def.abort + }); }; +}); +function isValidBase64URL2(data) { + if (!base64url3.test(data)) + return false; + const base645 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base645.padEnd(Math.ceil(base645.length / 4) * 4, "="); + return isValidBase642(padded); } - -// node_modules/zod/v4/locales/uz.js -var error94 = () => { - const Sizable = { - string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, - file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, - array: { unit: "element", verb: "bo\u2018lishi kerak" }, - set: { unit: "element", verb: "bo\u2018lishi kerak" }, - map: { unit: "yozuv", verb: "bo\u2018lishi kerak" } +var $ZodBase64URL2 = /* @__PURE__ */ $constructor2("$ZodBase64URL", (inst, def) => { + def.pattern ?? (def.pattern = base64url3); + $ZodStringFormat2.init(inst, def); + inst._zod.bag.contentEncoding = "base64url"; + inst._zod.check = (payload) => { + if (isValidBase64URL2(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: "base64url", + input: payload.value, + inst, + continue: !def.abort + }); }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +var $ZodE1642 = /* @__PURE__ */ $constructor2("$ZodE164", (inst, def) => { + def.pattern ?? (def.pattern = e1643); + $ZodStringFormat2.init(inst, def); +}); +function isValidJWT2(token, algorithm = null) { + try { + const tokensParts = token.split("."); + if (tokensParts.length !== 3) + return false; + const [header] = tokensParts; + if (!header) + return false; + const parsedHeader = JSON.parse(atob(header)); + if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") + return false; + if (!parsedHeader.alg) + return false; + if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) + return false; + return true; + } catch { + return false; } - const FormatDictionary = { - regex: "kirish", - email: "elektron pochta manzili", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO sana va vaqti", - date: "ISO sana", - time: "ISO vaqt", - duration: "ISO davomiylik", - ipv4: "IPv4 manzil", - ipv6: "IPv6 manzil", - mac: "MAC manzil", - cidrv4: "IPv4 diapazon", - cidrv6: "IPv6 diapazon", - base64: "base64 kodlangan satr", - base64url: "base64url kodlangan satr", - json_string: "JSON satr", - e164: "E.164 raqam", - jwt: "JWT", - template_literal: "kirish" +} +var $ZodJWT2 = /* @__PURE__ */ $constructor2("$ZodJWT", (inst, def) => { + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + if (isValidJWT2(payload.value, def.alg)) + return; + payload.issues.push({ + code: "invalid_format", + format: "jwt", + input: payload.value, + inst, + continue: !def.abort + }); }; - const TypeDictionary = { - nan: "NaN", - number: "raqam", - array: "massiv" +}); +var $ZodCustomStringFormat2 = /* @__PURE__ */ $constructor2("$ZodCustomStringFormat", (inst, def) => { + $ZodStringFormat2.init(inst, def); + inst._zod.check = (payload) => { + if (def.fn(payload.value)) + return; + payload.issues.push({ + code: "invalid_format", + format: def.format, + input: payload.value, + inst, + continue: !def.abort + }); }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue5.expected}, qabul qilingan ${received}`; - } - return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive2(issue5.values[0])}`; - return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Juda katta: kutilgan ${issue5.origin ?? "qiymat"} ${adj}${issue5.maximum.toString()} ${sizing.unit} ${sizing.verb}`; - return `Juda katta: kutilgan ${issue5.origin ?? "qiymat"} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Juda kichik: kutilgan ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit} ${sizing.verb}`; - } - return `Juda kichik: kutilgan ${issue5.origin} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; - if (_issue.format === "ends_with") - return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; - if (_issue.format === "includes") - return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; - if (_issue.format === "regex") - return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; - return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue5.format}`; +}); +var $ZodNumber2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = inst._zod.bag.pattern ?? number4; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Number(payload.value); + } catch (_) { } - case "not_multiple_of": - return `Noto\u2018g\u2018ri raqam: ${issue5.divisor} ning karralisi bo\u2018lishi kerak`; - case "unrecognized_keys": - return `Noma\u2019lum kalit${issue5.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} dagi kalit noto\u2018g\u2018ri`; - case "invalid_union": - return "Noto\u2018g\u2018ri kirish"; - case "invalid_element": - return `${issue5.origin} da noto\u2018g\u2018ri qiymat`; - default: - return `Noto\u2018g\u2018ri kirish`; + 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) ? "Infinity" : void 0 : void 0; + payload.issues.push({ + expected: "number", + code: "invalid_type", + input, + inst, + ...received ? { received } : {} + }); + return payload; }; -}; -function uz_default2() { - return { - localeError: error94() +}); +var $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumberFormat", (inst, def) => { + $ZodCheckNumberFormat2.init(inst, def); + $ZodNumber2.init(inst, def); +}); +var $ZodBoolean2 = /* @__PURE__ */ $constructor2("$ZodBoolean", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = boolean4; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = Boolean(payload.value); + } catch (_) { + } + const input = payload.value; + if (typeof input === "boolean") + return payload; + payload.issues.push({ + expected: "boolean", + code: "invalid_type", + input, + inst + }); + return payload; }; -} - -// node_modules/zod/v4/locales/vi.js -var error95 = () => { - const Sizable = { - string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, - file: { unit: "byte", verb: "c\xF3" }, - array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, - set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } +}); +var $ZodBigInt2 = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = bigint4; + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) + try { + payload.value = BigInt(payload.value); + } catch (_) { + } + if (typeof payload.value === "bigint") + return payload; + payload.issues.push({ + expected: "bigint", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0111\u1EA7u v\xE0o", - email: "\u0111\u1ECBa ch\u1EC9 email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ng\xE0y gi\u1EDD ISO", - date: "ng\xE0y ISO", - time: "gi\u1EDD ISO", - duration: "kho\u1EA3ng th\u1EDDi gian ISO", - ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", - ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", - cidrv4: "d\u1EA3i IPv4", - cidrv6: "d\u1EA3i IPv6", - base64: "chu\u1ED7i m\xE3 h\xF3a base64", - base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", - json_string: "chu\u1ED7i JSON", - e164: "s\u1ED1 E.164", - jwt: "JWT", - template_literal: "\u0111\u1EA7u v\xE0o" - }; - const TypeDictionary = { - nan: "NaN", - number: "s\u1ED1", - array: "m\u1EA3ng" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue5.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; - } - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive2(issue5.values[0])}`; - return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue5.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue5.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue5.origin} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; - if (_issue.format === "regex") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue5.format} kh\xF4ng h\u1EE3p l\u1EC7`; - } - case "not_multiple_of": - return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue5.divisor}`; - case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue5.origin}`; - case "invalid_union": - return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; - case "invalid_element": - return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue5.origin}`; - default: - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; - } +}); +var $ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodBigIntFormat", (inst, def) => { + $ZodCheckBigIntFormat2.init(inst, def); + $ZodBigInt2.init(inst, def); +}); +var $ZodSymbol2 = /* @__PURE__ */ $constructor2("$ZodSymbol", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "symbol") + return payload; + payload.issues.push({ + expected: "symbol", + code: "invalid_type", + input, + inst + }); + return payload; }; -}; -function vi_default2() { - return { - localeError: error95() +}); +var $ZodUndefined2 = /* @__PURE__ */ $constructor2("$ZodUndefined", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = _undefined4; + inst._zod.values = /* @__PURE__ */ new Set([void 0]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "undefined", + code: "invalid_type", + input, + inst + }); + return payload; }; -} - -// node_modules/zod/v4/locales/zh-CN.js -var error96 = () => { - const Sizable = { - string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, - file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, - array: { unit: "\u9879", verb: "\u5305\u542B" }, - set: { unit: "\u9879", verb: "\u5305\u542B" } +}); +var $ZodNull2 = /* @__PURE__ */ $constructor2("$ZodNull", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.pattern = _null4; + inst._zod.values = /* @__PURE__ */ new Set([null]); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input === null) + return payload; + payload.issues.push({ + expected: "null", + code: "invalid_type", + input, + inst + }); + return payload; }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u8F93\u5165", - email: "\u7535\u5B50\u90AE\u4EF6", - url: "URL", - emoji: "\u8868\u60C5\u7B26\u53F7", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u671F\u65F6\u95F4", - date: "ISO\u65E5\u671F", - time: "ISO\u65F6\u95F4", - duration: "ISO\u65F6\u957F", - ipv4: "IPv4\u5730\u5740", - ipv6: "IPv6\u5730\u5740", - cidrv4: "IPv4\u7F51\u6BB5", - cidrv6: "IPv6\u7F51\u6BB5", - base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", - base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", - json_string: "JSON\u5B57\u7B26\u4E32", - e164: "E.164\u53F7\u7801", - jwt: "JWT", - template_literal: "\u8F93\u5165" +}); +var $ZodAny2 = /* @__PURE__ */ $constructor2("$ZodAny", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodUnknown2 = /* @__PURE__ */ $constructor2("$ZodUnknown", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload) => payload; +}); +var $ZodNever2 = /* @__PURE__ */ $constructor2("$ZodNever", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + payload.issues.push({ + expected: "never", + code: "invalid_type", + input: payload.value, + inst + }); + return payload; }; - const TypeDictionary = { - nan: "NaN", - number: "\u6570\u5B57", - array: "\u6570\u7EC4", - null: "\u7A7A\u503C(null)" +}); +var $ZodVoid2 = /* @__PURE__ */ $constructor2("$ZodVoid", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (typeof input === "undefined") + return payload; + payload.issues.push({ + expected: "void", + code: "invalid_type", + input, + inst + }); + return payload; }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue5.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; - } - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive2(issue5.values[0])}`; - return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue5.origin ?? "\u503C"} ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue5.origin ?? "\u503C"} ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue5.origin} ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue5.origin} ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; - if (_issue.format === "ends_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; - if (_issue.format === "includes") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; - return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue5.format}`; +}); +var $ZodDate2 = /* @__PURE__ */ $constructor2("$ZodDate", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (def.coerce) { + try { + payload.value = new Date(payload.value); + } catch (_err) { } - case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue5.divisor} \u7684\u500D\u6570`; - case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `${issue5.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; - case "invalid_union": - return "\u65E0\u6548\u8F93\u5165"; - case "invalid_element": - return `${issue5.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; - default: - return `\u65E0\u6548\u8F93\u5165`; } + const input = payload.value; + const isDate3 = input instanceof Date; + const isValidDate = isDate3 && !Number.isNaN(input.getTime()); + if (isValidDate) + return payload; + payload.issues.push({ + expected: "date", + code: "invalid_type", + input, + ...isDate3 ? { received: "Invalid Date" } : {}, + inst + }); + return payload; }; -}; -function zh_CN_default2() { - return { - localeError: error96() - }; -} - -// node_modules/zod/v4/locales/zh-TW.js -var error97 = () => { - const Sizable = { - string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, - file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, - array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, - set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +}); +function handleArrayResult2(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues2(index, result.issues)); } - const FormatDictionary = { - regex: "\u8F38\u5165", - email: "\u90F5\u4EF6\u5730\u5740", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u65E5\u671F\u6642\u9593", - date: "ISO \u65E5\u671F", - time: "ISO \u6642\u9593", - duration: "ISO \u671F\u9593", - ipv4: "IPv4 \u4F4D\u5740", - ipv6: "IPv6 \u4F4D\u5740", - cidrv4: "IPv4 \u7BC4\u570D", - cidrv6: "IPv6 \u7BC4\u570D", - base64: "base64 \u7DE8\u78BC\u5B57\u4E32", - base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", - json_string: "JSON \u5B57\u4E32", - e164: "E.164 \u6578\u503C", - jwt: "JWT", - template_literal: "\u8F38\u5165" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue5.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; - } - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive2(issue5.values[0])}`; - return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue5.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue5.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue5.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue5.maximum.toString()}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) { - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue5.origin} \u61C9\u70BA ${adj}${issue5.minimum.toString()} ${sizing.unit}`; - } - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue5.origin} \u61C9\u70BA ${adj}${issue5.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") { - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; - } - if (_issue.format === "ends_with") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; - if (_issue.format === "includes") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; - return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue5.format}`; - } - case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue5.divisor} \u7684\u500D\u6578`; - case "unrecognized_keys": - return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue5.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues2(issue5.keys, "\u3001")}`; - case "invalid_key": - return `${issue5.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; - case "invalid_union": - return "\u7121\u6548\u7684\u8F38\u5165\u503C"; - case "invalid_element": - return `${issue5.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; - default: - return `\u7121\u6548\u7684\u8F38\u5165\u503C`; - } - }; -}; -function zh_TW_default2() { - return { - localeError: error97() - }; + final.value[index] = result.value; } - -// node_modules/zod/v4/locales/yo.js -var error98 = () => { - const Sizable = { - string: { unit: "\xE0mi", verb: "n\xED" }, - file: { unit: "bytes", verb: "n\xED" }, - array: { unit: "nkan", verb: "n\xED" }, - set: { unit: "nkan", verb: "n\xED" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", - email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\xE0k\xF3k\xF2 ISO", - date: "\u1ECDj\u1ECD\u0301 ISO", - time: "\xE0k\xF3k\xF2 ISO", - duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", - ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", - ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", - cidrv4: "\xE0gb\xE8gb\xE8 IPv4", - cidrv6: "\xE0gb\xE8gb\xE8 IPv6", - base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", - base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", - json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", - e164: "n\u1ECD\u0301mb\xE0 E.164", - jwt: "JWT", - template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\u1ECD\u0301mb\xE0", - array: "akop\u1ECD" - }; - return (issue5) => { - switch (issue5.code) { - case "invalid_type": { - const expected = TypeDictionary[issue5.expected] ?? issue5.expected; - const receivedType = parsedType2(issue5.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue5.expected)) { - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue5.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; - } - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; - } - case "invalid_value": - if (issue5.values.length === 1) - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive2(issue5.values[0])}`; - return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues2(issue5.values, "|")}`; - case "too_big": { - const adj = issue5.inclusive ? "<=" : "<"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue5.origin ?? "iye"} ${sizing.verb} ${adj}${issue5.maximum} ${sizing.unit}`; - return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue5.maximum}`; - } - case "too_small": { - const adj = issue5.inclusive ? ">=" : ">"; - const sizing = getSizing(issue5.origin); - if (sizing) - return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue5.origin} ${sizing.verb} ${adj}${issue5.minimum} ${sizing.unit}`; - return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue5.minimum}`; - } - case "invalid_format": { - const _issue = issue5; - if (_issue.format === "starts_with") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; - return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue5.format}`; +var $ZodArray2 = /* @__PURE__ */ $constructor2("$ZodArray", (inst, def) => { + $ZodType2.init(inst, def); + 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 = Array(input.length); + const proms = []; + 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((result2) => handleArrayResult2(result2, payload, i))); + } else { + handleArrayResult2(result, payload, i); } - case "not_multiple_of": - return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue5.divisor}`; - case "unrecognized_keys": - return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues2(issue5.keys, ", ")}`; - case "invalid_key": - return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue5.origin}`; - case "invalid_union": - return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; - case "invalid_element": - return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue5.origin}`; - default: - return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; }; -}; -function yo_default2() { - return { - localeError: error98() - }; -} - -// node_modules/zod/v4/core/registries.js -var _a3; -var $output2 = /* @__PURE__ */ Symbol("ZodOutput"); -var $input2 = /* @__PURE__ */ Symbol("ZodInput"); -var $ZodRegistry2 = class { - constructor() { - this._map = /* @__PURE__ */ new WeakMap(); - this._idmap = /* @__PURE__ */ new Map(); - } - add(schema, ..._meta) { - const meta6 = _meta[0]; - this._map.set(schema, meta6); - if (meta6 && typeof meta6 === "object" && "id" in meta6) { - this._idmap.set(meta6.id, schema); +}); +function handlePropertyResult2(result, final, key, input, isOptionalIn, isOptionalOut) { + const isPresent = key in input; + if (result.issues.length) { + if (isOptionalIn && isOptionalOut && !isPresent) { + return; } - return this; - } - clear() { - this._map = /* @__PURE__ */ new WeakMap(); - this._idmap = /* @__PURE__ */ new Map(); - return this; + final.issues.push(...prefixIssues2(key, result.issues)); } - remove(schema) { - const meta6 = this._map.get(schema); - if (meta6 && typeof meta6 === "object" && "id" in meta6) { - this._idmap.delete(meta6.id); + if (!isPresent && !isOptionalIn) { + if (!result.issues.length) { + final.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: void 0, + path: [key] + }); } - this._map.delete(schema); - return this; + return; } - get(schema) { - const p = schema._zod.parent; - if (p) { - const pm = { ...this.get(p) ?? {} }; - delete pm.id; - const f = { ...pm, ...this._map.get(schema) }; - return Object.keys(f).length ? f : void 0; + if (result.value === void 0) { + if (isPresent) { + final.value[key] = void 0; } - return this._map.get(schema); - } - has(schema) { - return this._map.has(schema); + } else { + final.value[key] = result.value; } -}; -function registry2() { - return new $ZodRegistry2(); } -(_a3 = globalThis).__zod_globalRegistry ?? (_a3.__zod_globalRegistry = registry2()); -var globalRegistry2 = globalThis.__zod_globalRegistry; - -// node_modules/zod/v4/core/api.js -// @__NO_SIDE_EFFECTS__ -function _string2(Class4, params) { - return new Class4({ - type: "string", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedString2(Class4, params) { - return new Class4({ - type: "string", - coerce: true, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _email2(Class4, params) { - return new Class4({ - type: "string", - format: "email", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _guid2(Class4, params) { - return new Class4({ - type: "string", - format: "guid", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuid2(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuidv42(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v4", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuidv62(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v6", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uuidv72(Class4, params) { - return new Class4({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v7", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _url2(Class4, params) { - return new Class4({ - type: "string", - format: "url", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _emoji4(Class4, params) { - return new Class4({ - type: "string", - format: "emoji", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _nanoid2(Class4, params) { - return new Class4({ - type: "string", - format: "nanoid", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); +function normalizeDef2(def) { + const keys = Object.keys(def.shape); + for (const k of keys) { + if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { + throw new Error(`Invalid element at key "${k}": expected a Zod schema`); + } + } + const okeys = optionalKeys2(def.shape); + return { + ...def, + keys, + keySet: new Set(keys), + numKeys: keys.length, + optionalKeys: new Set(okeys) + }; } -// @__NO_SIDE_EFFECTS__ -function _cuid3(Class4, params) { - return new Class4({ - type: "string", - format: "cuid", - check: "string_format", - abort: false, - ...normalizeParams2(params) +function handleCatchall2(proms, input, payload, ctx, def, inst) { + const unrecognized = []; + const keySet = def.keySet; + const _catchall = def.catchall._zod; + const t = _catchall.def.type; + const isOptionalIn = _catchall.optin === "optional"; + const isOptionalOut = _catchall.optout === "optional"; + for (const key in input) { + if (key === "__proto__") + continue; + if (keySet.has(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((r2) => handlePropertyResult2(r2, payload, key, input, isOptionalIn, isOptionalOut))); + } else { + handlePropertyResult2(r, payload, key, input, isOptionalIn, isOptionalOut); + } + } + if (unrecognized.length) { + payload.issues.push({ + code: "unrecognized_keys", + keys: unrecognized, + input, + inst + }); + } + if (!proms.length) + return payload; + return Promise.all(proms).then(() => { + return payload; }); } -// @__NO_SIDE_EFFECTS__ -function _cuid22(Class4, params) { - return new Class4({ - type: "string", - format: "cuid2", - check: "string_format", - abort: false, - ...normalizeParams2(params) +var $ZodObject2 = /* @__PURE__ */ $constructor2("$ZodObject", (inst, def) => { + $ZodType2.init(inst, def); + const desc = Object.getOwnPropertyDescriptor(def, "shape"); + if (!desc?.get) { + const sh = def.shape; + Object.defineProperty(def, "shape", { + get: () => { + const newSh = { ...sh }; + Object.defineProperty(def, "shape", { + value: newSh + }); + return newSh; + } + }); + } + const _normalized = cached2(() => normalizeDef2(def)); + defineLazy2(inst._zod, "propValues", () => { + const shape = def.shape; + const propValues = {}; + for (const key in shape) { + const field = shape[key]._zod; + if (field.values) { + propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); + for (const v of field.values) + propValues[key].add(v); + } + } + return propValues; }); -} -// @__NO_SIDE_EFFECTS__ -function _ulid2(Class4, params) { - return new Class4({ - type: "string", - format: "ulid", - check: "string_format", - abort: false, - ...normalizeParams2(params) + const isObject4 = isObject3; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject4(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + payload.value = {}; + const proms = []; + const shape = value.shape; + for (const key of value.keys) { + const el = shape[key]; + const isOptionalIn = el._zod.optin === "optional"; + const isOptionalOut = el._zod.optout === "optional"; + const r = el._zod.run({ value: input[key], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((r2) => handlePropertyResult2(r2, payload, key, input, isOptionalIn, isOptionalOut))); + } else { + handlePropertyResult2(r, payload, key, input, isOptionalIn, isOptionalOut); + } + } + if (!catchall) { + return proms.length ? Promise.all(proms).then(() => payload) : payload; + } + return handleCatchall2(proms, input, payload, ctx, _normalized.value, inst); + }; +}); +var $ZodObjectJIT2 = /* @__PURE__ */ $constructor2("$ZodObjectJIT", (inst, def) => { + $ZodObject2.init(inst, def); + const superParse = inst._zod.parse; + const _normalized = cached2(() => normalizeDef2(def)); + const generateFastpass = (shape) => { + const doc = new Doc2(["shape", "payload", "ctx"]); + const normalized = _normalized.value; + const parseStr = (key) => { + const k = esc2(key); + return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; + }; + doc.write(`const input = payload.value;`); + const ids = /* @__PURE__ */ Object.create(null); + let counter = 0; + for (const key of normalized.keys) { + ids[key] = `key_${counter++}`; + } + doc.write(`const newResult = {};`); + for (const key of normalized.keys) { + const id = ids[key]; + const k = esc2(key); + const schema = shape[key]; + const isOptionalIn = schema?._zod?.optin === "optional"; + const isOptionalOut = schema?._zod?.optout === "optional"; + doc.write(`const ${id} = ${parseStr(key)};`); + if (isOptionalIn && isOptionalOut) { + doc.write(` + if (${id}.issues.length) { + if (${k} in input) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + } + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; + } + + `); + } else if (!isOptionalIn) { + doc.write(` + const ${id}_present = ${k} in input; + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + if (!${id}_present && !${id}.issues.length) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: undefined, + path: [${k}] + }); + } + + if (${id}_present) { + if (${id}.value === undefined) { + newResult[${k}] = undefined; + } else { + newResult[${k}] = ${id}.value; + } + } + + `); + } else { + doc.write(` + if (${id}.issues.length) { + payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${k}, ...iss.path] : [${k}] + }))); + } + + if (${id}.value === undefined) { + if (${k} in input) { + newResult[${k}] = undefined; + } + } else { + newResult[${k}] = ${id}.value; + } + + `); + } + } + doc.write(`payload.value = newResult;`); + doc.write(`return payload;`); + const fn = doc.compile(); + return (payload, ctx) => fn(shape, payload, ctx); + }; + let fastpass; + const isObject4 = isObject3; + const jit = !globalConfig2.jitless; + const allowsEval3 = allowsEval2; + const fastEnabled = jit && allowsEval3.value; + const catchall = def.catchall; + let value; + inst._zod.parse = (payload, ctx) => { + value ?? (value = _normalized.value); + const input = payload.value; + if (!isObject4(input)) { + payload.issues.push({ + expected: "object", + code: "invalid_type", + input, + inst + }); + return payload; + } + if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { + if (!fastpass) + fastpass = generateFastpass(def.shape); + payload = fastpass(payload, ctx); + if (!catchall) + return payload; + return handleCatchall2([], input, payload, ctx, value, inst); + } + return superParse(payload, ctx); + }; +}); +function handleUnionResults2(results, final, inst, ctx) { + for (const result of results) { + if (result.issues.length === 0) { + final.value = result.value; + return final; + } + } + const nonaborted = results.filter((r) => !aborted2(r)); + if (nonaborted.length === 1) { + final.value = nonaborted[0].value; + return nonaborted[0]; + } + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) }); + return final; } -// @__NO_SIDE_EFFECTS__ -function _xid2(Class4, params) { - return new Class4({ - type: "string", - format: "xid", - check: "string_format", - abort: false, - ...normalizeParams2(params) +var $ZodUnion2 = /* @__PURE__ */ $constructor2("$ZodUnion", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); + defineLazy2(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); + defineLazy2(inst._zod, "values", () => { + if (def.options.every((o) => o._zod.values)) { + return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); + } + return void 0; }); -} -// @__NO_SIDE_EFFECTS__ -function _ksuid2(Class4, params) { - return new Class4({ - type: "string", - format: "ksuid", - check: "string_format", - abort: false, - ...normalizeParams2(params) + defineLazy2(inst._zod, "pattern", () => { + if (def.options.every((o) => o._zod.pattern)) { + const patterns = def.options.map((o) => o._zod.pattern); + return new RegExp(`^(${patterns.map((p) => cleanRegex2(p.source)).join("|")})$`); + } + return void 0; }); + const first = def.options.length === 1 ? def.options[0]._zod.run : null; + inst._zod.parse = (payload, ctx) => { + if (first) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + if (result.issues.length === 0) + return result; + results.push(result); + } + } + if (!async) + return handleUnionResults2(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleUnionResults2(results2, payload, inst, ctx); + }); + }; +}); +function handleExclusiveUnionResults2(results, final, inst, ctx) { + const successes = results.filter((r) => r.issues.length === 0); + if (successes.length === 1) { + final.value = successes[0].value; + return final; + } + if (successes.length === 0) { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: results.map((result) => result.issues.map((iss) => finalizeIssue2(iss, ctx, config2()))) + }); + } else { + final.issues.push({ + code: "invalid_union", + input: final.value, + inst, + errors: [], + inclusive: false + }); + } + return final; } -// @__NO_SIDE_EFFECTS__ -function _ipv42(Class4, params) { - return new Class4({ - type: "string", - format: "ipv4", - check: "string_format", - abort: false, - ...normalizeParams2(params) +var $ZodXor2 = /* @__PURE__ */ $constructor2("$ZodXor", (inst, def) => { + $ZodUnion2.init(inst, def); + def.inclusive = false; + const first = def.options.length === 1 ? def.options[0]._zod.run : null; + inst._zod.parse = (payload, ctx) => { + if (first) { + return first(payload, ctx); + } + let async = false; + const results = []; + for (const option of def.options) { + const result = option._zod.run({ + value: payload.value, + issues: [] + }, ctx); + if (result instanceof Promise) { + results.push(result); + async = true; + } else { + results.push(result); + } + } + if (!async) + return handleExclusiveUnionResults2(results, payload, inst, ctx); + return Promise.all(results).then((results2) => { + return handleExclusiveUnionResults2(results2, payload, inst, ctx); + }); + }; +}); +var $ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor2("$ZodDiscriminatedUnion", (inst, def) => { + def.inclusive = false; + $ZodUnion2.init(inst, def); + const _super = inst._zod.parse; + defineLazy2(inst._zod, "propValues", () => { + const propValues = {}; + for (const option of def.options) { + const pv = option._zod.propValues; + if (!pv || Object.keys(pv).length === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); + for (const [k, v] of Object.entries(pv)) { + if (!propValues[k]) + propValues[k] = /* @__PURE__ */ new Set(); + for (const val of v) { + propValues[k].add(val); + } + } + } + return propValues; }); -} -// @__NO_SIDE_EFFECTS__ -function _ipv62(Class4, params) { - return new Class4({ - type: "string", - format: "ipv6", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _mac2(Class4, params) { - return new Class4({ - type: "string", - format: "mac", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _cidrv42(Class4, params) { - return new Class4({ - type: "string", - format: "cidrv4", - check: "string_format", - abort: false, - ...normalizeParams2(params) + const disc = cached2(() => { + const opts = def.options; + const map3 = /* @__PURE__ */ new Map(); + for (const o of opts) { + const values = o._zod.propValues?.[def.discriminator]; + if (!values || values.size === 0) + throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); + for (const v of values) { + if (map3.has(v)) { + throw new Error(`Duplicate discriminator value "${String(v)}"`); + } + map3.set(v, o); + } + } + return map3; }); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isObject3(input)) { + payload.issues.push({ + code: "invalid_type", + expected: "object", + input, + inst + }); + return payload; + } + const opt = disc.value.get(input?.[def.discriminator]); + if (opt) { + return opt._zod.run(payload, ctx); + } + if (def.unionFallback || ctx.direction === "backward") { + return _super(payload, ctx); + } + payload.issues.push({ + code: "invalid_union", + errors: [], + note: "No matching discriminator", + discriminator: def.discriminator, + options: Array.from(disc.value.keys()), + input, + path: [def.discriminator], + inst + }); + return payload; + }; +}); +var $ZodIntersection2 = /* @__PURE__ */ $constructor2("$ZodIntersection", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + const left = def.left._zod.run({ value: input, issues: [] }, ctx); + const right = def.right._zod.run({ value: input, issues: [] }, ctx); + const async = left instanceof Promise || right instanceof Promise; + if (async) { + return Promise.all([left, right]).then(([left2, right2]) => { + return handleIntersectionResults2(payload, left2, right2); + }); + } + return handleIntersectionResults2(payload, left, right); + }; +}); +function mergeValues2(a, b) { + if (a === b) { + return { valid: true, data: a }; + } + if (a instanceof Date && b instanceof Date && +a === +b) { + return { valid: true, data: a }; + } + if (isPlainObject3(a) && isPlainObject3(b)) { + const bKeys = Object.keys(b); + const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); + const newObj = { ...a, ...b }; + for (const key of sharedKeys) { + const sharedValue = mergeValues2(a[key], b[key]); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [key, ...sharedValue.mergeErrorPath] + }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + return { valid: false, mergeErrorPath: [] }; + } + const newArray = []; + for (let index = 0; index < a.length; index++) { + const itemA = a[index]; + const itemB = b[index]; + const sharedValue = mergeValues2(itemA, itemB); + if (!sharedValue.valid) { + return { + valid: false, + mergeErrorPath: [index, ...sharedValue.mergeErrorPath] + }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } + return { valid: false, mergeErrorPath: [] }; } -// @__NO_SIDE_EFFECTS__ -function _cidrv62(Class4, params) { - return new Class4({ - type: "string", - format: "cidrv6", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); +function handleIntersectionResults2(result, left, right) { + const unrecKeys = /* @__PURE__ */ new Map(); + let unrecIssue; + for (const iss of left.issues) { + if (iss.code === "unrecognized_keys") { + unrecIssue ?? (unrecIssue = iss); + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).l = true; + } + } else { + result.issues.push(iss); + } + } + for (const iss of right.issues) { + if (iss.code === "unrecognized_keys") { + for (const k of iss.keys) { + if (!unrecKeys.has(k)) + unrecKeys.set(k, {}); + unrecKeys.get(k).r = true; + } + } else { + result.issues.push(iss); + } + } + const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); + if (bothKeys.length && unrecIssue) { + result.issues.push({ ...unrecIssue, keys: bothKeys }); + } + if (aborted2(result)) + return result; + const merged = mergeValues2(left.value, right.value); + if (!merged.valid) { + throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); + } + result.value = merged.data; + return result; } -// @__NO_SIDE_EFFECTS__ -function _base642(Class4, params) { - return new Class4({ - type: "string", - format: "base64", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); +var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => { + $ZodType2.init(inst, def); + const items = def.items; + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!Array.isArray(input)) { + payload.issues.push({ + input, + inst, + expected: "tuple", + code: "invalid_type" + }); + return payload; + } + payload.value = []; + const proms = []; + const optinStart = getTupleOptStart(items, "optin"); + const optoutStart = getTupleOptStart(items, "optout"); + if (!def.rest) { + if (input.length < optinStart) { + payload.issues.push({ + code: "too_small", + minimum: optinStart, + inclusive: true, + input, + inst, + origin: "array" + }); + return payload; + } + if (input.length > items.length) { + payload.issues.push({ + code: "too_big", + maximum: items.length, + inclusive: true, + input, + inst, + origin: "array" + }); + } + } + const itemResults = new Array(items.length); + for (let i = 0; i < items.length; i++) { + const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx); + if (r instanceof Promise) { + proms.push(r.then((rr) => { + itemResults[i] = rr; + })); + } else { + itemResults[i] = r; + } + } + if (def.rest) { + let i = items.length - 1; + const rest = input.slice(items.length); + for (const el of rest) { + i++; + const result = def.rest._zod.run({ value: el, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((r) => handleTupleResult2(r, payload, i))); + } else { + handleTupleResult2(result, payload, i); + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart)); + } + return handleTupleResults(itemResults, payload, items, input, optoutStart); + }; +}); +function getTupleOptStart(items, key) { + for (let i = items.length - 1; i >= 0; i--) { + if (items[i]._zod[key] !== "optional") + return i + 1; + } + return 0; } -// @__NO_SIDE_EFFECTS__ -function _base64url2(Class4, params) { - return new Class4({ - type: "string", - format: "base64url", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); +function handleTupleResult2(result, final, index) { + if (result.issues.length) { + final.issues.push(...prefixIssues2(index, result.issues)); + } + final.value[index] = result.value; } -// @__NO_SIDE_EFFECTS__ -function _e1642(Class4, params) { - return new Class4({ - type: "string", - format: "e164", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); +function handleTupleResults(itemResults, final, items, input, optoutStart) { + for (let i = 0; i < items.length; i++) { + const r = itemResults[i]; + const isPresent = i < input.length; + if (r.issues.length) { + if (!isPresent && i >= optoutStart) { + final.value.length = i; + break; + } + final.issues.push(...prefixIssues2(i, r.issues)); + } + final.value[i] = r.value; + } + for (let i = final.value.length - 1; i >= input.length; i--) { + if (items[i]._zod.optout === "optional" && final.value[i] === void 0) { + final.value.length = i; + } else { + break; + } + } + return final; } -// @__NO_SIDE_EFFECTS__ -function _jwt2(Class4, params) { - return new Class4({ - type: "string", - format: "jwt", - check: "string_format", - abort: false, - ...normalizeParams2(params) - }); +var $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!isPlainObject3(input)) { + payload.issues.push({ + expected: "record", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + const values = def.keyType._zod.values; + if (values) { + payload.value = {}; + const recordKeys = /* @__PURE__ */ new Set(); + for (const key of values) { + if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { + recordKeys.add(typeof key === "number" ? key.toString() : key); + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (keyResult.issues.length) { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + continue; + } + const outKey = keyResult.value; + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues2(key, result2.issues)); + } + payload.value[outKey] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues2(key, result.issues)); + } + payload.value[outKey] = result.value; + } + } + } + let unrecognized; + for (const key in input) { + if (!recordKeys.has(key)) { + unrecognized = unrecognized ?? []; + unrecognized.push(key); + } + } + if (unrecognized && unrecognized.length > 0) { + payload.issues.push({ + code: "unrecognized_keys", + input, + inst, + keys: unrecognized + }); + } + } else { + payload.value = {}; + for (const key of Reflect.ownKeys(input)) { + if (key === "__proto__") + continue; + if (!Object.prototype.propertyIsEnumerable.call(input, key)) + continue; + let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + if (keyResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + const checkNumericKey = typeof key === "string" && number4.test(key) && keyResult.issues.length; + if (checkNumericKey) { + const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); + if (retryResult instanceof Promise) { + throw new Error("Async schemas not supported in object keys currently"); + } + if (retryResult.issues.length === 0) { + keyResult = retryResult; + } + } + if (keyResult.issues.length) { + if (def.mode === "loose") { + payload.value[key] = input[key]; + } else { + payload.issues.push({ + code: "invalid_key", + origin: "record", + issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())), + input: key, + path: [key], + inst + }); + } + continue; + } + const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => { + if (result2.issues.length) { + payload.issues.push(...prefixIssues2(key, result2.issues)); + } + payload.value[keyResult.value] = result2.value; + })); + } else { + if (result.issues.length) { + payload.issues.push(...prefixIssues2(key, result.issues)); + } + payload.value[keyResult.value] = result.value; + } + } + } + if (proms.length) { + return Promise.all(proms).then(() => payload); + } + return payload; + }; +}); +var $ZodMap2 = /* @__PURE__ */ $constructor2("$ZodMap", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Map)) { + payload.issues.push({ + expected: "map", + code: "invalid_type", + input, + inst + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Map(); + for (const [key, value] of input) { + const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); + const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); + if (keyResult instanceof Promise || valueResult instanceof Promise) { + proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { + handleMapResult2(keyResult2, valueResult2, payload, key, input, inst, ctx); + })); + } else { + handleMapResult2(keyResult, valueResult, payload, key, input, inst, ctx); + } + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleMapResult2(keyResult, valueResult, final, key, input, inst, ctx) { + if (keyResult.issues.length) { + if (propertyKeyTypes2.has(typeof key)) { + final.issues.push(...prefixIssues2(key, keyResult.issues)); + } else { + final.issues.push({ + code: "invalid_key", + origin: "map", + input, + inst, + issues: keyResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }); + } + } + if (valueResult.issues.length) { + if (propertyKeyTypes2.has(typeof key)) { + final.issues.push(...prefixIssues2(key, valueResult.issues)); + } else { + final.issues.push({ + origin: "map", + code: "invalid_element", + input, + inst, + key, + issues: valueResult.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }); + } + } + final.value.set(keyResult.value, valueResult.value); } -var TimePrecision2 = { - Any: null, - Minute: -1, - Second: 0, - Millisecond: 3, - Microsecond: 6 -}; -// @__NO_SIDE_EFFECTS__ -function _isoDateTime2(Class4, params) { - return new Class4({ - type: "string", - format: "datetime", - check: "string_format", - offset: false, - local: false, - precision: null, - ...normalizeParams2(params) - }); +var $ZodSet2 = /* @__PURE__ */ $constructor2("$ZodSet", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + const input = payload.value; + if (!(input instanceof Set)) { + payload.issues.push({ + input, + inst, + expected: "set", + code: "invalid_type" + }); + return payload; + } + const proms = []; + payload.value = /* @__PURE__ */ new Set(); + for (const item of input) { + const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); + if (result instanceof Promise) { + proms.push(result.then((result2) => handleSetResult2(result2, payload))); + } else + handleSetResult2(result, payload); + } + if (proms.length) + return Promise.all(proms).then(() => payload); + return payload; + }; +}); +function handleSetResult2(result, final) { + if (result.issues.length) { + final.issues.push(...result.issues); + } + final.value.add(result.value); } -// @__NO_SIDE_EFFECTS__ -function _isoDate2(Class4, params) { - return new Class4({ - type: "string", - format: "date", - check: "string_format", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _isoTime2(Class4, params) { - return new Class4({ - type: "string", - format: "time", - check: "string_format", - precision: null, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _isoDuration2(Class4, params) { - return new Class4({ - type: "string", - format: "duration", - check: "string_format", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _number2(Class4, params) { - return new Class4({ - type: "number", - checks: [], - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedNumber2(Class4, params) { - return new Class4({ - type: "number", - coerce: true, - checks: [], - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _int2(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "safeint", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _float322(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "float32", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _float642(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "float64", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _int322(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "int32", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uint322(Class4, params) { - return new Class4({ - type: "number", - check: "number_format", - abort: false, - format: "uint32", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _boolean2(Class4, params) { - return new Class4({ - type: "boolean", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedBoolean2(Class4, params) { - return new Class4({ - type: "boolean", - coerce: true, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _bigint2(Class4, params) { - return new Class4({ - type: "bigint", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _coercedBigint2(Class4, params) { - return new Class4({ - type: "bigint", - coerce: true, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _int642(Class4, params) { - return new Class4({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "int64", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uint642(Class4, params) { - return new Class4({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "uint64", - ...normalizeParams2(params) - }); +var $ZodEnum2 = /* @__PURE__ */ $constructor2("$ZodEnum", (inst, def) => { + $ZodType2.init(inst, def); + const values = getEnumValues2(def.entries); + const valuesSet = new Set(values); + inst._zod.values = valuesSet; + inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes2.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex2(o) : o.toString()).join("|")})$`); + 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; + }; +}); +var $ZodLiteral2 = /* @__PURE__ */ $constructor2("$ZodLiteral", (inst, def) => { + $ZodType2.init(inst, def); + if (def.values.length === 0) { + throw new Error("Cannot create literal schema with no valid values"); + } + const values = new Set(def.values); + inst._zod.values = values; + inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex2(o) : o ? escapeRegex2(o.toString()) : String(o)).join("|")})$`); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (values.has(input)) { + return payload; + } + payload.issues.push({ + code: "invalid_value", + values: def.values, + input, + inst + }); + return payload; + }; +}); +var $ZodFile2 = /* @__PURE__ */ $constructor2("$ZodFile", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + const input = payload.value; + if (input instanceof File) + return payload; + payload.issues.push({ + expected: "file", + code: "invalid_type", + input, + inst + }); + return payload; + }; +}); +var $ZodTransform2 = /* @__PURE__ */ $constructor2("$ZodTransform", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError2(inst.constructor.name); + } + const _out = def.transform(payload.value, payload); + if (ctx.async) { + const output = _out instanceof Promise ? _out : Promise.resolve(_out); + return output.then((output2) => { + payload.value = output2; + payload.fallback = true; + return payload; + }); + } + if (_out instanceof Promise) { + throw new $ZodAsyncError2(); + } + payload.value = _out; + payload.fallback = true; + return payload; + }; +}); +function handleOptionalResult2(result, input) { + if (input === void 0 && (result.issues.length || result.fallback)) { + return { issues: [], value: void 0 }; + } + return result; } -// @__NO_SIDE_EFFECTS__ -function _symbol2(Class4, params) { - return new Class4({ - type: "symbol", - ...normalizeParams2(params) +var $ZodOptional2 = /* @__PURE__ */ $constructor2("$ZodOptional", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + inst._zod.optout = "optional"; + defineLazy2(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; }); -} -// @__NO_SIDE_EFFECTS__ -function _undefined5(Class4, params) { - return new Class4({ - type: "undefined", - ...normalizeParams2(params) + defineLazy2(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex2(pattern.source)})?$`) : void 0; }); -} -// @__NO_SIDE_EFFECTS__ -function _null5(Class4, params) { - return new Class4({ - type: "null", - ...normalizeParams2(params) + inst._zod.parse = (payload, ctx) => { + if (def.innerType._zod.optin === "optional") { + const input = payload.value; + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) + return result.then((r) => handleOptionalResult2(r, input)); + return handleOptionalResult2(result, input); + } + if (payload.value === void 0) { + return payload; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodExactOptional2 = /* @__PURE__ */ $constructor2("$ZodExactOptional", (inst, def) => { + $ZodOptional2.init(inst, def); + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + defineLazy2(inst._zod, "pattern", () => def.innerType._zod.pattern); + inst._zod.parse = (payload, ctx) => { + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNullable2 = /* @__PURE__ */ $constructor2("$ZodNullable", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "optin", () => def.innerType._zod.optin); + defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy2(inst._zod, "pattern", () => { + const pattern = def.innerType._zod.pattern; + return pattern ? new RegExp(`^(${cleanRegex2(pattern.source)}|null)$`) : void 0; }); -} -// @__NO_SIDE_EFFECTS__ -function _any2(Class4) { - return new Class4({ - type: "any" + defineLazy2(inst._zod, "values", () => { + return def.innerType._zod.values ? /* @__PURE__ */ new Set([...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); + }; +}); +var $ZodDefault2 = /* @__PURE__ */ $constructor2("$ZodDefault", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + return payload; + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleDefaultResult2(result2, def)); + } + return handleDefaultResult2(result, def); + }; +}); +function handleDefaultResult2(payload, def) { + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return payload; } -// @__NO_SIDE_EFFECTS__ -function _unknown2(Class4) { - return new Class4({ - type: "unknown" +var $ZodPrefault2 = /* @__PURE__ */ $constructor2("$ZodPrefault", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + if (payload.value === void 0) { + payload.value = def.defaultValue; + } + return def.innerType._zod.run(payload, ctx); + }; +}); +var $ZodNonOptional2 = /* @__PURE__ */ $constructor2("$ZodNonOptional", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "values", () => { + const v = def.innerType._zod.values; + return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; }); + inst._zod.parse = (payload, ctx) => { + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => handleNonOptionalResult2(result2, inst)); + } + return handleNonOptionalResult2(result, inst); + }; +}); +function handleNonOptionalResult2(payload, inst) { + if (!payload.issues.length && payload.value === void 0) { + payload.issues.push({ + code: "invalid_type", + expected: "nonoptional", + input: payload.value, + inst + }); + } + return payload; } -// @__NO_SIDE_EFFECTS__ -function _never2(Class4, params) { - return new Class4({ - type: "never", - ...normalizeParams2(params) - }); +var $ZodSuccess2 = /* @__PURE__ */ $constructor2("$ZodSuccess", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + throw new $ZodEncodeError2("ZodSuccess"); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.issues.length === 0; + return payload; + }); + } + payload.value = result.issues.length === 0; + return payload; + }; +}); +var $ZodCatch2 = /* @__PURE__ */ $constructor2("$ZodCatch", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.optin = "optional"; + defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout); + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then((result2) => { + payload.value = result2.value; + if (result2.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result2.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + payload.fallback = true; + } + return payload; + }); + } + payload.value = result.value; + if (result.issues.length) { + payload.value = def.catchValue({ + ...payload, + error: { + issues: result.issues.map((iss) => finalizeIssue2(iss, ctx, config2())) + }, + input: payload.value + }); + payload.issues = []; + payload.fallback = true; + } + return payload; + }; +}); +var $ZodNaN2 = /* @__PURE__ */ $constructor2("$ZodNaN", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + expected: "nan", + code: "invalid_type" + }); + return payload; + } + return payload; + }; +}); +var $ZodPipe2 = /* @__PURE__ */ $constructor2("$ZodPipe", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "values", () => def.in._zod.values); + defineLazy2(inst._zod, "optin", () => def.in._zod.optin); + defineLazy2(inst._zod, "optout", () => def.out._zod.optout); + defineLazy2(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handlePipeResult2(right2, def.in, ctx)); + } + return handlePipeResult2(right, def.in, ctx); + } + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handlePipeResult2(left2, def.out, ctx)); + } + return handlePipeResult2(left, def.out, ctx); + }; +}); +function handlePipeResult2(left, next, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx); } -// @__NO_SIDE_EFFECTS__ -function _void3(Class4, params) { - return new Class4({ - type: "void", - ...normalizeParams2(params) - }); +var $ZodCodec2 = /* @__PURE__ */ $constructor2("$ZodCodec", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "values", () => def.in._zod.values); + defineLazy2(inst._zod, "optin", () => def.in._zod.optin); + defineLazy2(inst._zod, "optout", () => def.out._zod.optout); + defineLazy2(inst._zod, "propValues", () => def.in._zod.propValues); + inst._zod.parse = (payload, ctx) => { + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const left = def.in._zod.run(payload, ctx); + if (left instanceof Promise) { + return left.then((left2) => handleCodecAResult2(left2, def, ctx)); + } + return handleCodecAResult2(left, def, ctx); + } else { + const right = def.out._zod.run(payload, ctx); + if (right instanceof Promise) { + return right.then((right2) => handleCodecAResult2(right2, def, ctx)); + } + return handleCodecAResult2(right, def, ctx); + } + }; +}); +function handleCodecAResult2(result, def, ctx) { + if (result.issues.length) { + result.aborted = true; + return result; + } + const direction = ctx.direction || "forward"; + if (direction === "forward") { + const transformed = def.transform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult2(result, value, def.out, ctx)); + } + return handleCodecTxResult2(result, transformed, def.out, ctx); + } else { + const transformed = def.reverseTransform(result.value, result); + if (transformed instanceof Promise) { + return transformed.then((value) => handleCodecTxResult2(result, value, def.in, ctx)); + } + return handleCodecTxResult2(result, transformed, def.in, ctx); + } } -// @__NO_SIDE_EFFECTS__ -function _date2(Class4, params) { - return new Class4({ - type: "date", - ...normalizeParams2(params) - }); +function handleCodecTxResult2(left, value, nextSchema, ctx) { + if (left.issues.length) { + left.aborted = true; + return left; + } + return nextSchema._zod.run({ value, issues: left.issues }, ctx); } -// @__NO_SIDE_EFFECTS__ -function _coercedDate2(Class4, params) { - return new Class4({ - type: "date", - coerce: true, - ...normalizeParams2(params) - }); +var $ZodPreprocess = /* @__PURE__ */ $constructor2("$ZodPreprocess", (inst, def) => { + $ZodPipe2.init(inst, def); +}); +var $ZodReadonly2 = /* @__PURE__ */ $constructor2("$ZodReadonly", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "propValues", () => def.innerType._zod.propValues); + defineLazy2(inst._zod, "values", () => def.innerType._zod.values); + defineLazy2(inst._zod, "optin", () => def.innerType?._zod?.optin); + defineLazy2(inst._zod, "optout", () => def.innerType?._zod?.optout); + inst._zod.parse = (payload, ctx) => { + if (ctx.direction === "backward") { + return def.innerType._zod.run(payload, ctx); + } + const result = def.innerType._zod.run(payload, ctx); + if (result instanceof Promise) { + return result.then(handleReadonlyResult2); + } + return handleReadonlyResult2(result); + }; +}); +function handleReadonlyResult2(payload) { + payload.value = Object.freeze(payload.value); + return payload; } -// @__NO_SIDE_EFFECTS__ -function _nan2(Class4, params) { - return new Class4({ - type: "nan", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _lt2(value, params) { - return new $ZodCheckLessThan2({ - check: "less_than", - ...normalizeParams2(params), - value, - inclusive: false - }); -} -// @__NO_SIDE_EFFECTS__ -function _lte2(value, params) { - return new $ZodCheckLessThan2({ - check: "less_than", - ...normalizeParams2(params), - value, - inclusive: true - }); -} -// @__NO_SIDE_EFFECTS__ -function _gt2(value, params) { - return new $ZodCheckGreaterThan2({ - check: "greater_than", - ...normalizeParams2(params), - value, - inclusive: false - }); -} -// @__NO_SIDE_EFFECTS__ -function _gte2(value, params) { - return new $ZodCheckGreaterThan2({ - check: "greater_than", - ...normalizeParams2(params), - value, - inclusive: true - }); -} -// @__NO_SIDE_EFFECTS__ -function _positive2(params) { - return /* @__PURE__ */ _gt2(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _negative2(params) { - return /* @__PURE__ */ _lt2(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _nonpositive2(params) { - return /* @__PURE__ */ _lte2(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _nonnegative2(params) { - return /* @__PURE__ */ _gte2(0, params); -} -// @__NO_SIDE_EFFECTS__ -function _multipleOf2(value, params) { - return new $ZodCheckMultipleOf2({ - check: "multiple_of", - ...normalizeParams2(params), - value - }); -} -// @__NO_SIDE_EFFECTS__ -function _maxSize2(maximum, params) { - return new $ZodCheckMaxSize2({ - check: "max_size", - ...normalizeParams2(params), - maximum - }); -} -// @__NO_SIDE_EFFECTS__ -function _minSize2(minimum, params) { - return new $ZodCheckMinSize2({ - check: "min_size", - ...normalizeParams2(params), - minimum - }); -} -// @__NO_SIDE_EFFECTS__ -function _size2(size, params) { - return new $ZodCheckSizeEquals2({ - check: "size_equals", - ...normalizeParams2(params), - size - }); -} -// @__NO_SIDE_EFFECTS__ -function _maxLength2(maximum, params) { - const ch = new $ZodCheckMaxLength2({ - check: "max_length", - ...normalizeParams2(params), - maximum - }); - return ch; -} -// @__NO_SIDE_EFFECTS__ -function _minLength2(minimum, params) { - return new $ZodCheckMinLength2({ - check: "min_length", - ...normalizeParams2(params), - minimum - }); -} -// @__NO_SIDE_EFFECTS__ -function _length2(length, params) { - return new $ZodCheckLengthEquals2({ - check: "length_equals", - ...normalizeParams2(params), - length - }); -} -// @__NO_SIDE_EFFECTS__ -function _regex2(pattern, params) { - return new $ZodCheckRegex2({ - check: "string_format", - format: "regex", - ...normalizeParams2(params), - pattern - }); -} -// @__NO_SIDE_EFFECTS__ -function _lowercase2(params) { - return new $ZodCheckLowerCase2({ - check: "string_format", - format: "lowercase", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _uppercase2(params) { - return new $ZodCheckUpperCase2({ - check: "string_format", - format: "uppercase", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _includes2(includes, params) { - return new $ZodCheckIncludes2({ - check: "string_format", - format: "includes", - ...normalizeParams2(params), - includes - }); -} -// @__NO_SIDE_EFFECTS__ -function _startsWith2(prefix, params) { - return new $ZodCheckStartsWith2({ - check: "string_format", - format: "starts_with", - ...normalizeParams2(params), - prefix - }); -} -// @__NO_SIDE_EFFECTS__ -function _endsWith2(suffix, params) { - return new $ZodCheckEndsWith2({ - check: "string_format", - format: "ends_with", - ...normalizeParams2(params), - suffix - }); -} -// @__NO_SIDE_EFFECTS__ -function _property2(property, schema, params) { - return new $ZodCheckProperty2({ - check: "property", - property, - schema, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _mime2(types, params) { - return new $ZodCheckMimeType2({ - check: "mime_type", - mime: types, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _overwrite2(tx) { - return new $ZodCheckOverwrite2({ - check: "overwrite", - tx - }); -} -// @__NO_SIDE_EFFECTS__ -function _normalize2(form) { - return /* @__PURE__ */ _overwrite2((input) => input.normalize(form)); -} -// @__NO_SIDE_EFFECTS__ -function _trim2() { - return /* @__PURE__ */ _overwrite2((input) => input.trim()); -} -// @__NO_SIDE_EFFECTS__ -function _toLowerCase2() { - return /* @__PURE__ */ _overwrite2((input) => input.toLowerCase()); -} -// @__NO_SIDE_EFFECTS__ -function _toUpperCase2() { - return /* @__PURE__ */ _overwrite2((input) => input.toUpperCase()); -} -// @__NO_SIDE_EFFECTS__ -function _slugify2() { - return /* @__PURE__ */ _overwrite2((input) => slugify2(input)); -} -// @__NO_SIDE_EFFECTS__ -function _array2(Class4, element, params) { - return new Class4({ - type: "array", - element, - // get element() { - // return element; - // }, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _union2(Class4, options, params) { - return new Class4({ - type: "union", - options, - ...normalizeParams2(params) - }); -} -function _xor2(Class4, options, params) { - return new Class4({ - type: "union", - options, - inclusive: false, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _discriminatedUnion2(Class4, discriminator, options, params) { - return new Class4({ - type: "union", - options, - discriminator, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _intersection2(Class4, left, right) { - return new Class4({ - type: "intersection", - left, - right - }); -} -// @__NO_SIDE_EFFECTS__ -function _tuple2(Class4, items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType2; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new Class4({ - type: "tuple", - items, - rest, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _record2(Class4, keyType, valueType, params) { - return new Class4({ - type: "record", - keyType, - valueType, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _map2(Class4, keyType, valueType, params) { - return new Class4({ - type: "map", - keyType, - valueType, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _set2(Class4, valueType, params) { - return new Class4({ - type: "set", - valueType, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _enum3(Class4, values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new Class4({ - type: "enum", - entries, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _nativeEnum2(Class4, entries, params) { - return new Class4({ - type: "enum", - entries, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _literal2(Class4, value, params) { - return new Class4({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _file2(Class4, params) { - return new Class4({ - type: "file", - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _transform2(Class4, fn) { - return new Class4({ - type: "transform", - transform: fn - }); -} -// @__NO_SIDE_EFFECTS__ -function _optional2(Class4, innerType) { - return new Class4({ - type: "optional", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _nullable2(Class4, innerType) { - return new Class4({ - type: "nullable", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _default3(Class4, innerType, defaultValue) { - return new Class4({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : shallowClone2(defaultValue); +var $ZodTemplateLiteral2 = /* @__PURE__ */ $constructor2("$ZodTemplateLiteral", (inst, def) => { + $ZodType2.init(inst, def); + const regexParts = []; + for (const part of def.parts) { + if (typeof part === "object" && part !== null) { + if (!part._zod.pattern) { + throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); + } + const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; + if (!source) + throw new Error(`Invalid template literal part: ${part._zod.traits}`); + const start = source.startsWith("^") ? 1 : 0; + const end = source.endsWith("$") ? source.length - 1 : source.length; + regexParts.push(source.slice(start, end)); + } else if (part === null || primitiveTypes2.has(typeof part)) { + regexParts.push(escapeRegex2(`${part}`)); + } else { + throw new Error(`Invalid template literal part: ${part}`); } - }); -} -// @__NO_SIDE_EFFECTS__ -function _nonoptional2(Class4, innerType, params) { - return new Class4({ - type: "nonoptional", - innerType, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _success2(Class4, innerType) { - return new Class4({ - type: "success", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _catch3(Class4, innerType, catchValue) { - return new Class4({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue - }); -} -// @__NO_SIDE_EFFECTS__ -function _pipe2(Class4, in_, out) { - return new Class4({ - type: "pipe", - in: in_, - out - }); -} -// @__NO_SIDE_EFFECTS__ -function _readonly2(Class4, innerType) { - return new Class4({ - type: "readonly", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _templateLiteral2(Class4, parts, params) { - return new Class4({ - type: "template_literal", - parts, - ...normalizeParams2(params) - }); -} -// @__NO_SIDE_EFFECTS__ -function _lazy2(Class4, getter) { - return new Class4({ - type: "lazy", - getter - }); -} -// @__NO_SIDE_EFFECTS__ -function _promise2(Class4, innerType) { - return new Class4({ - type: "promise", - innerType - }); -} -// @__NO_SIDE_EFFECTS__ -function _custom2(Class4, fn, _params) { - const norm = normalizeParams2(_params); - norm.abort ?? (norm.abort = true); - const schema = new Class4({ - type: "custom", - check: "custom", - fn, - ...norm - }); - return schema; -} -// @__NO_SIDE_EFFECTS__ -function _refine2(Class4, fn, _params) { - const schema = new Class4({ - type: "custom", - check: "custom", - fn, - ...normalizeParams2(_params) - }); - return schema; -} -// @__NO_SIDE_EFFECTS__ -function _superRefine2(fn, params) { - const ch = /* @__PURE__ */ _check2((payload) => { - payload.addIssue = (issue5) => { - if (typeof issue5 === "string") { - payload.issues.push(issue3(issue5, payload.value, ch._zod.def)); - } else { - const _issue = issue5; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = ch); - _issue.continue ?? (_issue.continue = !ch._zod.def.abort); - payload.issues.push(issue3(_issue)); + } + inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "string") { + payload.issues.push({ + input: payload.value, + inst, + expected: "string", + code: "invalid_type" + }); + return payload; + } + inst._zod.pattern.lastIndex = 0; + if (!inst._zod.pattern.test(payload.value)) { + payload.issues.push({ + input: payload.value, + inst, + code: "invalid_format", + format: def.format ?? "template_literal", + pattern: inst._zod.pattern.source + }); + return payload; + } + return payload; + }; +}); +var $ZodFunction2 = /* @__PURE__ */ $constructor2("$ZodFunction", (inst, def) => { + $ZodType2.init(inst, def); + inst._def = def; + inst._zod.def = def; + inst.implement = (func) => { + if (typeof func !== "function") { + throw new Error("implement() must be called with a function"); + } + return function(...args) { + const parsedArgs = inst._def.input ? parse3(inst._def.input, args) : args; + const result = Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return parse3(inst._def.output, result); } + return result; }; - return fn(payload.value, payload); - }, params); - return ch; -} -// @__NO_SIDE_EFFECTS__ -function _check2(fn, params) { - const ch = new $ZodCheck2({ - check: "custom", - ...normalizeParams2(params) - }); - ch._zod.check = fn; - return ch; -} -// @__NO_SIDE_EFFECTS__ -function describe3(description) { - const ch = new $ZodCheck2({ check: "describe" }); - ch._zod.onattach = [ - (inst) => { - const existing = globalRegistry2.get(inst) ?? {}; - globalRegistry2.add(inst, { ...existing, description }); + }; + inst.implementAsync = (func) => { + if (typeof func !== "function") { + throw new Error("implementAsync() must be called with a function"); } - ]; - ch._zod.check = () => { + return async function(...args) { + const parsedArgs = inst._def.input ? await parseAsync3(inst._def.input, args) : args; + const result = await Reflect.apply(func, this, parsedArgs); + if (inst._def.output) { + return await parseAsync3(inst._def.output, result); + } + return result; + }; }; - return ch; -} -// @__NO_SIDE_EFFECTS__ -function meta3(metadata) { - const ch = new $ZodCheck2({ check: "meta" }); - ch._zod.onattach = [ - (inst) => { - const existing = globalRegistry2.get(inst) ?? {}; - globalRegistry2.add(inst, { ...existing, ...metadata }); + inst._zod.parse = (payload, _ctx) => { + if (typeof payload.value !== "function") { + payload.issues.push({ + code: "invalid_type", + expected: "function", + input: payload.value, + inst + }); + return payload; } - ]; - ch._zod.check = () => { + const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; + if (hasPromiseOutput) { + payload.value = inst.implementAsync(payload.value); + } else { + payload.value = inst.implement(payload.value); + } + return payload; }; - return ch; -} -// @__NO_SIDE_EFFECTS__ -function _stringbool2(Classes, _params) { - const params = normalizeParams2(_params); - let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; - let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; - if (params.case !== "sensitive") { - truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); - falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); - } - const truthySet = new Set(truthyArray); - const falsySet = new Set(falsyArray); - const _Codec = Classes.Codec ?? $ZodCodec2; - const _Boolean = Classes.Boolean ?? $ZodBoolean2; - const _String = Classes.String ?? $ZodString2; - const stringSchema = new _String({ type: "string", error: params.error }); - const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); - const codec4 = new _Codec({ - type: "pipe", - in: stringSchema, - out: booleanSchema, - transform: ((input, payload) => { - let data = input; - if (params.case !== "sensitive") - data = data.toLowerCase(); - if (truthySet.has(data)) { - return true; - } else if (falsySet.has(data)) { - return false; - } else { - payload.issues.push({ - code: "invalid_value", - expected: "stringbool", - values: [...truthySet, ...falsySet], - input: payload.value, - inst: codec4, - continue: false - }); - return {}; - } - }), - reverseTransform: ((input, _payload) => { - if (input === true) { - return truthyArray[0] || "true"; - } else { - return falsyArray[0] || "false"; - } - }), - error: params.error + inst.input = (...args) => { + const F = inst.constructor; + if (Array.isArray(args[0])) { + return new F({ + type: "function", + input: new $ZodTuple2({ + type: "tuple", + items: args[0], + rest: args[1] + }), + output: inst._def.output + }); + } + return new F({ + type: "function", + input: args[0], + output: inst._def.output + }); + }; + inst.output = (output) => { + const F = inst.constructor; + return new F({ + type: "function", + input: inst._def.input, + output + }); + }; + return inst; +}); +var $ZodPromise2 = /* @__PURE__ */ $constructor2("$ZodPromise", (inst, def) => { + $ZodType2.init(inst, def); + inst._zod.parse = (payload, ctx) => { + return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); + }; +}); +var $ZodLazy2 = /* @__PURE__ */ $constructor2("$ZodLazy", (inst, def) => { + $ZodType2.init(inst, def); + defineLazy2(inst._zod, "innerType", () => { + const d = def; + if (!d._cachedInner) + d._cachedInner = def.getter(); + return d._cachedInner; }); - return codec4; -} -// @__NO_SIDE_EFFECTS__ -function _stringFormat2(Class4, format2, fnOrRegex, _params = {}) { - const params = normalizeParams2(_params); - const def = { - ...normalizeParams2(_params), - check: "string_format", - type: "string", - format: format2, - fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), - ...params + defineLazy2(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); + defineLazy2(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); + defineLazy2(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); + defineLazy2(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); + inst._zod.parse = (payload, ctx) => { + const inner = inst._zod.innerType; + return inner._zod.run(payload, ctx); }; - if (fnOrRegex instanceof RegExp) { - def.pattern = fnOrRegex; +}); +var $ZodCustom2 = /* @__PURE__ */ $constructor2("$ZodCustom", (inst, def) => { + $ZodCheck2.init(inst, def); + $ZodType2.init(inst, def); + inst._zod.parse = (payload, _) => { + return payload; + }; + inst._zod.check = (payload) => { + const input = payload.value; + const r = def.fn(input); + if (r instanceof Promise) { + return r.then((r2) => handleRefineResult2(r2, payload, input, inst)); + } + handleRefineResult2(r, payload, input, inst); + return; + }; +}); +function handleRefineResult2(result, payload, input, inst) { + if (!result) { + const _iss = { + code: "custom", + input, + inst, + // incorporates params.error into issue reporting + path: [...inst._zod.def.path ?? []], + // incorporates params.error into issue reporting + continue: !inst._zod.def.abort + // params: inst._zod.def.params, + }; + if (inst._zod.def.params) + _iss.params = inst._zod.def.params; + payload.issues.push(issue3(_iss)); } - const inst = new Class4(def); - return inst; } -// node_modules/zod/v4/core/to-json-schema.js -function initializeContext2(params) { - let target = params?.target ?? "draft-2020-12"; - if (target === "draft-4") - target = "draft-04"; - if (target === "draft-7") - target = "draft-07"; - return { - processors: params.processors ?? {}, - metadataRegistry: params?.metadata ?? globalRegistry2, - target, - unrepresentable: params?.unrepresentable ?? "throw", - override: params?.override ?? (() => { - }), - io: params?.io ?? "output", - counter: 0, - seen: /* @__PURE__ */ new Map(), - cycles: params?.cycles ?? "ref", - reused: params?.reused ?? "inline", - external: params?.external ?? void 0 +// node_modules/zod/v4/locales/index.js +var locales_exports2 = {}; +__export(locales_exports2, { + ar: () => ar_default2, + az: () => az_default2, + be: () => be_default2, + bg: () => bg_default2, + ca: () => ca_default2, + cs: () => cs_default2, + da: () => da_default2, + de: () => de_default2, + el: () => el_default, + en: () => en_default2, + eo: () => eo_default2, + es: () => es_default2, + fa: () => fa_default2, + fi: () => fi_default2, + fr: () => fr_default2, + frCA: () => fr_CA_default2, + he: () => he_default2, + hr: () => hr_default, + hu: () => hu_default2, + hy: () => hy_default2, + id: () => id_default2, + is: () => is_default2, + it: () => it_default2, + ja: () => ja_default2, + ka: () => ka_default2, + kh: () => kh_default2, + km: () => km_default2, + ko: () => ko_default2, + lt: () => lt_default2, + mk: () => mk_default2, + ms: () => ms_default2, + nl: () => nl_default2, + no: () => no_default2, + ota: () => ota_default2, + pl: () => pl_default2, + ps: () => ps_default2, + pt: () => pt_default2, + ro: () => ro_default, + ru: () => ru_default2, + sl: () => sl_default2, + sv: () => sv_default2, + ta: () => ta_default2, + th: () => th_default2, + tr: () => tr_default2, + ua: () => ua_default2, + uk: () => uk_default2, + ur: () => ur_default2, + uz: () => uz_default2, + vi: () => vi_default2, + yo: () => yo_default2, + zhCN: () => zh_CN_default2, + zhTW: () => zh_TW_default2 +}); + +// node_modules/zod/v4/locales/ar.js +var error49 = () => { + const Sizable = { + string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, + set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } }; -} -function process3(schema, ctx, _params = { path: [], schemaPath: [] }) { - var _a5; - const def = schema._zod.def; - const seen = ctx.seen.get(schema); - if (seen) { - seen.count++; - const isCycle = _params.schemaPath.includes(schema); - if (isCycle) { - seen.cycle = _params.path; - } - return seen.schema; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; - ctx.seen.set(schema, result); - const overrideSchema = schema._zod.toJSONSchema?.(); - if (overrideSchema) { - result.schema = overrideSchema; - } else { - const params = { - ..._params, - schemaPath: [..._params.schemaPath, schema], - path: _params.path - }; - if (schema._zod.processJSONSchema) { - schema._zod.processJSONSchema(ctx, result.schema, params); - } else { - const _json = result.schema; - const processor = ctx.processors[def.type]; - if (!processor) { - throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + const FormatDictionary = { + regex: "\u0645\u062F\u062E\u0644", + email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", + url: "\u0631\u0627\u0628\u0637", + emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", + ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", + ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", + cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", + cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", + base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", + base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", + json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", + e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", + jwt: "JWT", + template_literal: "\u0645\u062F\u062E\u0644" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue4.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; + } + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; } - processor(schema, ctx, _json, params); - } - const parent = schema._zod.parent; - if (parent) { - if (!result.ref) - result.ref = parent; - process3(parent, ctx, params); - ctx.seen.get(parent).isParent = true; - } - } - const meta6 = ctx.metadataRegistry.get(schema); - if (meta6) - Object.assign(result.schema, meta6); - if (ctx.io === "input" && isTransforming2(schema)) { - delete result.schema.examples; - delete result.schema.default; - } - if (ctx.io === "input" && "_prefault" in result.schema) - (_a5 = result.schema).default ?? (_a5.default = result.schema._prefault); - delete result.schema._prefault; - const _result = ctx.seen.get(schema); - return _result.schema; -} -function extractDefs2(ctx, schema) { - const root = ctx.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const idToSchema = /* @__PURE__ */ new Map(); - for (const entry of ctx.seen.entries()) { - const id = ctx.metadataRegistry.get(entry[0])?.id; - if (id) { - const existing = idToSchema.get(id); - if (existing && existing !== entry[0]) { - throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); + case "invalid_value": + if (issue4.values.length === 1) + return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive2(issue4.values[0])}`; + return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue4.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; + return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue4.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue4.maximum.toString()}`; } - idToSchema.set(id, entry[0]); - } - } - const makeURI = (entry) => { - const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; - if (ctx.external) { - const externalId = ctx.external.registry.get(entry[0])?.id; - const uriGenerator = ctx.external.uri ?? ((id2) => id2); - if (externalId) { - return { ref: uriGenerator(externalId) }; + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue4.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue4.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue4.minimum.toString()}`; } - const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; - entry[1].defId = id; - return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; - } - if (entry[1] === root) { - return { ref: "#" }; + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue4.prefix}"`; + if (_issue.format === "ends_with") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + } + case "not_multiple_of": + return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue4.divisor}`; + case "unrecognized_keys": + return `\u0645\u0639\u0631\u0641${issue4.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue4.keys.length > 1 ? "\u0629" : ""}: ${joinValues2(issue4.keys, "\u060C ")}`; + case "invalid_key": + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue4.origin}`; + case "invalid_union": + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; + case "invalid_element": + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue4.origin}`; + default: + return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; } - const uriPrefix = `#`; - const defUriPrefix = `${uriPrefix}/${defsSegment}/`; - const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; - return { defId, ref: defUriPrefix + defId }; }; - const extractToDef = (entry) => { - if (entry[1].schema.$ref) { - return; - } - const seen = entry[1]; - const { ref, defId } = makeURI(entry); - seen.def = { ...seen.schema }; - if (defId) - seen.defId = defId; - const schema2 = seen.schema; - for (const key in schema2) { - delete schema2[key]; - } - schema2.$ref = ref; +}; +function ar_default2() { + return { + localeError: error49() }; - if (ctx.cycles === "throw") { - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (seen.cycle) { - throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ +} -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); - } - } +// node_modules/zod/v4/locales/az.js +var error50 = () => { + const Sizable = { + string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "element", verb: "olmal\u0131d\u0131r" }, + set: { unit: "element", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (schema === entry[0]) { - extractToDef(entry); - continue; - } - if (ctx.external) { - const ext = ctx.external.registry.get(entry[0])?.id; - if (schema !== entry[0] && ext) { - extractToDef(entry); - continue; + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue4.expected}, daxil olan ${received}`; + } + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; } - } - const id = ctx.metadataRegistry.get(entry[0])?.id; - if (id) { - extractToDef(entry); - continue; - } - if (seen.cycle) { - extractToDef(entry); - continue; - } - if (seen.count > 1) { - if (ctx.reused === "ref") { - extractToDef(entry); - continue; + case "invalid_value": + if (issue4.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive2(issue4.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue4.origin ?? "d\u0259y\u0259r"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue4.origin ?? "d\u0259y\u0259r"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; + if (_issue.format === "ends_with") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; + if (_issue.format === "includes") + return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; + if (_issue.format === "regex") + return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue4.format}`; } + case "not_multiple_of": + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue4.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + case "unrecognized_keys": + return `Tan\u0131nmayan a\xE7ar${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + case "invalid_union": + return "Yanl\u0131\u015F d\u0259y\u0259r"; + case "invalid_element": + return `${issue4.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + default: + return `Yanl\u0131\u015F d\u0259y\u0259r`; } + }; +}; +function az_default2() { + return { + localeError: error50() + }; +} + +// node_modules/zod/v4/locales/be.js +function getBelarusianPlural2(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; + } + if (lastDigit === 1) { + return one; } + if (lastDigit >= 2 && lastDigit <= 4) { + return few; + } + return many; } -function finalize2(ctx, schema) { - const root = ctx.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const flattenRef = (zodSchema) => { - const seen = ctx.seen.get(zodSchema); - if (seen.ref === null) - return; - const schema2 = seen.def ?? seen.schema; - const _cached = { ...schema2 }; - const ref = seen.ref; - seen.ref = null; - if (ref) { - flattenRef(ref); - const refSeen = ctx.seen.get(ref); - const refSchema = refSeen.schema; - if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { - schema2.allOf = schema2.allOf ?? []; - schema2.allOf.push(refSchema); - } else { - Object.assign(schema2, refSchema); - } - Object.assign(schema2, _cached); - const isParentRef = zodSchema._zod.parent === ref; - if (isParentRef) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (!(key in _cached)) { - delete schema2[key]; - } +var error51 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0456\u043C\u0432\u0430\u043B", + few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", + many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u044B", + many: "\u0431\u0430\u0439\u0442\u0430\u045E" + }, + verb: "\u043C\u0435\u0446\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0443\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0430\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0447\u0430\u0441", + duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", + cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", + base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", + base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", + json_string: "JSON \u0440\u0430\u0434\u043E\u043A", + e164: "\u043D\u0443\u043C\u0430\u0440 E.164", + jwt: "JWT", + template_literal: "\u0443\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u043B\u0456\u043A", + array: "\u043C\u0430\u0441\u0456\u045E" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue4.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; } + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; } - if (refSchema.$ref && refSeen.def) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { - delete schema2[key]; - } + case "invalid_value": + if (issue4.values.length === 1) + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive2(issue4.values[0])}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getBelarusianPlural2(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue4.maximum.toString()} ${unit}`; } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue4.maximum.toString()}`; } - } - const parent = zodSchema._zod.parent; - if (parent && parent !== ref) { - flattenRef(parent); - const parentSeen = ctx.seen.get(parent); - if (parentSeen?.schema.$ref) { - schema2.$ref = parentSeen.schema.$ref; - if (parentSeen.def) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { - delete schema2[key]; - } - } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.minimum); + const unit = getBelarusianPlural2(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue4.minimum.toString()} ${unit}`; } + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue4.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue4.format}`; } + case "not_multiple_of": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue4.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue4.origin}`; + case "invalid_union": + return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; + case "invalid_element": + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue4.origin}`; + default: + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; } - ctx.override({ - zodSchema, - jsonSchema: schema2, - path: seen.path ?? [] - }); }; - for (const entry of [...ctx.seen.entries()].reverse()) { - flattenRef(entry[0]); - } - const result = {}; - if (ctx.target === "draft-2020-12") { - result.$schema = "https://json-schema.org/draft/2020-12/schema"; - } else if (ctx.target === "draft-07") { - result.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (ctx.target === "draft-04") { - result.$schema = "http://json-schema.org/draft-04/schema#"; - } else if (ctx.target === "openapi-3.0") { - } else { - } - if (ctx.external?.uri) { - const id = ctx.external.registry.get(schema)?.id; - if (!id) - throw new Error("Schema is missing an `id` property"); - result.$id = ctx.external.uri(id); - } - Object.assign(result, root.def ?? root.schema); - const rootMetaId = ctx.metadataRegistry.get(schema)?.id; - if (rootMetaId !== void 0 && result.id === rootMetaId) - delete result.id; - const defs = ctx.external?.defs ?? {}; - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (seen.def && seen.defId) { - if (seen.def.id === seen.defId) - delete seen.def.id; - defs[seen.defId] = seen.def; - } +}; +function be_default2() { + return { + localeError: error51() + }; +} + +// node_modules/zod/v4/locales/bg.js +var error52 = () => { + const Sizable = { + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - if (ctx.external) { - } else { - if (Object.keys(defs).length > 0) { - if (ctx.target === "draft-2020-12") { - result.$defs = defs; - } else { - result.definitions = defs; + const FormatDictionary = { + regex: "\u0432\u0445\u043E\u0434", + email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", + json_string: "JSON \u043D\u0438\u0437", + e164: "E.164 \u043D\u043E\u043C\u0435\u0440", + jwt: "JWT", + template_literal: "\u0432\u0445\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue4.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; + } + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; } - } - } - try { - const finalized = JSON.parse(JSON.stringify(result)); - Object.defineProperty(finalized, "~standard", { - value: { - ...schema["~standard"], - jsonSchema: { - input: createStandardJSONSchemaMethod2(schema, "input", ctx.processors), - output: createStandardJSONSchemaMethod2(schema, "output", ctx.processors) + case "invalid_value": + if (issue4.values.length === 1) + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive2(issue4.values[0])}`; + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - }, - enumerable: false, - writable: false - }); - return finalized; - } catch (_err) { - throw new Error("Error converting schema to JSON."); - } -} -function isTransforming2(_schema, _ctx) { - const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; - if (ctx.seen.has(_schema)) - return false; - ctx.seen.add(_schema); - const def = _schema._zod.def; - if (def.type === "transform") - return true; - if (def.type === "array") - return isTransforming2(def.element, ctx); - if (def.type === "set") - return isTransforming2(def.valueType, ctx); - if (def.type === "lazy") - return isTransforming2(def.getter(), ctx); - if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { - return isTransforming2(def.innerType, ctx); - } - if (def.type === "intersection") { - return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx); - } - if (def.type === "record" || def.type === "map") { - return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx); - } - if (def.type === "pipe") { - if (_schema._zod.traits.has("$ZodCodec")) - return true; - return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx); - } - if (def.type === "object") { - for (const key in def.shape) { - if (isTransforming2(def.shape[key], ctx)) - return true; - } - return false; - } - if (def.type === "union") { - for (const option of def.options) { - if (isTransforming2(option, ctx)) - return true; - } - return false; - } - if (def.type === "tuple") { - for (const item of def.items) { - if (isTransforming2(item, ctx)) - return true; + return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue4.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; + let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; + if (_issue.format === "emoji") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "datetime") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "date") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + if (_issue.format === "time") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; + if (_issue.format === "duration") + invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; + return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue4.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue4.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; + case "invalid_element": + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue4.origin}`; + default: + return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; } - if (def.rest && isTransforming2(def.rest, ctx)) - return true; - return false; - } - return false; -} -var createToJSONSchemaMethod2 = (schema, processors = {}) => (params) => { - const ctx = initializeContext2({ ...params, processors }); - process3(schema, ctx); - extractDefs2(ctx, schema); - return finalize2(ctx, schema); -}; -var createStandardJSONSchemaMethod2 = (schema, io, processors = {}) => (params) => { - const { libraryOptions, target } = params ?? {}; - const ctx = initializeContext2({ ...libraryOptions ?? {}, target, io, processors }); - process3(schema, ctx); - extractDefs2(ctx, schema); - return finalize2(ctx, schema); + }; }; +function bg_default2() { + return { + localeError: error52() + }; +} -// node_modules/zod/v4/core/json-schema-processors.js -var formatMap2 = { - guid: "uuid", - url: "uri", - datetime: "date-time", - json_string: "json-string", - regex: "" - // do not set -}; -var stringProcessor2 = (schema, ctx, _json, _params) => { - const json4 = _json; - json4.type = "string"; - const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; - if (typeof minimum === "number") - json4.minLength = minimum; - if (typeof maximum === "number") - json4.maxLength = maximum; - if (format2) { - json4.format = formatMap2[format2] ?? format2; - if (json4.format === "") - delete json4.format; - if (format2 === "time") { - delete json4.format; - } +// node_modules/zod/v4/locales/ca.js +var error53 = () => { + const Sizable = { + string: { unit: "car\xE0cters", verb: "contenir" }, + file: { unit: "bytes", verb: "contenir" }, + array: { unit: "elements", verb: "contenir" }, + set: { unit: "elements", verb: "contenir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - if (contentEncoding) - json4.contentEncoding = contentEncoding; - if (patterns && patterns.size > 0) { - const regexes = [...patterns]; - if (regexes.length === 1) - json4.pattern = regexes[0].source; - else if (regexes.length > 1) { - json4.allOf = [ - ...regexes.map((regex2) => ({ - ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, - pattern: regex2.source - })) - ]; + const FormatDictionary = { + regex: "entrada", + email: "adre\xE7a electr\xF2nica", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "durada ISO", + ipv4: "adre\xE7a IPv4", + ipv6: "adre\xE7a IPv6", + cidrv4: "rang IPv4", + cidrv6: "rang IPv6", + base64: "cadena codificada en base64", + base64url: "cadena codificada en base64url", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Tipus inv\xE0lid: s'esperava instanceof ${issue4.expected}, s'ha rebut ${received}`; + } + return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive2(issue4.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues2(issue4.values, " o ")}`; + case "too_big": { + const adj = issue4.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Massa gran: s'esperava que ${issue4.origin ?? "el valor"} contingu\xE9s ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue4.origin ?? "el valor"} fos ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Massa petit: s'esperava que ${issue4.origin} contingu\xE9s ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Massa petit: s'esperava que ${issue4.origin} fos ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; + return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Clau${issue4.keys.length > 1 ? "s" : ""} no reconeguda${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Clau inv\xE0lida a ${issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE0lida"; + // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general + case "invalid_element": + return `Element inv\xE0lid a ${issue4.origin}`; + default: + return `Entrada inv\xE0lida`; } - } + }; }; -var numberProcessor2 = (schema, ctx, _json, _params) => { - const json4 = _json; - const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; - if (typeof format2 === "string" && format2.includes("int")) - json4.type = "integer"; - else - json4.type = "number"; - const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY); - const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY); - const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0"; - if (exMin) { - if (legacy) { - json4.minimum = exclusiveMinimum; - json4.exclusiveMinimum = true; - } else { - json4.exclusiveMinimum = exclusiveMinimum; - } - } else if (typeof minimum === "number") { - json4.minimum = minimum; +function ca_default2() { + return { + localeError: error53() + }; +} + +// node_modules/zod/v4/locales/cs.js +var error54 = () => { + const Sizable = { + string: { unit: "znak\u016F", verb: "m\xEDt" }, + file: { unit: "bajt\u016F", verb: "m\xEDt" }, + array: { unit: "prvk\u016F", verb: "m\xEDt" }, + set: { unit: "prvk\u016F", verb: "m\xEDt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - if (exMax) { - if (legacy) { - json4.maximum = exclusiveMaximum; - json4.exclusiveMaximum = true; - } else { - json4.exclusiveMaximum = exclusiveMaximum; - } - } else if (typeof maximum === "number") { - json4.maximum = maximum; - } - if (typeof multipleOf === "number") - json4.multipleOf = multipleOf; -}; -var booleanProcessor2 = (_schema, _ctx, json4, _params) => { - json4.type = "boolean"; -}; -var bigintProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("BigInt cannot be represented in JSON Schema"); - } -}; -var symbolProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Symbols cannot be represented in JSON Schema"); - } -}; -var nullProcessor2 = (_schema, ctx, json4, _params) => { - if (ctx.target === "openapi-3.0") { - json4.type = "string"; - json4.nullable = true; - json4.enum = [null]; - } else { - json4.type = "null"; - } -}; -var undefinedProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Undefined cannot be represented in JSON Schema"); - } -}; -var voidProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Void cannot be represented in JSON Schema"); - } -}; -var neverProcessor2 = (_schema, _ctx, json4, _params) => { - json4.not = {}; -}; -var anyProcessor2 = (_schema, _ctx, _json, _params) => { -}; -var unknownProcessor2 = (_schema, _ctx, _json, _params) => { -}; -var dateProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Date cannot be represented in JSON Schema"); - } -}; -var enumProcessor2 = (schema, _ctx, json4, _params) => { - const def = schema._zod.def; - const values = getEnumValues2(def.entries); - if (values.every((v) => typeof v === "number")) - json4.type = "number"; - if (values.every((v) => typeof v === "string")) - json4.type = "string"; - json4.enum = values; -}; -var literalProcessor2 = (schema, ctx, json4, _params) => { - const def = schema._zod.def; - const vals = []; - for (const val of def.values) { - if (val === void 0) { - if (ctx.unrepresentable === "throw") { - throw new Error("Literal `undefined` cannot be represented in JSON Schema"); - } else { + const FormatDictionary = { + regex: "regul\xE1rn\xED v\xFDraz", + email: "e-mailov\xE1 adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "datum a \u010Das ve form\xE1tu ISO", + date: "datum ve form\xE1tu ISO", + time: "\u010Das ve form\xE1tu ISO", + duration: "doba trv\xE1n\xED ISO", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "rozsah IPv4", + cidrv6: "rozsah IPv6", + base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", + base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", + json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", + e164: "\u010D\xEDslo E.164", + jwt: "JWT", + template_literal: "vstup" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u010D\xEDslo", + string: "\u0159et\u011Bzec", + function: "funkce", + array: "pole" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue4.expected}, obdr\u017Eeno ${received}`; + } + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; } - } else if (typeof val === "bigint") { - if (ctx.unrepresentable === "throw") { - throw new Error("BigInt literals cannot be represented in JSON Schema"); - } else { - vals.push(Number(val)); + case "invalid_value": + if (issue4.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive2(issue4.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue4.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue4.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue4.maximum.toString()}`; } - } else { - vals.push(val); - } - } - if (vals.length === 0) { - } else if (vals.length === 1) { - const val = vals[0]; - json4.type = val === null ? "null" : typeof val; - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json4.enum = [val]; - } else { - json4.const = val; + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue4.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue4.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + } + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue4.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; + return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue4.divisor}`; + case "unrecognized_keys": + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Neplatn\xFD kl\xED\u010D v ${issue4.origin}`; + case "invalid_union": + return "Neplatn\xFD vstup"; + case "invalid_element": + return `Neplatn\xE1 hodnota v ${issue4.origin}`; + default: + return `Neplatn\xFD vstup`; } - } else { - if (vals.every((v) => typeof v === "number")) - json4.type = "number"; - if (vals.every((v) => typeof v === "string")) - json4.type = "string"; - if (vals.every((v) => typeof v === "boolean")) - json4.type = "boolean"; - if (vals.every((v) => v === null)) - json4.type = "null"; - json4.enum = vals; - } + }; }; -var nanProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("NaN cannot be represented in JSON Schema"); +function cs_default2() { + return { + localeError: error54() + }; +} + +// node_modules/zod/v4/locales/da.js +var error55 = () => { + const Sizable = { + string: { unit: "tegn", verb: "havde" }, + file: { unit: "bytes", verb: "havde" }, + array: { unit: "elementer", verb: "indeholdt" }, + set: { unit: "elementer", verb: "indeholdt" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } -}; -var templateLiteralProcessor2 = (schema, _ctx, json4, _params) => { - const _json = json4; - const pattern = schema._zod.pattern; - if (!pattern) - throw new Error("Pattern not found in template literal"); - _json.type = "string"; - _json.pattern = pattern.source; -}; -var fileProcessor2 = (schema, _ctx, json4, _params) => { - const _json = json4; - const file4 = { - type: "string", - format: "binary", - contentEncoding: "binary" + const FormatDictionary = { + regex: "input", + email: "e-mailadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkesl\xE6t", + date: "ISO-dato", + time: "ISO-klokkesl\xE6t", + duration: "ISO-varighed", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodet streng", + base64url: "base64url-kodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" }; - const { minimum, maximum, mime } = schema._zod.bag; - if (minimum !== void 0) - file4.minLength = minimum; - if (maximum !== void 0) - file4.maxLength = maximum; - if (mime) { - if (mime.length === 1) { - file4.contentMediaType = mime[0]; - Object.assign(_json, file4); - } else { - Object.assign(_json, file4); - _json.anyOf = mime.map((m) => ({ contentMediaType: m })); + const TypeDictionary = { + nan: "NaN", + string: "streng", + number: "tal", + boolean: "boolean", + array: "liste", + object: "objekt", + set: "s\xE6t", + file: "fil" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ugyldigt input: forventede instanceof ${issue4.expected}, fik ${received}`; + } + return `Ugyldigt input: forventede ${expected}, fik ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive2(issue4.values[0])}`; + return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) + return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) { + return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `For lille: forventede ${origin2} havde ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ugyldig streng: skal starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: skal ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: skal indeholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ugyldigt tal: skal v\xE6re deleligt med ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8gle i ${issue4.origin}`; + case "invalid_union": + return "Ugyldigt input: matcher ingen af de tilladte typer"; + case "invalid_element": + return `Ugyldig v\xE6rdi i ${issue4.origin}`; + default: + return `Ugyldigt input`; } - } else { - Object.assign(_json, file4); - } -}; -var successProcessor2 = (_schema, _ctx, json4, _params) => { - json4.type = "boolean"; -}; -var customProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Custom types cannot be represented in JSON Schema"); - } -}; -var functionProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Function types cannot be represented in JSON Schema"); - } -}; -var transformProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Transforms cannot be represented in JSON Schema"); - } -}; -var mapProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Map cannot be represented in JSON Schema"); - } + }; }; -var setProcessor2 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Set cannot be represented in JSON Schema"); +function da_default2() { + return { + localeError: error55() + }; +} + +// node_modules/zod/v4/locales/de.js +var error56 = () => { + const Sizable = { + string: { unit: "Zeichen", verb: "zu haben" }, + file: { unit: "Bytes", verb: "zu haben" }, + array: { unit: "Elemente", verb: "zu haben" }, + set: { unit: "Elemente", verb: "zu haben" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } + const FormatDictionary = { + regex: "Eingabe", + email: "E-Mail-Adresse", + url: "URL", + emoji: "Emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-Datum und -Uhrzeit", + date: "ISO-Datum", + time: "ISO-Uhrzeit", + duration: "ISO-Dauer", + ipv4: "IPv4-Adresse", + ipv6: "IPv6-Adresse", + cidrv4: "IPv4-Bereich", + cidrv6: "IPv6-Bereich", + base64: "Base64-codierter String", + base64url: "Base64-URL-codierter String", + json_string: "JSON-String", + e164: "E.164-Nummer", + jwt: "JWT", + template_literal: "Eingabe" + }; + const TypeDictionary = { + nan: "NaN", + number: "Zahl", + array: "Array" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ung\xFCltige Eingabe: erwartet instanceof ${issue4.expected}, erhalten ${received}`; + } + return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive2(issue4.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Zu gro\xDF: erwartet, dass ${issue4.origin ?? "Wert"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue4.origin ?? "Wert"} ${adj}${issue4.maximum.toString()} ist`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Zu klein: erwartet, dass ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} hat`; + } + return `Zu klein: erwartet, dass ${issue4.origin} ${adj}${issue4.minimum.toString()} ist`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; + if (_issue.format === "ends_with") + return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; + if (_issue.format === "includes") + return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; + if (_issue.format === "regex") + return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; + return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue4.divisor} sein`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ung\xFCltiger Schl\xFCssel in ${issue4.origin}`; + case "invalid_union": + return "Ung\xFCltige Eingabe"; + case "invalid_element": + return `Ung\xFCltiger Wert in ${issue4.origin}`; + default: + return `Ung\xFCltige Eingabe`; + } + }; }; -var arrayProcessor2 = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json4.minItems = minimum; - if (typeof maximum === "number") - json4.maxItems = maximum; - json4.type = "array"; - json4.items = process3(def.element, ctx, { - ...params, - path: [...params.path, "items"] - }); -}; -var objectProcessor2 = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - json4.type = "object"; - json4.properties = {}; - const shape = def.shape; - for (const key in shape) { - json4.properties[key] = process3(shape[key], ctx, { - ...params, - path: [...params.path, "properties", key] - }); +function de_default2() { + return { + localeError: error56() + }; +} + +// node_modules/zod/v4/locales/el.js +var error57 = () => { + const Sizable = { + string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, + file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, + array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, + set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }, + map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const allKeys = new Set(Object.keys(shape)); - const requiredKeys = new Set([...allKeys].filter((key) => { - const v = def.shape[key]._zod; - if (ctx.io === "input") { - return v.optin === void 0; - } else { - return v.optout === void 0; + const FormatDictionary = { + regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2", + email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1", + date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1", + time: "ISO \u03CE\u03C1\u03B1", + duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1", + ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4", + ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6", + mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC", + cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4", + cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6", + base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64", + base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url", + json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON", + e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164", + jwt: "JWT", + template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (typeof issue4.expected === "string" && /^[A-Z]/.test(issue4.expected)) { + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue4.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`; + } + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive2(issue4.values[0])}`; + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue4.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`; + return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue4.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue4.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue4.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`; + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue4.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue4.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue4.origin}`; + case "invalid_union": + return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"; + case "invalid_element": + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue4.origin}`; + default: + return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`; } - })); - if (requiredKeys.size > 0) { - json4.required = Array.from(requiredKeys); - } - if (def.catchall?._zod.def.type === "never") { - json4.additionalProperties = false; - } else if (!def.catchall) { - if (ctx.io === "output") - json4.additionalProperties = false; - } else if (def.catchall) { - json4.additionalProperties = process3(def.catchall, ctx, { - ...params, - path: [...params.path, "additionalProperties"] - }); - } + }; }; -var unionProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - const isExclusive = def.inclusive === false; - const options = def.options.map((x, i) => process3(x, ctx, { - ...params, - path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] - })); - if (isExclusive) { - json4.oneOf = options; - } else { - json4.anyOf = options; +function el_default() { + return { + localeError: error57() + }; +} + +// node_modules/zod/v4/locales/en.js +var error58 = () => { + const Sizable = { + string: { unit: "characters", verb: "to have" }, + file: { unit: "bytes", verb: "to have" }, + array: { unit: "items", verb: "to have" }, + set: { unit: "items", verb: "to have" }, + map: { unit: "entries", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } -}; -var intersectionProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - const a = process3(def.left, ctx, { - ...params, - path: [...params.path, "allOf", 0] - }); - const b = process3(def.right, ctx, { - ...params, - path: [...params.path, "allOf", 1] - }); - const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; - const allOf = [ - ...isSimpleIntersection(a) ? a.allOf : [a], - ...isSimpleIntersection(b) ? b.allOf : [b] - ]; - json4.allOf = allOf; -}; -var tupleProcessor2 = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - json4.type = "array"; - const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; - const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; - const prefixItems = def.items.map((x, i) => process3(x, ctx, { - ...params, - path: [...params.path, prefixPath, i] - })); - const rest = def.rest ? process3(def.rest, ctx, { - ...params, - path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] - }) : null; - if (ctx.target === "draft-2020-12") { - json4.prefixItems = prefixItems; - if (rest) { - json4.items = rest; - } - } else if (ctx.target === "openapi-3.0") { - json4.items = { - anyOf: prefixItems - }; - if (rest) { - json4.items.anyOf.push(rest); - } - json4.minItems = prefixItems.length; - if (!rest) { - json4.maxItems = prefixItems.length; - } - } else { - json4.items = prefixItems; - if (rest) { - json4.additionalItems = rest; + const FormatDictionary = { + regex: "input", + email: "email address", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datetime", + date: "ISO date", + time: "ISO time", + duration: "ISO duration", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + mac: "MAC address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded string", + base64url: "base64url-encoded string", + json_string: "JSON string", + e164: "E.164 number", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + // Compatibility: "nan" -> "NaN" for display + nan: "NaN" + // All other type names omitted - they fall back to raw values via ?? operator + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Invalid input: expected ${expected}, received ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive2(issue4.values[0])}`; + return `Invalid option: expected one of ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Too big: expected ${issue4.origin ?? "value"} to have ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue4.origin ?? "value"} to be ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Too small: expected ${issue4.origin} to have ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Too small: expected ${issue4.origin} to be ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Invalid string: must start with "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Invalid string: must end with "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Invalid string: must include "${_issue.includes}"`; + if (_issue.format === "regex") + return `Invalid string: must match pattern ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Invalid number: must be a multiple of ${issue4.divisor}`; + case "unrecognized_keys": + return `Unrecognized key${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Invalid key in ${issue4.origin}`; + case "invalid_union": + if (issue4.options && Array.isArray(issue4.options) && issue4.options.length > 0) { + const opts = issue4.options.map((o) => `'${o}'`).join(" | "); + return `Invalid discriminator value. Expected ${opts}`; + } + return "Invalid input"; + case "invalid_element": + return `Invalid value in ${issue4.origin}`; + default: + return `Invalid input`; } - } - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json4.minItems = minimum; - if (typeof maximum === "number") - json4.maxItems = maximum; + }; }; -var recordProcessor2 = (schema, ctx, _json, params) => { - const json4 = _json; - const def = schema._zod.def; - json4.type = "object"; - const keyType = def.keyType; - const keyBag = keyType._zod.bag; - const patterns = keyBag?.patterns; - if (def.mode === "loose" && patterns && patterns.size > 0) { - const valueSchema = process3(def.valueType, ctx, { - ...params, - path: [...params.path, "patternProperties", "*"] - }); - json4.patternProperties = {}; - for (const pattern of patterns) { - json4.patternProperties[pattern.source] = valueSchema; - } - } else { - if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { - json4.propertyNames = process3(def.keyType, ctx, { - ...params, - path: [...params.path, "propertyNames"] - }); - } - json4.additionalProperties = process3(def.valueType, ctx, { - ...params, - path: [...params.path, "additionalProperties"] - }); +function en_default2() { + return { + localeError: error58() + }; +} + +// node_modules/zod/v4/locales/eo.js +var error59 = () => { + const Sizable = { + string: { unit: "karaktrojn", verb: "havi" }, + file: { unit: "bajtojn", verb: "havi" }, + array: { unit: "elementojn", verb: "havi" }, + set: { unit: "elementojn", verb: "havi" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const keyValues = keyType._zod.values; - if (keyValues) { - const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number"); - if (validKeyValues.length > 0) { - json4.required = validKeyValues; + const FormatDictionary = { + regex: "enigo", + email: "retadreso", + url: "URL", + emoji: "emo\u011Dio", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datotempo", + date: "ISO-dato", + time: "ISO-tempo", + duration: "ISO-da\u016Dro", + ipv4: "IPv4-adreso", + ipv6: "IPv6-adreso", + cidrv4: "IPv4-rango", + cidrv6: "IPv6-rango", + base64: "64-ume kodita karaktraro", + base64url: "URL-64-ume kodita karaktraro", + json_string: "JSON-karaktraro", + e164: "E.164-nombro", + jwt: "JWT", + template_literal: "enigo" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombro", + array: "tabelo", + null: "senvalora" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Nevalida enigo: atendi\u011Dis instanceof ${issue4.expected}, ricevi\u011Dis ${received}`; + } + return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive2(issue4.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Tro granda: atendi\u011Dis ke ${issue4.origin ?? "valoro"} havu ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue4.origin ?? "valoro"} havu ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Tro malgranda: atendi\u011Dis ke ${issue4.origin} havu ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Tro malgranda: atendi\u011Dis ke ${issue4.origin} estu ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; + return `Nevalida ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Nevalida nombro: devas esti oblo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Nekonata${issue4.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue4.keys.length > 1 ? "j" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Nevalida \u015Dlosilo en ${issue4.origin}`; + case "invalid_union": + return "Nevalida enigo"; + case "invalid_element": + return `Nevalida valoro en ${issue4.origin}`; + default: + return `Nevalida enigo`; } - } -}; -var nullableProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - const inner = process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - if (ctx.target === "openapi-3.0") { - seen.ref = def.innerType; - json4.nullable = true; - } else { - json4.anyOf = [inner, { type: "null" }]; - } -}; -var nonoptionalProcessor2 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var defaultProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - json4.default = JSON.parse(JSON.stringify(def.defaultValue)); -}; -var prefaultProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - if (ctx.io === "input") - json4._prefault = JSON.parse(JSON.stringify(def.defaultValue)); + }; }; -var catchProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - let catchValue; - try { - catchValue = def.catchValue(void 0); - } catch { - throw new Error("Dynamic catch values are not supported in JSON Schema"); +function eo_default2() { + return { + localeError: error59() + }; +} + +// node_modules/zod/v4/locales/es.js +var error60 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "tener" }, + file: { unit: "bytes", verb: "tener" }, + array: { unit: "elementos", verb: "tener" }, + set: { unit: "elementos", verb: "tener" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - json4.default = catchValue; -}; -var pipeProcessor2 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - const inIsTransform = def.in._zod.traits.has("$ZodTransform"); - const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out; - process3(innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = innerType; -}; -var readonlyProcessor2 = (schema, ctx, json4, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - json4.readOnly = true; -}; -var promiseProcessor2 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var optionalProcessor2 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process3(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var lazyProcessor2 = (schema, ctx, _json, params) => { - const innerType = schema._zod.innerType; - process3(innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = innerType; -}; -var allProcessors2 = { - string: stringProcessor2, - number: numberProcessor2, - boolean: booleanProcessor2, - bigint: bigintProcessor2, - symbol: symbolProcessor2, - null: nullProcessor2, - undefined: undefinedProcessor2, - void: voidProcessor2, - never: neverProcessor2, - any: anyProcessor2, - unknown: unknownProcessor2, - date: dateProcessor2, - enum: enumProcessor2, - literal: literalProcessor2, - nan: nanProcessor2, - template_literal: templateLiteralProcessor2, - file: fileProcessor2, - success: successProcessor2, - custom: customProcessor2, - function: functionProcessor2, - transform: transformProcessor2, - map: mapProcessor2, - set: setProcessor2, - array: arrayProcessor2, - object: objectProcessor2, - union: unionProcessor2, - intersection: intersectionProcessor2, - tuple: tupleProcessor2, - record: recordProcessor2, - nullable: nullableProcessor2, - nonoptional: nonoptionalProcessor2, - default: defaultProcessor2, - prefault: prefaultProcessor2, - catch: catchProcessor2, - pipe: pipeProcessor2, - readonly: readonlyProcessor2, - promise: promiseProcessor2, - optional: optionalProcessor2, - lazy: lazyProcessor2 -}; -function toJSONSchema2(input, params) { - if ("_idmap" in input) { - const registry4 = input; - const ctx2 = initializeContext2({ ...params, processors: allProcessors2 }); - const defs = {}; - for (const entry of registry4._idmap.entries()) { - const [_, schema] = entry; - process3(schema, ctx2); - } - const schemas = {}; - const external = { - registry: registry4, - uri: params?.uri, - defs - }; - ctx2.external = external; - for (const entry of registry4._idmap.entries()) { - const [key, schema] = entry; - extractDefs2(ctx2, schema); - schemas[key] = finalize2(ctx2, schema); - } - if (Object.keys(defs).length > 0) { - const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; - schemas.__shared = { - [defsSegment]: defs - }; + const FormatDictionary = { + regex: "entrada", + email: "direcci\xF3n de correo electr\xF3nico", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "fecha y hora ISO", + date: "fecha ISO", + time: "hora ISO", + duration: "duraci\xF3n ISO", + ipv4: "direcci\xF3n IPv4", + ipv6: "direcci\xF3n IPv6", + cidrv4: "rango IPv4", + cidrv6: "rango IPv6", + base64: "cadena codificada en base64", + base64url: "URL codificada en base64", + json_string: "cadena JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + string: "texto", + number: "n\xFAmero", + boolean: "booleano", + array: "arreglo", + object: "objeto", + set: "conjunto", + file: "archivo", + date: "fecha", + bigint: "n\xFAmero grande", + symbol: "s\xEDmbolo", + undefined: "indefinido", + null: "nulo", + function: "funci\xF3n", + map: "mapa", + record: "registro", + tuple: "tupla", + enum: "enumeraci\xF3n", + union: "uni\xF3n", + literal: "literal", + promise: "promesa", + void: "vac\xEDo", + never: "nunca", + unknown: "desconocido", + any: "cualquiera" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entrada inv\xE1lida: se esperaba instanceof ${issue4.expected}, recibido ${received}`; + } + return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive2(issue4.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) { + return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; + return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Llave${issue4.keys.length > 1 ? "s" : ""} desconocida${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Llave inv\xE1lida en ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido en ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + default: + return `Entrada inv\xE1lida`; } - return { schemas }; - } - const ctx = initializeContext2({ ...params, processors: allProcessors2 }); - process3(input, ctx); - extractDefs2(ctx, input); - return finalize2(ctx, input); + }; +}; +function es_default2() { + return { + localeError: error60() + }; } -// node_modules/zod/v4/core/json-schema-generator.js -var JSONSchemaGenerator2 = class { - /** @deprecated Access via ctx instead */ - get metadataRegistry() { - return this.ctx.metadataRegistry; - } - /** @deprecated Access via ctx instead */ - get target() { - return this.ctx.target; - } - /** @deprecated Access via ctx instead */ - get unrepresentable() { - return this.ctx.unrepresentable; - } - /** @deprecated Access via ctx instead */ - get override() { - return this.ctx.override; - } - /** @deprecated Access via ctx instead */ - get io() { - return this.ctx.io; - } - /** @deprecated Access via ctx instead */ - get counter() { - return this.ctx.counter; - } - set counter(value) { - this.ctx.counter = value; - } - /** @deprecated Access via ctx instead */ - get seen() { - return this.ctx.seen; - } - constructor(params) { - let normalizedTarget = params?.target ?? "draft-2020-12"; - if (normalizedTarget === "draft-4") - normalizedTarget = "draft-04"; - if (normalizedTarget === "draft-7") - normalizedTarget = "draft-07"; - this.ctx = initializeContext2({ - processors: allProcessors2, - target: normalizedTarget, - ...params?.metadata && { metadata: params.metadata }, - ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, - ...params?.override && { override: params.override }, - ...params?.io && { io: params.io } - }); +// node_modules/zod/v4/locales/fa.js +var error61 = () => { + const Sizable = { + string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, + set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - /** - * Process a schema to prepare it for JSON Schema generation. - * This must be called before emit(). - */ - process(schema, _params = { path: [], schemaPath: [] }) { - return process3(schema, this.ctx, _params); - } - /** - * Emit the final JSON Schema after processing. - * Must call process() first. - */ - emit(schema, _params) { - if (_params) { - if (_params.cycles) - this.ctx.cycles = _params.cycles; - if (_params.reused) - this.ctx.reused = _params.reused; - if (_params.external) - this.ctx.external = _params.external; + const FormatDictionary = { + regex: "\u0648\u0631\u0648\u062F\u06CC", + email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", + url: "URL", + emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", + time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", + ipv4: "IPv4 \u0622\u062F\u0631\u0633", + ipv6: "IPv6 \u0622\u062F\u0631\u0633", + cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", + cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", + base64: "base64-encoded \u0631\u0634\u062A\u0647", + base64url: "base64url-encoded \u0631\u0634\u062A\u0647", + json_string: "JSON \u0631\u0634\u062A\u0647", + e164: "E.164 \u0639\u062F\u062F", + jwt: "JWT", + template_literal: "\u0648\u0631\u0648\u062F\u06CC" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0639\u062F\u062F", + array: "\u0622\u0631\u0627\u06CC\u0647" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue4.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + } + case "invalid_value": + if (issue4.values.length === 1) { + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive2(issue4.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + } + return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues2(issue4.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue4.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue4.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} \u0628\u0627\u0634\u062F`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + } + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} \u0628\u0627\u0634\u062F`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; + } + if (_issue.format === "ends_with") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; + } + if (_issue.format === "includes") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; + } + if (_issue.format === "regex") { + return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + } + return `${FormatDictionary[_issue.format] ?? issue4.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + } + case "not_multiple_of": + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue4.divisor} \u0628\u0627\u0634\u062F`; + case "unrecognized_keys": + return `\u06A9\u0644\u06CC\u062F${issue4.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue4.origin}`; + case "invalid_union": + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + case "invalid_element": + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue4.origin}`; + default: + return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } - extractDefs2(this.ctx, schema); - const result = finalize2(this.ctx, schema); - const { "~standard": _, ...plainResult } = result; - return plainResult; - } + }; }; - -// node_modules/zod/v4/core/json-schema.js -var json_schema_exports2 = {}; - -// node_modules/zod/v4/classic/schemas.js -var schemas_exports4 = {}; -__export(schemas_exports4, { - ZodAny: () => ZodAny2, - ZodArray: () => ZodArray2, - ZodBase64: () => ZodBase642, - ZodBase64URL: () => ZodBase64URL2, - ZodBigInt: () => ZodBigInt2, - ZodBigIntFormat: () => ZodBigIntFormat2, - ZodBoolean: () => ZodBoolean2, - ZodCIDRv4: () => ZodCIDRv42, - ZodCIDRv6: () => ZodCIDRv62, - ZodCUID: () => ZodCUID3, - ZodCUID2: () => ZodCUID22, - ZodCatch: () => ZodCatch2, - ZodCodec: () => ZodCodec2, - ZodCustom: () => ZodCustom2, - ZodCustomStringFormat: () => ZodCustomStringFormat2, - ZodDate: () => ZodDate2, - ZodDefault: () => ZodDefault2, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, - ZodE164: () => ZodE1642, - ZodEmail: () => ZodEmail2, - ZodEmoji: () => ZodEmoji2, - ZodEnum: () => ZodEnum2, - ZodExactOptional: () => ZodExactOptional2, - ZodFile: () => ZodFile2, - ZodFunction: () => ZodFunction2, - ZodGUID: () => ZodGUID2, - ZodIPv4: () => ZodIPv42, - ZodIPv6: () => ZodIPv62, - ZodIntersection: () => ZodIntersection2, - ZodJWT: () => ZodJWT2, - ZodKSUID: () => ZodKSUID2, - ZodLazy: () => ZodLazy2, - ZodLiteral: () => ZodLiteral2, - ZodMAC: () => ZodMAC2, - ZodMap: () => ZodMap2, - ZodNaN: () => ZodNaN2, - ZodNanoID: () => ZodNanoID2, - ZodNever: () => ZodNever2, - ZodNonOptional: () => ZodNonOptional2, - ZodNull: () => ZodNull2, - ZodNullable: () => ZodNullable2, - ZodNumber: () => ZodNumber2, - ZodNumberFormat: () => ZodNumberFormat2, - ZodObject: () => ZodObject2, - ZodOptional: () => ZodOptional2, - ZodPipe: () => ZodPipe2, - ZodPrefault: () => ZodPrefault2, - ZodPreprocess: () => ZodPreprocess, - ZodPromise: () => ZodPromise2, - ZodReadonly: () => ZodReadonly2, - ZodRecord: () => ZodRecord2, - ZodSet: () => ZodSet2, - ZodString: () => ZodString2, - ZodStringFormat: () => ZodStringFormat2, - ZodSuccess: () => ZodSuccess2, - ZodSymbol: () => ZodSymbol2, - ZodTemplateLiteral: () => ZodTemplateLiteral2, - ZodTransform: () => ZodTransform2, - ZodTuple: () => ZodTuple2, - ZodType: () => ZodType2, - ZodULID: () => ZodULID2, - ZodURL: () => ZodURL2, - ZodUUID: () => ZodUUID2, - ZodUndefined: () => ZodUndefined2, - ZodUnion: () => ZodUnion2, - ZodUnknown: () => ZodUnknown2, - ZodVoid: () => ZodVoid2, - ZodXID: () => ZodXID2, - ZodXor: () => ZodXor2, - _ZodString: () => _ZodString2, - _default: () => _default4, - _function: () => _function2, - any: () => any2, - array: () => array2, - base64: () => base644, - base64url: () => base64url4, - bigint: () => bigint5, - boolean: () => boolean5, - catch: () => _catch4, - check: () => check2, - cidrv4: () => cidrv44, - cidrv6: () => cidrv64, - codec: () => codec2, - cuid: () => cuid5, - cuid2: () => cuid24, - custom: () => custom2, - date: () => date7, - describe: () => describe4, - discriminatedUnion: () => discriminatedUnion2, - e164: () => e1644, - email: () => email4, - emoji: () => emoji4, - enum: () => _enum4, - exactOptional: () => exactOptional2, - file: () => file2, - float32: () => float322, - float64: () => float642, - function: () => _function2, - guid: () => guid4, - hash: () => hash2, - hex: () => hex4, - hostname: () => hostname4, - httpUrl: () => httpUrl2, - instanceof: () => _instanceof2, - int: () => int2, - int32: () => int322, - int64: () => int642, - intersection: () => intersection2, - invertCodec: () => invertCodec, - ipv4: () => ipv44, - ipv6: () => ipv64, - json: () => json2, - jwt: () => jwt2, - keyof: () => keyof2, - ksuid: () => ksuid4, - lazy: () => lazy2, - literal: () => literal2, - looseObject: () => looseObject2, - looseRecord: () => looseRecord2, - mac: () => mac4, - map: () => map2, - meta: () => meta4, - nan: () => nan2, - nanoid: () => nanoid4, - nativeEnum: () => nativeEnum2, - never: () => never2, - nonoptional: () => nonoptional2, - null: () => _null6, - nullable: () => nullable2, - nullish: () => nullish4, - number: () => number5, - object: () => object2, - optional: () => optional2, - partialRecord: () => partialRecord2, - pipe: () => pipe2, - prefault: () => prefault2, - preprocess: () => preprocess2, - promise: () => promise2, - readonly: () => readonly2, - record: () => record2, - refine: () => refine2, - set: () => set2, - strictObject: () => strictObject2, - string: () => string5, - stringFormat: () => stringFormat2, - stringbool: () => stringbool2, - success: () => success2, - superRefine: () => superRefine2, - symbol: () => symbol2, - templateLiteral: () => templateLiteral2, - transform: () => transform2, - tuple: () => tuple2, - uint32: () => uint322, - uint64: () => uint642, - ulid: () => ulid4, - undefined: () => _undefined6, - union: () => union2, - unknown: () => unknown2, - url: () => url3, - uuid: () => uuid5, - uuidv4: () => uuidv42, - uuidv6: () => uuidv62, - uuidv7: () => uuidv72, - void: () => _void4, - xid: () => xid4, - xor: () => xor2 -}); - -// node_modules/zod/v4/classic/checks.js -var checks_exports4 = {}; -__export(checks_exports4, { - endsWith: () => _endsWith2, - gt: () => _gt2, - gte: () => _gte2, - includes: () => _includes2, - length: () => _length2, - lowercase: () => _lowercase2, - lt: () => _lt2, - lte: () => _lte2, - maxLength: () => _maxLength2, - maxSize: () => _maxSize2, - mime: () => _mime2, - minLength: () => _minLength2, - minSize: () => _minSize2, - multipleOf: () => _multipleOf2, - negative: () => _negative2, - nonnegative: () => _nonnegative2, - nonpositive: () => _nonpositive2, - normalize: () => _normalize2, - overwrite: () => _overwrite2, - positive: () => _positive2, - property: () => _property2, - regex: () => _regex2, - size: () => _size2, - slugify: () => _slugify2, - startsWith: () => _startsWith2, - toLowerCase: () => _toLowerCase2, - toUpperCase: () => _toUpperCase2, - trim: () => _trim2, - uppercase: () => _uppercase2 -}); - -// node_modules/zod/v4/classic/iso.js -var iso_exports2 = {}; -__export(iso_exports2, { - ZodISODate: () => ZodISODate2, - ZodISODateTime: () => ZodISODateTime2, - ZodISODuration: () => ZodISODuration2, - ZodISOTime: () => ZodISOTime2, - date: () => date6, - datetime: () => datetime4, - duration: () => duration4, - time: () => time4 -}); -var ZodISODateTime2 = /* @__PURE__ */ $constructor2("ZodISODateTime", (inst, def) => { - $ZodISODateTime2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function datetime4(params) { - return _isoDateTime2(ZodISODateTime2, params); -} -var ZodISODate2 = /* @__PURE__ */ $constructor2("ZodISODate", (inst, def) => { - $ZodISODate2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function date6(params) { - return _isoDate2(ZodISODate2, params); -} -var ZodISOTime2 = /* @__PURE__ */ $constructor2("ZodISOTime", (inst, def) => { - $ZodISOTime2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function time4(params) { - return _isoTime2(ZodISOTime2, params); -} -var ZodISODuration2 = /* @__PURE__ */ $constructor2("ZodISODuration", (inst, def) => { - $ZodISODuration2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function duration4(params) { - return _isoDuration2(ZodISODuration2, params); +function fa_default2() { + return { + localeError: error61() + }; } -// node_modules/zod/v4/classic/errors.js -var initializer4 = (inst, issues) => { - $ZodError2.init(inst, issues); - inst.name = "ZodError"; - Object.defineProperties(inst, { - format: { - value: (mapper) => formatError2(inst, mapper) - // enumerable: false, - }, - flatten: { - value: (mapper) => flattenError2(inst, mapper) - // enumerable: false, - }, - addIssue: { - value: (issue5) => { - inst.issues.push(issue5); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); +// node_modules/zod/v4/locales/fi.js +var error62 = () => { + const Sizable = { + string: { unit: "merkki\xE4", subject: "merkkijonon" }, + file: { unit: "tavua", subject: "tiedoston" }, + array: { unit: "alkiota", subject: "listan" }, + set: { unit: "alkiota", subject: "joukon" }, + number: { unit: "", subject: "luvun" }, + bigint: { unit: "", subject: "suuren kokonaisluvun" }, + int: { unit: "", subject: "kokonaisluvun" }, + date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "s\xE4\xE4nn\xF6llinen lauseke", + email: "s\xE4hk\xF6postiosoite", + url: "URL-osoite", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-aikaleima", + date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", + time: "ISO-aika", + duration: "ISO-kesto", + ipv4: "IPv4-osoite", + ipv6: "IPv6-osoite", + cidrv4: "IPv4-alue", + cidrv6: "IPv6-alue", + base64: "base64-koodattu merkkijono", + base64url: "base64url-koodattu merkkijono", + json_string: "JSON-merkkijono", + e164: "E.164-luku", + jwt: "JWT", + template_literal: "templaattimerkkijono" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Virheellinen tyyppi: odotettiin instanceof ${issue4.expected}, oli ${received}`; + } + return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; } - // enumerable: false, - }, - addIssues: { - value: (issues2) => { - inst.issues.push(...issues2); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); + case "invalid_value": + if (issue4.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive2(issue4.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue4.maximum.toString()} ${sizing.unit}`.trim(); + } + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue4.maximum.toString()}`; } - // enumerable: false, - }, - isEmpty: { - get() { - return inst.issues.length === 0; + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue4.minimum.toString()} ${sizing.unit}`.trim(); + } + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue4.minimum.toString()}`; } - // enumerable: false, + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; + if (_issue.format === "regex") { + return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; + } + return `Virheellinen ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue4.divisor} monikerta`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return "Virheellinen avain tietueessa"; + case "invalid_union": + return "Virheellinen unioni"; + case "invalid_element": + return "Virheellinen arvo joukossa"; + default: + return `Virheellinen sy\xF6te`; } - }); + }; }; -var ZodError2 = /* @__PURE__ */ $constructor2("ZodError", initializer4); -var ZodRealError2 = /* @__PURE__ */ $constructor2("ZodError", initializer4, { - Parent: Error -}); - -// node_modules/zod/v4/classic/parse.js -var parse4 = /* @__PURE__ */ _parse2(ZodRealError2); -var parseAsync4 = /* @__PURE__ */ _parseAsync2(ZodRealError2); -var safeParse4 = /* @__PURE__ */ _safeParse2(ZodRealError2); -var safeParseAsync4 = /* @__PURE__ */ _safeParseAsync2(ZodRealError2); -var encode6 = /* @__PURE__ */ _encode2(ZodRealError2); -var decode4 = /* @__PURE__ */ _decode2(ZodRealError2); -var encodeAsync4 = /* @__PURE__ */ _encodeAsync2(ZodRealError2); -var decodeAsync4 = /* @__PURE__ */ _decodeAsync2(ZodRealError2); -var safeEncode4 = /* @__PURE__ */ _safeEncode2(ZodRealError2); -var safeDecode4 = /* @__PURE__ */ _safeDecode2(ZodRealError2); -var safeEncodeAsync4 = /* @__PURE__ */ _safeEncodeAsync2(ZodRealError2); -var safeDecodeAsync4 = /* @__PURE__ */ _safeDecodeAsync2(ZodRealError2); +function fi_default2() { + return { + localeError: error62() + }; +} -// node_modules/zod/v4/classic/schemas.js -var _installedGroups = /* @__PURE__ */ new WeakMap(); -function _installLazyMethods(inst, group, methods) { - const proto = Object.getPrototypeOf(inst); - let installed = _installedGroups.get(proto); - if (!installed) { - installed = /* @__PURE__ */ new Set(); - _installedGroups.set(proto, installed); +// node_modules/zod/v4/locales/fr.js +var error63 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - if (installed.has(group)) - return; - installed.add(group); - for (const key in methods) { - const fn = methods[key]; - Object.defineProperty(proto, key, { - configurable: true, - enumerable: false, - get() { - const bound = fn.bind(this); - Object.defineProperty(this, key, { - configurable: true, - writable: true, - enumerable: true, - value: bound - }); - return bound; - }, - set(v) { - Object.defineProperty(this, key, { - configurable: true, - writable: true, - enumerable: true, - value: v - }); + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date et heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + string: "cha\xEEne", + number: "nombre", + int: "entier", + boolean: "bool\xE9en", + bigint: "grand entier", + symbol: "symbole", + undefined: "ind\xE9fini", + null: "null", + never: "jamais", + void: "vide", + date: "date", + array: "tableau", + object: "objet", + tuple: "tuple", + record: "enregistrement", + map: "carte", + set: "ensemble", + file: "fichier", + nonoptional: "non-optionnel", + nan: "NaN", + function: "fonction" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entr\xE9e invalide : instanceof ${issue4.expected} attendu, ${received} re\xE7u`; + } + return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; } - }); - } -} -var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => { - $ZodType2.init(inst, def); - Object.assign(inst["~standard"], { - jsonSchema: { - input: createStandardJSONSchemaMethod2(inst, "input"), - output: createStandardJSONSchemaMethod2(inst, "output") - } - }); - inst.toJSONSchema = createToJSONSchemaMethod2(inst, {}); - inst.def = def; - inst.type = def.type; - Object.defineProperty(inst, "_def", { value: def }); - inst.parse = (data, params) => parse4(inst, data, params, { callee: inst.parse }); - inst.safeParse = (data, params) => safeParse4(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync4(inst, data, params, { callee: inst.parseAsync }); - inst.safeParseAsync = async (data, params) => safeParseAsync4(inst, data, params); - inst.spa = inst.safeParseAsync; - inst.encode = (data, params) => encode6(inst, data, params); - inst.decode = (data, params) => decode4(inst, data, params); - inst.encodeAsync = async (data, params) => encodeAsync4(inst, data, params); - inst.decodeAsync = async (data, params) => decodeAsync4(inst, data, params); - inst.safeEncode = (data, params) => safeEncode4(inst, data, params); - inst.safeDecode = (data, params) => safeDecode4(inst, data, params); - inst.safeEncodeAsync = async (data, params) => safeEncodeAsync4(inst, data, params); - inst.safeDecodeAsync = async (data, params) => safeDecodeAsync4(inst, data, params); - _installLazyMethods(inst, "ZodType", { - check(...chks) { - const def2 = this.def; - return this.clone(util_exports2.mergeDefs(def2, { - checks: [ - ...def2.checks ?? [], - ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) - ] - }), { parent: true }); - }, - with(...chks) { - return this.check(...chks); - }, - clone(def2, params) { - return clone2(this, def2, params); - }, - brand() { - return this; - }, - register(reg, meta6) { - reg.add(this, meta6); - return this; - }, - refine(check4, params) { - return this.check(refine2(check4, params)); - }, - superRefine(refinement, params) { - return this.check(superRefine2(refinement, params)); - }, - overwrite(fn) { - return this.check(_overwrite2(fn)); - }, - optional() { - return optional2(this); - }, - exactOptional() { - return exactOptional2(this); - }, - nullable() { - return nullable2(this); - }, - nullish() { - return optional2(nullable2(this)); - }, - nonoptional(params) { - return nonoptional2(this, params); - }, - array() { - return array2(this); - }, - or(arg) { - return union2([this, arg]); - }, - and(arg) { - return intersection2(this, arg); - }, - transform(tx) { - return pipe2(this, transform2(tx)); - }, - default(d) { - return _default4(this, d); - }, - prefault(d) { - return prefault2(this, d); - }, - catch(params) { - return _catch4(this, params); - }, - pipe(target) { - return pipe2(this, target); - }, - readonly() { - return readonly2(this); - }, - describe(description) { - const cl = this.clone(); - globalRegistry2.add(cl, { description }); - return cl; - }, - meta(...args) { - if (args.length === 0) - return globalRegistry2.get(this); - const cl = this.clone(); - globalRegistry2.add(cl, args[0]); - return cl; - }, - isOptional() { - return this.safeParse(void 0).success; - }, - isNullable() { - return this.safeParse(null).success; - }, - apply(fn) { - return fn(this); - } - }); - Object.defineProperty(inst, "description", { - get() { - return globalRegistry2.get(inst)?.description; - }, - configurable: true - }); - return inst; -}); -var _ZodString2 = /* @__PURE__ */ $constructor2("_ZodString", (inst, def) => { - $ZodString2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => stringProcessor2(inst, ctx, json4, params); - const bag = inst._zod.bag; - inst.format = bag.format ?? null; - inst.minLength = bag.minimum ?? null; - inst.maxLength = bag.maximum ?? null; - _installLazyMethods(inst, "_ZodString", { - regex(...args) { - return this.check(_regex2(...args)); - }, - includes(...args) { - return this.check(_includes2(...args)); - }, - startsWith(...args) { - return this.check(_startsWith2(...args)); - }, - endsWith(...args) { - return this.check(_endsWith2(...args)); - }, - min(...args) { - return this.check(_minLength2(...args)); - }, - max(...args) { - return this.check(_maxLength2(...args)); - }, - length(...args) { - return this.check(_length2(...args)); - }, - nonempty(...args) { - return this.check(_minLength2(1, ...args)); - }, - lowercase(params) { - return this.check(_lowercase2(params)); - }, - uppercase(params) { - return this.check(_uppercase2(params)); - }, - trim() { - return this.check(_trim2()); - }, - normalize(...args) { - return this.check(_normalize2(...args)); - }, - toLowerCase() { - return this.check(_toLowerCase2()); - }, - toUpperCase() { - return this.check(_toUpperCase2()); - }, - slugify() { - return this.check(_slugify2()); + case "invalid_value": + if (issue4.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive2(issue4.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues2(issue4.values, "|")} attendue`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop grand : ${TypeDictionary[issue4.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${TypeDictionary[issue4.origin] ?? "valeur"} doit \xEAtre ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop petit : ${TypeDictionary[issue4.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `Trop petit : ${TypeDictionary[issue4.origin] ?? "valeur"} doit \xEAtre ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue4.keys.length > 1 ? "s" : ""} non reconnue${issue4.keys.length > 1 ? "s" : ""} : ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue4.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue4.origin}`; + default: + return `Entr\xE9e invalide`; } - }); -}); -var ZodString2 = /* @__PURE__ */ $constructor2("ZodString", (inst, def) => { - $ZodString2.init(inst, def); - _ZodString2.init(inst, def); - inst.email = (params) => inst.check(_email2(ZodEmail2, params)); - inst.url = (params) => inst.check(_url2(ZodURL2, params)); - inst.jwt = (params) => inst.check(_jwt2(ZodJWT2, params)); - inst.emoji = (params) => inst.check(_emoji4(ZodEmoji2, params)); - inst.guid = (params) => inst.check(_guid2(ZodGUID2, params)); - inst.uuid = (params) => inst.check(_uuid2(ZodUUID2, params)); - inst.uuidv4 = (params) => inst.check(_uuidv42(ZodUUID2, params)); - inst.uuidv6 = (params) => inst.check(_uuidv62(ZodUUID2, params)); - inst.uuidv7 = (params) => inst.check(_uuidv72(ZodUUID2, params)); - inst.nanoid = (params) => inst.check(_nanoid2(ZodNanoID2, params)); - inst.guid = (params) => inst.check(_guid2(ZodGUID2, params)); - inst.cuid = (params) => inst.check(_cuid3(ZodCUID3, params)); - inst.cuid2 = (params) => inst.check(_cuid22(ZodCUID22, params)); - inst.ulid = (params) => inst.check(_ulid2(ZodULID2, params)); - inst.base64 = (params) => inst.check(_base642(ZodBase642, params)); - inst.base64url = (params) => inst.check(_base64url2(ZodBase64URL2, params)); - inst.xid = (params) => inst.check(_xid2(ZodXID2, params)); - inst.ksuid = (params) => inst.check(_ksuid2(ZodKSUID2, params)); - inst.ipv4 = (params) => inst.check(_ipv42(ZodIPv42, params)); - inst.ipv6 = (params) => inst.check(_ipv62(ZodIPv62, params)); - inst.cidrv4 = (params) => inst.check(_cidrv42(ZodCIDRv42, params)); - inst.cidrv6 = (params) => inst.check(_cidrv62(ZodCIDRv62, params)); - inst.e164 = (params) => inst.check(_e1642(ZodE1642, params)); - inst.datetime = (params) => inst.check(datetime4(params)); - inst.date = (params) => inst.check(date6(params)); - inst.time = (params) => inst.check(time4(params)); - inst.duration = (params) => inst.check(duration4(params)); -}); -function string5(params) { - return _string2(ZodString2, params); -} -var ZodStringFormat2 = /* @__PURE__ */ $constructor2("ZodStringFormat", (inst, def) => { - $ZodStringFormat2.init(inst, def); - _ZodString2.init(inst, def); -}); -var ZodEmail2 = /* @__PURE__ */ $constructor2("ZodEmail", (inst, def) => { - $ZodEmail2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function email4(params) { - return _email2(ZodEmail2, params); -} -var ZodGUID2 = /* @__PURE__ */ $constructor2("ZodGUID", (inst, def) => { - $ZodGUID2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function guid4(params) { - return _guid2(ZodGUID2, params); -} -var ZodUUID2 = /* @__PURE__ */ $constructor2("ZodUUID", (inst, def) => { - $ZodUUID2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function uuid5(params) { - return _uuid2(ZodUUID2, params); -} -function uuidv42(params) { - return _uuidv42(ZodUUID2, params); -} -function uuidv62(params) { - return _uuidv62(ZodUUID2, params); -} -function uuidv72(params) { - return _uuidv72(ZodUUID2, params); -} -var ZodURL2 = /* @__PURE__ */ $constructor2("ZodURL", (inst, def) => { - $ZodURL2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function url3(params) { - return _url2(ZodURL2, params); -} -function httpUrl2(params) { - return _url2(ZodURL2, { - protocol: regexes_exports2.httpProtocol, - hostname: regexes_exports2.domain, - ...util_exports2.normalizeParams(params) - }); -} -var ZodEmoji2 = /* @__PURE__ */ $constructor2("ZodEmoji", (inst, def) => { - $ZodEmoji2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function emoji4(params) { - return _emoji4(ZodEmoji2, params); -} -var ZodNanoID2 = /* @__PURE__ */ $constructor2("ZodNanoID", (inst, def) => { - $ZodNanoID2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function nanoid4(params) { - return _nanoid2(ZodNanoID2, params); -} -var ZodCUID3 = /* @__PURE__ */ $constructor2("ZodCUID", (inst, def) => { - $ZodCUID3.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function cuid5(params) { - return _cuid3(ZodCUID3, params); -} -var ZodCUID22 = /* @__PURE__ */ $constructor2("ZodCUID2", (inst, def) => { - $ZodCUID22.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function cuid24(params) { - return _cuid22(ZodCUID22, params); -} -var ZodULID2 = /* @__PURE__ */ $constructor2("ZodULID", (inst, def) => { - $ZodULID2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function ulid4(params) { - return _ulid2(ZodULID2, params); -} -var ZodXID2 = /* @__PURE__ */ $constructor2("ZodXID", (inst, def) => { - $ZodXID2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function xid4(params) { - return _xid2(ZodXID2, params); -} -var ZodKSUID2 = /* @__PURE__ */ $constructor2("ZodKSUID", (inst, def) => { - $ZodKSUID2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function ksuid4(params) { - return _ksuid2(ZodKSUID2, params); -} -var ZodIPv42 = /* @__PURE__ */ $constructor2("ZodIPv4", (inst, def) => { - $ZodIPv42.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function ipv44(params) { - return _ipv42(ZodIPv42, params); + }; +}; +function fr_default2() { + return { + localeError: error63() + }; } -var ZodMAC2 = /* @__PURE__ */ $constructor2("ZodMAC", (inst, def) => { - $ZodMAC2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function mac4(params) { - return _mac2(ZodMAC2, params); + +// node_modules/zod/v4/locales/fr-CA.js +var error64 = () => { + const Sizable = { + string: { unit: "caract\xE8res", verb: "avoir" }, + file: { unit: "octets", verb: "avoir" }, + array: { unit: "\xE9l\xE9ments", verb: "avoir" }, + set: { unit: "\xE9l\xE9ments", verb: "avoir" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "entr\xE9e", + email: "adresse courriel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "date-heure ISO", + date: "date ISO", + time: "heure ISO", + duration: "dur\xE9e ISO", + ipv4: "adresse IPv4", + ipv6: "adresse IPv6", + cidrv4: "plage IPv4", + cidrv6: "plage IPv6", + base64: "cha\xEEne encod\xE9e en base64", + base64url: "cha\xEEne encod\xE9e en base64url", + json_string: "cha\xEEne JSON", + e164: "num\xE9ro E.164", + jwt: "JWT", + template_literal: "entr\xE9e" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Entr\xE9e invalide : attendu instanceof ${issue4.expected}, re\xE7u ${received}`; + } + return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive2(issue4.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Trop grand : attendu que ${issue4.origin ?? "la valeur"} ait ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue4.origin ?? "la valeur"} soit ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Trop petit : attendu que ${issue4.origin} ait ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Trop petit : attendu que ${issue4.origin} soit ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + if (_issue.format === "regex") + return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} invalide`; + } + case "not_multiple_of": + return `Nombre invalide : doit \xEAtre un multiple de ${issue4.divisor}`; + case "unrecognized_keys": + return `Cl\xE9${issue4.keys.length > 1 ? "s" : ""} non reconnue${issue4.keys.length > 1 ? "s" : ""} : ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Cl\xE9 invalide dans ${issue4.origin}`; + case "invalid_union": + return "Entr\xE9e invalide"; + case "invalid_element": + return `Valeur invalide dans ${issue4.origin}`; + default: + return `Entr\xE9e invalide`; + } + }; +}; +function fr_CA_default2() { + return { + localeError: error64() + }; } -var ZodIPv62 = /* @__PURE__ */ $constructor2("ZodIPv6", (inst, def) => { - $ZodIPv62.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function ipv64(params) { - return _ipv62(ZodIPv62, params); -} -var ZodCIDRv42 = /* @__PURE__ */ $constructor2("ZodCIDRv4", (inst, def) => { - $ZodCIDRv42.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function cidrv44(params) { - return _cidrv42(ZodCIDRv42, params); -} -var ZodCIDRv62 = /* @__PURE__ */ $constructor2("ZodCIDRv6", (inst, def) => { - $ZodCIDRv62.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function cidrv64(params) { - return _cidrv62(ZodCIDRv62, params); -} -var ZodBase642 = /* @__PURE__ */ $constructor2("ZodBase64", (inst, def) => { - $ZodBase642.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function base644(params) { - return _base642(ZodBase642, params); -} -var ZodBase64URL2 = /* @__PURE__ */ $constructor2("ZodBase64URL", (inst, def) => { - $ZodBase64URL2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function base64url4(params) { - return _base64url2(ZodBase64URL2, params); -} -var ZodE1642 = /* @__PURE__ */ $constructor2("ZodE164", (inst, def) => { - $ZodE1642.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function e1644(params) { - return _e1642(ZodE1642, params); -} -var ZodJWT2 = /* @__PURE__ */ $constructor2("ZodJWT", (inst, def) => { - $ZodJWT2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function jwt2(params) { - return _jwt2(ZodJWT2, params); + +// node_modules/zod/v4/locales/he.js +var error65 = () => { + const TypeNames = { + string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, + number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, + boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, + bigint: { label: "BigInt", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, + array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, + object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, + null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, + undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, + symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, + function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, + map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, + set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, + file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, + promise: { label: "Promise", gender: "m" }, + NaN: { label: "NaN", gender: "m" }, + unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, + value: { label: "\u05E2\u05E8\u05DA", gender: "m" } + }; + const Sizable = { + string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, + file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, + number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } + // no unit + }; + const typeEntry = (t) => t ? TypeNames[t] : void 0; + const typeLabel = (t) => { + const e = typeEntry(t); + if (e) + return e.label; + return t ?? TypeNames.unknown.label; + }; + const withDefinite = (t) => `\u05D4${typeLabel(t)}`; + const verbFor = (t) => { + const e = typeEntry(t); + const gender = e?.gender ?? "m"; + return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; + }; + const getSizing = (origin2) => { + if (!origin2) + return null; + return Sizable[origin2] ?? null; + }; + const FormatDictionary = { + regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, + url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, + uuid: { label: "UUID", gender: "m" }, + nanoid: { label: "nanoid", gender: "m" }, + guid: { label: "GUID", gender: "m" }, + cuid: { label: "cuid", gender: "m" }, + cuid2: { label: "cuid2", gender: "m" }, + ulid: { label: "ULID", gender: "m" }, + xid: { label: "XID", gender: "m" }, + ksuid: { label: "KSUID", gender: "m" }, + datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, + date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, + time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, + duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, + ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, + ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, + cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, + cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, + base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, + base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, + json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, + e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, + jwt: { label: "JWT", gender: "m" }, + ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, + uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expectedKey = issue4.expected; + const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue4.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; + } + case "invalid_value": { + if (issue4.values.length === 1) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive2(issue4.values[0])}`; + } + const stringified = issue4.values.map((v) => stringifyPrimitive2(v)); + if (issue4.values.length === 2) { + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; + } + const lastValue = stringified[stringified.length - 1]; + const restValues = stringified.slice(0, -1).join(", "); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; + } + case "too_big": { + const sizing = getSizing(issue4.origin); + const subject = withDefinite(issue4.origin ?? "value"); + if (issue4.origin === "string") { + return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue4.maximum.toString()} ${sizing?.unit ?? ""} ${issue4.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); + } + if (issue4.origin === "number") { + const comparison = issue4.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue4.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue4.maximum}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue4.origin === "array" || issue4.origin === "set") { + const verb = issue4.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + const comparison = issue4.inclusive ? `${issue4.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue4.maximum} ${sizing?.unit ?? ""}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue4.inclusive ? "<=" : "<"; + const be = verbFor(issue4.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + } + return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const sizing = getSizing(issue4.origin); + const subject = withDefinite(issue4.origin ?? "value"); + if (issue4.origin === "string") { + return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue4.minimum.toString()} ${sizing?.unit ?? ""} ${issue4.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); + } + if (issue4.origin === "number") { + const comparison = issue4.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue4.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue4.minimum}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; + } + if (issue4.origin === "array" || issue4.origin === "set") { + const verb = issue4.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; + if (issue4.minimum === 1 && issue4.inclusive) { + const singularPhrase = issue4.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; + } + const comparison = issue4.inclusive ? `${issue4.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue4.minimum} ${sizing?.unit ?? ""}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); + } + const adj = issue4.inclusive ? ">=" : ">"; + const be = verbFor(issue4.origin ?? "value"); + if (sizing?.unit) { + return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; + const nounEntry = FormatDictionary[_issue.format]; + const noun = nounEntry?.label ?? _issue.format; + const gender = nounEntry?.gender ?? "m"; + const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; + return `${noun} \u05DC\u05D0 ${adjective}`; + } + case "not_multiple_of": + return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue4.divisor}`; + case "unrecognized_keys": + return `\u05DE\u05E4\u05EA\u05D7${issue4.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue4.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": { + return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; + } + case "invalid_union": + return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; + case "invalid_element": { + const place = withDefinite(issue4.origin ?? "array"); + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; + } + default: + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + } + }; +}; +function he_default2() { + return { + localeError: error65() + }; } -var ZodCustomStringFormat2 = /* @__PURE__ */ $constructor2("ZodCustomStringFormat", (inst, def) => { - $ZodCustomStringFormat2.init(inst, def); - ZodStringFormat2.init(inst, def); -}); -function stringFormat2(format2, fnOrRegex, _params = {}) { - return _stringFormat2(ZodCustomStringFormat2, format2, fnOrRegex, _params); + +// node_modules/zod/v4/locales/hr.js +var error66 = () => { + const Sizable = { + string: { unit: "znakova", verb: "imati" }, + file: { unit: "bajtova", verb: "imati" }, + array: { unit: "stavki", verb: "imati" }, + set: { unit: "stavki", verb: "imati" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "unos", + email: "email adresa", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum i vrijeme", + date: "ISO datum", + time: "ISO vrijeme", + duration: "ISO trajanje", + ipv4: "IPv4 adresa", + ipv6: "IPv6 adresa", + cidrv4: "IPv4 raspon", + cidrv6: "IPv6 raspon", + base64: "base64 kodirani tekst", + base64url: "base64url kodirani tekst", + json_string: "JSON tekst", + e164: "E.164 broj", + jwt: "JWT", + template_literal: "unos" + }; + const TypeDictionary = { + nan: "NaN", + string: "tekst", + number: "broj", + boolean: "boolean", + array: "niz", + object: "objekt", + set: "skup", + file: "datoteka", + date: "datum", + bigint: "bigint", + symbol: "simbol", + undefined: "undefined", + null: "null", + function: "funkcija", + map: "mapa" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neispravan unos: o\u010Dekuje se instanceof ${issue4.expected}, a primljeno je ${received}`; + } + return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive2(issue4.values[0])}`; + return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) + return `Preveliko: o\u010Dekivano da ${origin2 ?? "vrijednost"} ima ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemenata"}`; + return `Preveliko: o\u010Dekivano da ${origin2 ?? "vrijednost"} bude ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + if (sizing) { + return `Premalo: o\u010Dekivano da ${origin2} ima ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Premalo: o\u010Dekivano da ${origin2} bude ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`; + return `Neispravna ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue4.divisor}`; + case "unrecognized_keys": + return `Neprepoznat${issue4.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Neispravan klju\u010D u ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + case "invalid_union": + return "Neispravan unos"; + case "invalid_element": + return `Neispravna vrijednost u ${TypeDictionary[issue4.origin] ?? issue4.origin}`; + default: + return `Neispravan unos`; + } + }; +}; +function hr_default() { + return { + localeError: error66() + }; } -function hostname4(_params) { - return _stringFormat2(ZodCustomStringFormat2, "hostname", regexes_exports2.hostname, _params); + +// node_modules/zod/v4/locales/hu.js +var error67 = () => { + const Sizable = { + string: { unit: "karakter", verb: "legyen" }, + file: { unit: "byte", verb: "legyen" }, + array: { unit: "elem", verb: "legyen" }, + set: { unit: "elem", verb: "legyen" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "bemenet", + email: "email c\xEDm", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO id\u0151b\xE9lyeg", + date: "ISO d\xE1tum", + time: "ISO id\u0151", + duration: "ISO id\u0151intervallum", + ipv4: "IPv4 c\xEDm", + ipv6: "IPv6 c\xEDm", + cidrv4: "IPv4 tartom\xE1ny", + cidrv6: "IPv6 tartom\xE1ny", + base64: "base64-k\xF3dolt string", + base64url: "base64url-k\xF3dolt string", + json_string: "JSON string", + e164: "E.164 sz\xE1m", + jwt: "JWT", + template_literal: "bemenet" + }; + const TypeDictionary = { + nan: "NaN", + number: "sz\xE1m", + array: "t\xF6mb" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue4.expected}, a kapott \xE9rt\xE9k ${received}`; + } + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive2(issue4.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `T\xFAl nagy: ${issue4.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue4.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue4.origin} m\xE9rete t\xFAl kicsi ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue4.origin} t\xFAl kicsi ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + if (_issue.format === "ends_with") + return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + if (_issue.format === "includes") + return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + if (_issue.format === "regex") + return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; + return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\xC9rv\xE9nytelen sz\xE1m: ${issue4.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + case "unrecognized_keys": + return `Ismeretlen kulcs${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\xC9rv\xE9nytelen kulcs ${issue4.origin}`; + case "invalid_union": + return "\xC9rv\xE9nytelen bemenet"; + case "invalid_element": + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue4.origin}`; + default: + return `\xC9rv\xE9nytelen bemenet`; + } + }; +}; +function hu_default2() { + return { + localeError: error67() + }; } -function hex4(_params) { - return _stringFormat2(ZodCustomStringFormat2, "hex", regexes_exports2.hex, _params); + +// node_modules/zod/v4/locales/hy.js +function getArmenianPlural2(count, one, many) { + return Math.abs(count) === 1 ? one : many; } -function hash2(alg, params) { - const enc = params?.enc ?? "hex"; - const format2 = `${alg}_${enc}`; - const regex2 = regexes_exports2[format2]; - if (!regex2) - throw new Error(`Unrecognized hash format: ${format2}`); - return _stringFormat2(ZodCustomStringFormat2, format2, regex2, params); +function withDefiniteArticle2(word) { + if (!word) + return ""; + const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; + const lastChar = word[word.length - 1]; + return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); } -var ZodNumber2 = /* @__PURE__ */ $constructor2("ZodNumber", (inst, def) => { - $ZodNumber2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => numberProcessor2(inst, ctx, json4, params); - _installLazyMethods(inst, "ZodNumber", { - gt(value, params) { - return this.check(_gt2(value, params)); - }, - gte(value, params) { - return this.check(_gte2(value, params)); - }, - min(value, params) { - return this.check(_gte2(value, params)); - }, - lt(value, params) { - return this.check(_lt2(value, params)); - }, - lte(value, params) { - return this.check(_lte2(value, params)); - }, - max(value, params) { - return this.check(_lte2(value, params)); - }, - int(params) { - return this.check(int2(params)); - }, - safe(params) { - return this.check(int2(params)); - }, - positive(params) { - return this.check(_gt2(0, params)); - }, - nonnegative(params) { - return this.check(_gte2(0, params)); - }, - negative(params) { - return this.check(_lt2(0, params)); - }, - nonpositive(params) { - return this.check(_lte2(0, params)); +var error68 = () => { + const Sizable = { + string: { + unit: { + one: "\u0576\u0577\u0561\u0576", + many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" }, - multipleOf(value, params) { - return this.check(_multipleOf2(value, params)); + file: { + unit: { + one: "\u0562\u0561\u0575\u0569", + many: "\u0562\u0561\u0575\u0569\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" }, - step(value, params) { - return this.check(_multipleOf2(value, params)); + array: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" }, - finite() { - return this; + set: { + unit: { + one: "\u057F\u0561\u0580\u0580", + many: "\u057F\u0561\u0580\u0580\u0565\u0580" + }, + verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" } - }); - const bag = inst._zod.bag; - inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; - inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; - inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); - inst.isFinite = true; - inst.format = bag.format ?? null; -}); -function number5(params) { - return _number2(ZodNumber2, params); -} -var ZodNumberFormat2 = /* @__PURE__ */ $constructor2("ZodNumberFormat", (inst, def) => { - $ZodNumberFormat2.init(inst, def); - ZodNumber2.init(inst, def); -}); -function int2(params) { - return _int2(ZodNumberFormat2, params); -} -function float322(params) { - return _float322(ZodNumberFormat2, params); -} -function float642(params) { - return _float642(ZodNumberFormat2, params); -} -function int322(params) { - return _int322(ZodNumberFormat2, params); -} -function uint322(params) { - return _uint322(ZodNumberFormat2, params); -} -var ZodBoolean2 = /* @__PURE__ */ $constructor2("ZodBoolean", (inst, def) => { - $ZodBoolean2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => booleanProcessor2(inst, ctx, json4, params); -}); -function boolean5(params) { - return _boolean2(ZodBoolean2, params); -} -var ZodBigInt2 = /* @__PURE__ */ $constructor2("ZodBigInt", (inst, def) => { - $ZodBigInt2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => bigintProcessor2(inst, ctx, json4, params); - inst.gte = (value, params) => inst.check(_gte2(value, params)); - inst.min = (value, params) => inst.check(_gte2(value, params)); - inst.gt = (value, params) => inst.check(_gt2(value, params)); - inst.gte = (value, params) => inst.check(_gte2(value, params)); - inst.min = (value, params) => inst.check(_gte2(value, params)); - inst.lt = (value, params) => inst.check(_lt2(value, params)); - inst.lte = (value, params) => inst.check(_lte2(value, params)); - inst.max = (value, params) => inst.check(_lte2(value, params)); - inst.positive = (params) => inst.check(_gt2(BigInt(0), params)); - inst.negative = (params) => inst.check(_lt2(BigInt(0), params)); - inst.nonpositive = (params) => inst.check(_lte2(BigInt(0), params)); - inst.nonnegative = (params) => inst.check(_gte2(BigInt(0), params)); - inst.multipleOf = (value, params) => inst.check(_multipleOf2(value, params)); - const bag = inst._zod.bag; - inst.minValue = bag.minimum ?? null; - inst.maxValue = bag.maximum ?? null; - inst.format = bag.format ?? null; -}); -function bigint5(params) { - return _bigint2(ZodBigInt2, params); -} -var ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("ZodBigIntFormat", (inst, def) => { - $ZodBigIntFormat2.init(inst, def); - ZodBigInt2.init(inst, def); -}); -function int642(params) { - return _int642(ZodBigIntFormat2, params); -} -function uint642(params) { - return _uint642(ZodBigIntFormat2, params); -} -var ZodSymbol2 = /* @__PURE__ */ $constructor2("ZodSymbol", (inst, def) => { - $ZodSymbol2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => symbolProcessor2(inst, ctx, json4, params); -}); -function symbol2(params) { - return _symbol2(ZodSymbol2, params); -} -var ZodUndefined2 = /* @__PURE__ */ $constructor2("ZodUndefined", (inst, def) => { - $ZodUndefined2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => undefinedProcessor2(inst, ctx, json4, params); -}); -function _undefined6(params) { - return _undefined5(ZodUndefined2, params); -} -var ZodNull2 = /* @__PURE__ */ $constructor2("ZodNull", (inst, def) => { - $ZodNull2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nullProcessor2(inst, ctx, json4, params); -}); -function _null6(params) { - return _null5(ZodNull2, params); -} -var ZodAny2 = /* @__PURE__ */ $constructor2("ZodAny", (inst, def) => { - $ZodAny2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => anyProcessor2(inst, ctx, json4, params); -}); -function any2() { - return _any2(ZodAny2); -} -var ZodUnknown2 = /* @__PURE__ */ $constructor2("ZodUnknown", (inst, def) => { - $ZodUnknown2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => unknownProcessor2(inst, ctx, json4, params); -}); -function unknown2() { - return _unknown2(ZodUnknown2); -} -var ZodNever2 = /* @__PURE__ */ $constructor2("ZodNever", (inst, def) => { - $ZodNever2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => neverProcessor2(inst, ctx, json4, params); -}); -function never2(params) { - return _never2(ZodNever2, params); -} -var ZodVoid2 = /* @__PURE__ */ $constructor2("ZodVoid", (inst, def) => { - $ZodVoid2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => voidProcessor2(inst, ctx, json4, params); -}); -function _void4(params) { - return _void3(ZodVoid2, params); -} -var ZodDate2 = /* @__PURE__ */ $constructor2("ZodDate", (inst, def) => { - $ZodDate2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => dateProcessor2(inst, ctx, json4, params); - inst.min = (value, params) => inst.check(_gte2(value, params)); - inst.max = (value, params) => inst.check(_lte2(value, params)); - const c = inst._zod.bag; - inst.minDate = c.minimum ? new Date(c.minimum) : null; - inst.maxDate = c.maximum ? new Date(c.maximum) : null; -}); -function date7(params) { - return _date2(ZodDate2, params); -} -var ZodArray2 = /* @__PURE__ */ $constructor2("ZodArray", (inst, def) => { - $ZodArray2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => arrayProcessor2(inst, ctx, json4, params); - inst.element = def.element; - _installLazyMethods(inst, "ZodArray", { - min(n, params) { - return this.check(_minLength2(n, params)); - }, - nonempty(params) { - return this.check(_minLength2(1, params)); - }, - max(n, params) { - return this.check(_maxLength2(n, params)); - }, - length(n, params) { - return this.check(_length2(n, params)); - }, - unwrap() { - return this.element; - } - }); -}); -function array2(element, params) { - return _array2(ZodArray2, element, params); -} -function keyof2(schema) { - const shape = schema._zod.def.shape; - return _enum4(Object.keys(shape)); -} -var ZodObject2 = /* @__PURE__ */ $constructor2("ZodObject", (inst, def) => { - $ZodObjectJIT2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => objectProcessor2(inst, ctx, json4, params); - util_exports2.defineLazy(inst, "shape", () => { - return def.shape; - }); - _installLazyMethods(inst, "ZodObject", { - keyof() { - return _enum4(Object.keys(this._zod.def.shape)); - }, - catchall(catchall) { - return this.clone({ ...this._zod.def, catchall }); - }, - passthrough() { - return this.clone({ ...this._zod.def, catchall: unknown2() }); - }, - loose() { - return this.clone({ ...this._zod.def, catchall: unknown2() }); - }, - strict() { - return this.clone({ ...this._zod.def, catchall: never2() }); - }, - strip() { - return this.clone({ ...this._zod.def, catchall: void 0 }); - }, - extend(incoming) { - return util_exports2.extend(this, incoming); - }, - safeExtend(incoming) { - return util_exports2.safeExtend(this, incoming); - }, - merge(other) { - return util_exports2.merge(this, other); - }, - pick(mask) { - return util_exports2.pick(this, mask); - }, - omit(mask) { - return util_exports2.omit(this, mask); - }, - partial(...args) { - return util_exports2.partial(ZodOptional2, this, args[0]); - }, - required(...args) { - return util_exports2.required(ZodNonOptional2, this, args[0]); - } - }); -}); -function object2(shape, params) { - const def = { - type: "object", - shape: shape ?? {}, - ...util_exports2.normalizeParams(params) }; - return new ZodObject2(def); -} -function strictObject2(shape, params) { - return new ZodObject2({ - type: "object", - shape, - catchall: never2(), - ...util_exports2.normalizeParams(params) - }); -} -function looseObject2(shape, params) { - return new ZodObject2({ - type: "object", - shape, - catchall: unknown2(), - ...util_exports2.normalizeParams(params) - }); -} -var ZodUnion2 = /* @__PURE__ */ $constructor2("ZodUnion", (inst, def) => { - $ZodUnion2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor2(inst, ctx, json4, params); - inst.options = def.options; -}); -function union2(options, params) { - return new ZodUnion2({ - type: "union", - options, - ...util_exports2.normalizeParams(params) - }); -} -var ZodXor2 = /* @__PURE__ */ $constructor2("ZodXor", (inst, def) => { - ZodUnion2.init(inst, def); - $ZodXor2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => unionProcessor2(inst, ctx, json4, params); - inst.options = def.options; -}); -function xor2(options, params) { - return new ZodXor2({ - type: "union", - options, - inclusive: false, - ...util_exports2.normalizeParams(params) - }); -} -var ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor2("ZodDiscriminatedUnion", (inst, def) => { - ZodUnion2.init(inst, def); - $ZodDiscriminatedUnion2.init(inst, def); -}); -function discriminatedUnion2(discriminator, options, params) { - return new ZodDiscriminatedUnion2({ - type: "union", - options, - discriminator, - ...util_exports2.normalizeParams(params) - }); -} -var ZodIntersection2 = /* @__PURE__ */ $constructor2("ZodIntersection", (inst, def) => { - $ZodIntersection2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => intersectionProcessor2(inst, ctx, json4, params); -}); -function intersection2(left, right) { - return new ZodIntersection2({ - type: "intersection", - left, - right - }); -} -var ZodTuple2 = /* @__PURE__ */ $constructor2("ZodTuple", (inst, def) => { - $ZodTuple2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => tupleProcessor2(inst, ctx, json4, params); - inst.rest = (rest) => inst.clone({ - ...inst._zod.def, - rest - }); -}); -function tuple2(items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType2; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new ZodTuple2({ - type: "tuple", - items, - rest, - ...util_exports2.normalizeParams(params) - }); -} -var ZodRecord2 = /* @__PURE__ */ $constructor2("ZodRecord", (inst, def) => { - $ZodRecord2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => recordProcessor2(inst, ctx, json4, params); - inst.keyType = def.keyType; - inst.valueType = def.valueType; -}); -function record2(keyType, valueType, params) { - if (!valueType || !valueType._zod) { - return new ZodRecord2({ - type: "record", - keyType: string5(), - valueType: keyType, - ...util_exports2.normalizeParams(valueType) - }); + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - return new ZodRecord2({ - type: "record", - keyType, - valueType, - ...util_exports2.normalizeParams(params) - }); -} -function partialRecord2(keyType, valueType, params) { - const k = clone2(keyType); - k._zod.values = void 0; - return new ZodRecord2({ - type: "record", - keyType: k, - valueType, - ...util_exports2.normalizeParams(params) - }); -} -function looseRecord2(keyType, valueType, params) { - return new ZodRecord2({ - type: "record", - keyType, - valueType, - mode: "loose", - ...util_exports2.normalizeParams(params) - }); -} -var ZodMap2 = /* @__PURE__ */ $constructor2("ZodMap", (inst, def) => { - $ZodMap2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => mapProcessor2(inst, ctx, json4, params); - inst.keyType = def.keyType; - inst.valueType = def.valueType; - inst.min = (...args) => inst.check(_minSize2(...args)); - inst.nonempty = (params) => inst.check(_minSize2(1, params)); - inst.max = (...args) => inst.check(_maxSize2(...args)); - inst.size = (...args) => inst.check(_size2(...args)); -}); -function map2(keyType, valueType, params) { - return new ZodMap2({ - type: "map", - keyType, - valueType, - ...util_exports2.normalizeParams(params) - }); -} -var ZodSet2 = /* @__PURE__ */ $constructor2("ZodSet", (inst, def) => { - $ZodSet2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => setProcessor2(inst, ctx, json4, params); - inst.min = (...args) => inst.check(_minSize2(...args)); - inst.nonempty = (params) => inst.check(_minSize2(1, params)); - inst.max = (...args) => inst.check(_maxSize2(...args)); - inst.size = (...args) => inst.check(_size2(...args)); -}); -function set2(valueType, params) { - return new ZodSet2({ - type: "set", - valueType, - ...util_exports2.normalizeParams(params) - }); -} -var ZodEnum2 = /* @__PURE__ */ $constructor2("ZodEnum", (inst, def) => { - $ZodEnum2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => enumProcessor2(inst, ctx, json4, params); - inst.enum = def.entries; - inst.options = Object.values(def.entries); - const keys = new Set(Object.keys(def.entries)); - inst.extract = (values, params) => { - const newEntries = {}; - for (const value of values) { - if (keys.has(value)) { - newEntries[value] = def.entries[value]; - } else - throw new Error(`Key ${value} not found in enum`); - } - return new ZodEnum2({ - ...def, - checks: [], - ...util_exports2.normalizeParams(params), - entries: newEntries - }); + const FormatDictionary = { + regex: "\u0574\u0578\u0582\u057F\u0584", + email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + url: "URL", + emoji: "\u0567\u0574\u0578\u057B\u056B", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", + date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", + time: "ISO \u056A\u0561\u0574", + duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", + ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", + ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", + cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", + base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", + json_string: "JSON \u057F\u0578\u0572", + e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + jwt: "JWT", + template_literal: "\u0574\u0578\u0582\u057F\u0584" }; - inst.exclude = (values, params) => { - const newEntries = { ...def.entries }; - for (const value of values) { - if (keys.has(value)) { - delete newEntries[value]; - } else - throw new Error(`Key ${value} not found in enum`); - } - return new ZodEnum2({ - ...def, - checks: [], - ...util_exports2.normalizeParams(params), - entries: newEntries - }); + const TypeDictionary = { + nan: "NaN", + number: "\u0569\u056B\u057E", + array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" }; -}); -function _enum4(values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new ZodEnum2({ - type: "enum", - entries, - ...util_exports2.normalizeParams(params) - }); -} -function nativeEnum2(entries, params) { - return new ZodEnum2({ - type: "enum", - entries, - ...util_exports2.normalizeParams(params) - }); -} -var ZodLiteral2 = /* @__PURE__ */ $constructor2("ZodLiteral", (inst, def) => { - $ZodLiteral2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => literalProcessor2(inst, ctx, json4, params); - inst.values = new Set(def.values); - Object.defineProperty(inst, "value", { - get() { - if (def.values.length > 1) { - throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue4.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + } + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; } - return def.values[0]; - } - }); -}); -function literal2(value, params) { - return new ZodLiteral2({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...util_exports2.normalizeParams(params) - }); -} -var ZodFile2 = /* @__PURE__ */ $constructor2("ZodFile", (inst, def) => { - $ZodFile2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => fileProcessor2(inst, ctx, json4, params); - inst.min = (size, params) => inst.check(_minSize2(size, params)); - inst.max = (size, params) => inst.check(_maxSize2(size, params)); - inst.mime = (types, params) => inst.check(_mime2(Array.isArray(types) ? types : [types], params)); -}); -function file2(params) { - return _file2(ZodFile2, params); -} -var ZodTransform2 = /* @__PURE__ */ $constructor2("ZodTransform", (inst, def) => { - $ZodTransform2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => transformProcessor2(inst, ctx, json4, params); - inst._zod.parse = (payload, _ctx) => { - if (_ctx.direction === "backward") { - throw new $ZodEncodeError2(inst.constructor.name); - } - payload.addIssue = (issue5) => { - if (typeof issue5 === "string") { - payload.issues.push(util_exports2.issue(issue5, payload.value, def)); - } else { - const _issue = issue5; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = inst); - payload.issues.push(util_exports2.issue(_issue)); + case "invalid_value": + if (issue4.values.length === 1) + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive2(issue4.values[1])}`; + return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getArmenianPlural2(maxValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue4.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue4.maximum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue4.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue4.maximum.toString()}`; } - }; - const output = def.transform(payload.value, payload); - if (output instanceof Promise) { - return output.then((output2) => { - payload.value = output2; - payload.fallback = true; - return payload; - }); + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.minimum); + const unit = getArmenianPlural2(minValue, sizing.unit.one, sizing.unit.many); + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue4.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue4.minimum.toString()} ${unit}`; + } + return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle2(issue4.origin)} \u056C\u056B\u0576\u056B ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + if (_issue.format === "ends_with") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + if (_issue.format === "includes") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; + return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue4.divisor}-\u056B`; + case "unrecognized_keys": + return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue4.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle2(issue4.origin)}-\u0578\u0582\u0574`; + case "invalid_union": + return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + case "invalid_element": + return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle2(issue4.origin)}-\u0578\u0582\u0574`; + default: + return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; } - payload.value = output; - payload.fallback = true; - return payload; }; -}); -function transform2(fn) { - return new ZodTransform2({ - type: "transform", - transform: fn - }); -} -var ZodOptional2 = /* @__PURE__ */ $constructor2("ZodOptional", (inst, def) => { - $ZodOptional2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => optionalProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function optional2(innerType) { - return new ZodOptional2({ - type: "optional", - innerType - }); -} -var ZodExactOptional2 = /* @__PURE__ */ $constructor2("ZodExactOptional", (inst, def) => { - $ZodExactOptional2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => optionalProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function exactOptional2(innerType) { - return new ZodExactOptional2({ - type: "optional", - innerType - }); -} -var ZodNullable2 = /* @__PURE__ */ $constructor2("ZodNullable", (inst, def) => { - $ZodNullable2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nullableProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nullable2(innerType) { - return new ZodNullable2({ - type: "nullable", - innerType - }); -} -function nullish4(innerType) { - return optional2(nullable2(innerType)); -} -var ZodDefault2 = /* @__PURE__ */ $constructor2("ZodDefault", (inst, def) => { - $ZodDefault2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => defaultProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeDefault = inst.unwrap; -}); -function _default4(innerType, defaultValue) { - return new ZodDefault2({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : util_exports2.shallowClone(defaultValue); - } - }); -} -var ZodPrefault2 = /* @__PURE__ */ $constructor2("ZodPrefault", (inst, def) => { - $ZodPrefault2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => prefaultProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function prefault2(innerType, defaultValue) { - return new ZodPrefault2({ - type: "prefault", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : util_exports2.shallowClone(defaultValue); - } - }); -} -var ZodNonOptional2 = /* @__PURE__ */ $constructor2("ZodNonOptional", (inst, def) => { - $ZodNonOptional2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nonoptionalProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nonoptional2(innerType, params) { - return new ZodNonOptional2({ - type: "nonoptional", - innerType, - ...util_exports2.normalizeParams(params) - }); -} -var ZodSuccess2 = /* @__PURE__ */ $constructor2("ZodSuccess", (inst, def) => { - $ZodSuccess2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => successProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function success2(innerType) { - return new ZodSuccess2({ - type: "success", - innerType - }); -} -var ZodCatch2 = /* @__PURE__ */ $constructor2("ZodCatch", (inst, def) => { - $ZodCatch2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => catchProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeCatch = inst.unwrap; -}); -function _catch4(innerType, catchValue) { - return new ZodCatch2({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue - }); -} -var ZodNaN2 = /* @__PURE__ */ $constructor2("ZodNaN", (inst, def) => { - $ZodNaN2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => nanProcessor2(inst, ctx, json4, params); -}); -function nan2(params) { - return _nan2(ZodNaN2, params); -} -var ZodPipe2 = /* @__PURE__ */ $constructor2("ZodPipe", (inst, def) => { - $ZodPipe2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => pipeProcessor2(inst, ctx, json4, params); - inst.in = def.in; - inst.out = def.out; -}); -function pipe2(in_, out) { - return new ZodPipe2({ - type: "pipe", - in: in_, - out - // ...util.normalizeParams(params), - }); -} -var ZodCodec2 = /* @__PURE__ */ $constructor2("ZodCodec", (inst, def) => { - ZodPipe2.init(inst, def); - $ZodCodec2.init(inst, def); -}); -function codec2(in_, out, params) { - return new ZodCodec2({ - type: "pipe", - in: in_, - out, - transform: params.decode, - reverseTransform: params.encode - }); -} -function invertCodec(codec4) { - const def = codec4._zod.def; - return new ZodCodec2({ - type: "pipe", - in: def.out, - out: def.in, - transform: def.reverseTransform, - reverseTransform: def.transform - }); -} -var ZodPreprocess = /* @__PURE__ */ $constructor2("ZodPreprocess", (inst, def) => { - ZodPipe2.init(inst, def); - $ZodPreprocess.init(inst, def); -}); -var ZodReadonly2 = /* @__PURE__ */ $constructor2("ZodReadonly", (inst, def) => { - $ZodReadonly2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => readonlyProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function readonly2(innerType) { - return new ZodReadonly2({ - type: "readonly", - innerType - }); -} -var ZodTemplateLiteral2 = /* @__PURE__ */ $constructor2("ZodTemplateLiteral", (inst, def) => { - $ZodTemplateLiteral2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => templateLiteralProcessor2(inst, ctx, json4, params); -}); -function templateLiteral2(parts, params) { - return new ZodTemplateLiteral2({ - type: "template_literal", - parts, - ...util_exports2.normalizeParams(params) - }); -} -var ZodLazy2 = /* @__PURE__ */ $constructor2("ZodLazy", (inst, def) => { - $ZodLazy2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => lazyProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.getter(); -}); -function lazy2(getter) { - return new ZodLazy2({ - type: "lazy", - getter - }); -} -var ZodPromise2 = /* @__PURE__ */ $constructor2("ZodPromise", (inst, def) => { - $ZodPromise2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => promiseProcessor2(inst, ctx, json4, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function promise2(innerType) { - return new ZodPromise2({ - type: "promise", - innerType - }); -} -var ZodFunction2 = /* @__PURE__ */ $constructor2("ZodFunction", (inst, def) => { - $ZodFunction2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => functionProcessor2(inst, ctx, json4, params); -}); -function _function2(params) { - return new ZodFunction2({ - type: "function", - input: Array.isArray(params?.input) ? tuple2(params?.input) : params?.input ?? array2(unknown2()), - output: params?.output ?? unknown2() - }); -} -var ZodCustom2 = /* @__PURE__ */ $constructor2("ZodCustom", (inst, def) => { - $ZodCustom2.init(inst, def); - ZodType2.init(inst, def); - inst._zod.processJSONSchema = (ctx, json4, params) => customProcessor2(inst, ctx, json4, params); -}); -function check2(fn) { - const ch = new $ZodCheck2({ - check: "custom" - // ...util.normalizeParams(params), - }); - ch._zod.check = fn; - return ch; -} -function custom2(fn, _params) { - return _custom2(ZodCustom2, fn ?? (() => true), _params); -} -function refine2(fn, _params = {}) { - return _refine2(ZodCustom2, fn, _params); -} -function superRefine2(fn, params) { - return _superRefine2(fn, params); +}; +function hy_default2() { + return { + localeError: error68() + }; } -var describe4 = describe3; -var meta4 = meta3; -function _instanceof2(cls, params = {}) { - const inst = new ZodCustom2({ - type: "custom", - check: "custom", - fn: (data) => data instanceof cls, - abort: true, - ...util_exports2.normalizeParams(params) - }); - inst._zod.bag.Class = cls; - inst._zod.check = (payload) => { - if (!(payload.value instanceof cls)) { - payload.issues.push({ - code: "invalid_type", - expected: cls.name, - input: payload.value, - inst, - path: [...inst._zod.def.path ?? []] - }); + +// node_modules/zod/v4/locales/id.js +var error69 = () => { + const Sizable = { + string: { unit: "karakter", verb: "memiliki" }, + file: { unit: "byte", verb: "memiliki" }, + array: { unit: "item", verb: "memiliki" }, + set: { unit: "item", verb: "memiliki" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "alamat email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tanggal dan waktu format ISO", + date: "tanggal format ISO", + time: "jam format ISO", + duration: "durasi format ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "rentang alamat IPv4", + cidrv6: "rentang alamat IPv6", + base64: "string dengan enkode base64", + base64url: "string dengan enkode base64url", + json_string: "string JSON", + e164: "angka E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input tidak valid: diharapkan instanceof ${issue4.expected}, diterima ${received}`; + } + return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive2(issue4.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Terlalu besar: diharapkan ${issue4.origin ?? "value"} memiliki ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue4.origin ?? "value"} menjadi ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Terlalu kecil: diharapkan ${issue4.origin} memiliki ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: diharapkan ${issue4.origin} menjadi ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak valid: harus menyertakan "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak valid: harus sesuai pola ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} tidak valid`; + } + case "not_multiple_of": + return `Angka tidak valid: harus kelipatan dari ${issue4.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali ${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak valid di ${issue4.origin}`; + case "invalid_union": + return "Input tidak valid"; + case "invalid_element": + return `Nilai tidak valid di ${issue4.origin}`; + default: + return `Input tidak valid`; } }; - return inst; -} -var stringbool2 = (...args) => _stringbool2({ - Codec: ZodCodec2, - Boolean: ZodBoolean2, - String: ZodString2 -}, ...args); -function json2(params) { - const jsonSchema = lazy2(() => { - return union2([string5(params), number5(), boolean5(), _null6(), array2(jsonSchema), record2(string5(), jsonSchema)]); - }); - return jsonSchema; -} -function preprocess2(fn, schema) { - return new ZodPreprocess({ - type: "pipe", - in: transform2(fn), - out: schema - }); +}; +function id_default2() { + return { + localeError: error69() + }; } -// node_modules/zod/v4/classic/compat.js -var ZodIssueCode2 = { - invalid_type: "invalid_type", - too_big: "too_big", - too_small: "too_small", - invalid_format: "invalid_format", - not_multiple_of: "not_multiple_of", - unrecognized_keys: "unrecognized_keys", - invalid_union: "invalid_union", - invalid_key: "invalid_key", - invalid_element: "invalid_element", - invalid_value: "invalid_value", - custom: "custom" +// node_modules/zod/v4/locales/is.js +var error70 = () => { + const Sizable = { + string: { unit: "stafi", verb: "a\xF0 hafa" }, + file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, + array: { unit: "hluti", verb: "a\xF0 hafa" }, + set: { unit: "hluti", verb: "a\xF0 hafa" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "gildi", + email: "netfang", + url: "vefsl\xF3\xF0", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dagsetning og t\xEDmi", + date: "ISO dagsetning", + time: "ISO t\xEDmi", + duration: "ISO t\xEDmalengd", + ipv4: "IPv4 address", + ipv6: "IPv6 address", + cidrv4: "IPv4 range", + cidrv6: "IPv6 range", + base64: "base64-encoded strengur", + base64url: "base64url-encoded strengur", + json_string: "JSON strengur", + e164: "E.164 t\xF6lugildi", + jwt: "JWT", + template_literal: "gildi" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmer", + array: "fylki" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue4.expected}`; + } + return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive2(issue4.values[0])}`; + return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin ?? "gildi"} hafi ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "hluti"}`; + return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin ?? "gildi"} s\xE9 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin} hafi ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue4.origin} s\xE9 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; + if (_issue.format === "regex") + return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; + return `Rangt ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue4.divisor}`; + case "unrecognized_keys": + return `\xD3\xFEekkt ${issue4.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Rangur lykill \xED ${issue4.origin}`; + case "invalid_union": + return "Rangt gildi"; + case "invalid_element": + return `Rangt gildi \xED ${issue4.origin}`; + default: + return `Rangt gildi`; + } + }; }; -function setErrorMap2(map4) { - config2({ - customError: map4 - }); -} -function getErrorMap2() { - return config2().customError; +function is_default2() { + return { + localeError: error70() + }; } -var ZodFirstPartyTypeKind2; -/* @__PURE__ */ (function(ZodFirstPartyTypeKind4) { -})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); -// node_modules/zod/v4/classic/from-json-schema.js -var z2 = { - ...schemas_exports4, - ...checks_exports4, - iso: iso_exports2 -}; -var RECOGNIZED_KEYS2 = /* @__PURE__ */ new Set([ - // Schema identification - "$schema", - "$ref", - "$defs", - "definitions", - // Core schema keywords - "$id", - "id", - "$comment", - "$anchor", - "$vocabulary", - "$dynamicRef", - "$dynamicAnchor", - // Type - "type", - "enum", - "const", - // Composition - "anyOf", - "oneOf", - "allOf", - "not", - // Object - "properties", - "required", - "additionalProperties", - "patternProperties", - "propertyNames", - "minProperties", - "maxProperties", - // Array - "items", - "prefixItems", - "additionalItems", - "minItems", - "maxItems", - "uniqueItems", - "contains", - "minContains", - "maxContains", - // String - "minLength", - "maxLength", - "pattern", - "format", - // Number - "minimum", - "maximum", - "exclusiveMinimum", - "exclusiveMaximum", - "multipleOf", - // Already handled metadata - "description", - "default", - // Content - "contentEncoding", - "contentMediaType", - "contentSchema", - // Unsupported (error-throwing) - "unevaluatedItems", - "unevaluatedProperties", - "if", - "then", - "else", - "dependentSchemas", - "dependentRequired", - // OpenAPI - "nullable", - "readOnly" -]); -function detectVersion2(schema, defaultTarget) { - const $schema = schema.$schema; - if ($schema === "https://json-schema.org/draft/2020-12/schema") { - return "draft-2020-12"; - } - if ($schema === "http://json-schema.org/draft-07/schema#") { - return "draft-7"; - } - if ($schema === "http://json-schema.org/draft-04/schema#") { - return "draft-4"; - } - return defaultTarget ?? "draft-2020-12"; -} -function resolveRef2(ref, ctx) { - if (!ref.startsWith("#")) { - throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); - } - const path = ref.slice(1).split("/").filter(Boolean); - if (path.length === 0) { - return ctx.rootSchema; - } - const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; - if (path[0] === defsKey) { - const key = path[1]; - if (!key || !ctx.defs[key]) { - throw new Error(`Reference not found: ${ref}`); - } - return ctx.defs[key]; - } - throw new Error(`Reference not found: ${ref}`); -} -function convertBaseSchema2(schema, ctx) { - if (schema.not !== void 0) { - if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { - return z2.never(); - } - throw new Error("not is not supported in Zod (except { not: {} } for never)"); - } - if (schema.unevaluatedItems !== void 0) { - throw new Error("unevaluatedItems is not supported"); - } - if (schema.unevaluatedProperties !== void 0) { - throw new Error("unevaluatedProperties is not supported"); - } - if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { - throw new Error("Conditional schemas (if/then/else) are not supported"); - } - if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { - throw new Error("dependentSchemas and dependentRequired are not supported"); - } - if (schema.$ref) { - const refPath = schema.$ref; - if (ctx.refs.has(refPath)) { - return ctx.refs.get(refPath); - } - if (ctx.processing.has(refPath)) { - return z2.lazy(() => { - if (!ctx.refs.has(refPath)) { - throw new Error(`Circular reference not resolved: ${refPath}`); - } - return ctx.refs.get(refPath); - }); - } - ctx.processing.add(refPath); - const resolved = resolveRef2(refPath, ctx); - const zodSchema2 = convertSchema2(resolved, ctx); - ctx.refs.set(refPath, zodSchema2); - ctx.processing.delete(refPath); - return zodSchema2; - } - if (schema.enum !== void 0) { - const enumValues = schema.enum; - if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { - return z2.null(); - } - if (enumValues.length === 0) { - return z2.never(); - } - if (enumValues.length === 1) { - return z2.literal(enumValues[0]); - } - if (enumValues.every((v) => typeof v === "string")) { - return z2.enum(enumValues); - } - const literalSchemas = enumValues.map((v) => z2.literal(v)); - if (literalSchemas.length < 2) { - return literalSchemas[0]; - } - return z2.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); - } - if (schema.const !== void 0) { - return z2.literal(schema.const); - } - const type = schema.type; - if (Array.isArray(type)) { - const typeSchemas = type.map((t) => { - const typeSchema = { ...schema, type: t }; - return convertBaseSchema2(typeSchema, ctx); - }); - if (typeSchemas.length === 0) { - return z2.never(); - } - if (typeSchemas.length === 1) { - return typeSchemas[0]; - } - return z2.union(typeSchemas); - } - if (!type) { - return z2.any(); +// node_modules/zod/v4/locales/it.js +var error71 = () => { + const Sizable = { + string: { unit: "caratteri", verb: "avere" }, + file: { unit: "byte", verb: "avere" }, + array: { unit: "elementi", verb: "avere" }, + set: { unit: "elementi", verb: "avere" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - let zodSchema; - switch (type) { - case "string": { - let stringSchema = z2.string(); - if (schema.format) { - const format2 = schema.format; - if (format2 === "email") { - stringSchema = stringSchema.check(z2.email()); - } else if (format2 === "uri" || format2 === "uri-reference") { - stringSchema = stringSchema.check(z2.url()); - } else if (format2 === "uuid" || format2 === "guid") { - stringSchema = stringSchema.check(z2.uuid()); - } else if (format2 === "date-time") { - stringSchema = stringSchema.check(z2.iso.datetime()); - } else if (format2 === "date") { - stringSchema = stringSchema.check(z2.iso.date()); - } else if (format2 === "time") { - stringSchema = stringSchema.check(z2.iso.time()); - } else if (format2 === "duration") { - stringSchema = stringSchema.check(z2.iso.duration()); - } else if (format2 === "ipv4") { - stringSchema = stringSchema.check(z2.ipv4()); - } else if (format2 === "ipv6") { - stringSchema = stringSchema.check(z2.ipv6()); - } else if (format2 === "mac") { - stringSchema = stringSchema.check(z2.mac()); - } else if (format2 === "cidr") { - stringSchema = stringSchema.check(z2.cidrv4()); - } else if (format2 === "cidr-v6") { - stringSchema = stringSchema.check(z2.cidrv6()); - } else if (format2 === "base64") { - stringSchema = stringSchema.check(z2.base64()); - } else if (format2 === "base64url") { - stringSchema = stringSchema.check(z2.base64url()); - } else if (format2 === "e164") { - stringSchema = stringSchema.check(z2.e164()); - } else if (format2 === "jwt") { - stringSchema = stringSchema.check(z2.jwt()); - } else if (format2 === "emoji") { - stringSchema = stringSchema.check(z2.emoji()); - } else if (format2 === "nanoid") { - stringSchema = stringSchema.check(z2.nanoid()); - } else if (format2 === "cuid") { - stringSchema = stringSchema.check(z2.cuid()); - } else if (format2 === "cuid2") { - stringSchema = stringSchema.check(z2.cuid2()); - } else if (format2 === "ulid") { - stringSchema = stringSchema.check(z2.ulid()); - } else if (format2 === "xid") { - stringSchema = stringSchema.check(z2.xid()); - } else if (format2 === "ksuid") { - stringSchema = stringSchema.check(z2.ksuid()); + const FormatDictionary = { + regex: "input", + email: "indirizzo email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e ora ISO", + date: "data ISO", + time: "ora ISO", + duration: "durata ISO", + ipv4: "indirizzo IPv4", + ipv6: "indirizzo IPv6", + cidrv4: "intervallo IPv4", + cidrv6: "intervallo IPv6", + base64: "stringa codificata in base64", + base64url: "URL codificata in base64", + json_string: "stringa JSON", + e164: "numero E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "numero", + array: "vettore" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input non valido: atteso instanceof ${issue4.expected}, ricevuto ${received}`; } + return `Input non valido: atteso ${expected}, ricevuto ${received}`; } - if (typeof schema.minLength === "number") { - stringSchema = stringSchema.min(schema.minLength); + case "invalid_value": + if (issue4.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive2(issue4.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Troppo grande: ${issue4.origin ?? "valore"} deve avere ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue4.origin ?? "valore"} deve essere ${adj}${issue4.maximum.toString()}`; } - if (typeof schema.maxLength === "number") { - stringSchema = stringSchema.max(schema.maxLength); + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Troppo piccolo: ${issue4.origin} deve avere ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Troppo piccolo: ${issue4.origin} deve essere ${adj}${issue4.minimum.toString()}`; } - if (schema.pattern) { - stringSchema = stringSchema.regex(new RegExp(schema.pattern)); + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Stringa non valida: deve terminare con "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Stringa non valida: deve includere "${_issue.includes}"`; + if (_issue.format === "regex") + return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; + return `Input non valido: ${FormatDictionary[_issue.format] ?? issue4.format}`; } - zodSchema = stringSchema; - break; + case "not_multiple_of": + return `Numero non valido: deve essere un multiplo di ${issue4.divisor}`; + case "unrecognized_keys": + return `Chiav${issue4.keys.length > 1 ? "i" : "e"} non riconosciut${issue4.keys.length > 1 ? "e" : "a"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Chiave non valida in ${issue4.origin}`; + case "invalid_union": + return "Input non valido"; + case "invalid_element": + return `Valore non valido in ${issue4.origin}`; + default: + return `Input non valido`; } - case "number": - case "integer": { - let numberSchema = type === "integer" ? z2.number().int() : z2.number(); - if (typeof schema.minimum === "number") { - numberSchema = numberSchema.min(schema.minimum); - } - if (typeof schema.maximum === "number") { - numberSchema = numberSchema.max(schema.maximum); + }; +}; +function it_default2() { + return { + localeError: error71() + }; +} + +// node_modules/zod/v4/locales/ja.js +var error72 = () => { + const Sizable = { + string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, + file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, + array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, + set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u5165\u529B\u5024", + email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", + url: "URL", + emoji: "\u7D75\u6587\u5B57", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO\u65E5\u6642", + date: "ISO\u65E5\u4ED8", + time: "ISO\u6642\u523B", + duration: "ISO\u671F\u9593", + ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", + ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", + cidrv4: "IPv4\u7BC4\u56F2", + cidrv6: "IPv6\u7BC4\u56F2", + base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", + json_string: "JSON\u6587\u5B57\u5217", + e164: "E.164\u756A\u53F7", + jwt: "JWT", + template_literal: "\u5165\u529B\u5024" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u6570\u5024", + array: "\u914D\u5217" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue4.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + } + return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; } - if (typeof schema.exclusiveMinimum === "number") { - numberSchema = numberSchema.gt(schema.exclusiveMinimum); - } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { - numberSchema = numberSchema.gt(schema.minimum); + case "invalid_value": + if (issue4.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive2(issue4.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues2(issue4.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "too_big": { + const adj = issue4.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue4.origin ?? "\u5024"}\u306F${issue4.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue4.origin ?? "\u5024"}\u306F${issue4.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } - if (typeof schema.exclusiveMaximum === "number") { - numberSchema = numberSchema.lt(schema.exclusiveMaximum); - } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { - numberSchema = numberSchema.lt(schema.maximum); + case "too_small": { + const adj = issue4.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue4.origin}\u306F${issue4.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue4.origin}\u306F${issue4.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } - if (typeof schema.multipleOf === "number") { - numberSchema = numberSchema.multipleOf(schema.multipleOf); + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "ends_with") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "includes") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (_issue.format === "regex") + return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue4.format}`; } - zodSchema = numberSchema; - break; - } - case "boolean": { - zodSchema = z2.boolean(); - break; - } - case "null": { - zodSchema = z2.null(); - break; + case "not_multiple_of": + return `\u7121\u52B9\u306A\u6570\u5024: ${issue4.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + case "unrecognized_keys": + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue4.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues2(issue4.keys, "\u3001")}`; + case "invalid_key": + return `${issue4.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + case "invalid_union": + return "\u7121\u52B9\u306A\u5165\u529B"; + case "invalid_element": + return `${issue4.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + default: + return `\u7121\u52B9\u306A\u5165\u529B`; } - case "object": { - const shape = {}; - const properties = schema.properties || {}; - const requiredSet = new Set(schema.required || []); - for (const [key, propSchema] of Object.entries(properties)) { - const propZodSchema = convertSchema2(propSchema, ctx); - shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); - } - if (schema.propertyNames) { - const keySchema = convertSchema2(schema.propertyNames, ctx); - const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) : z2.any(); - if (Object.keys(shape).length === 0) { - zodSchema = z2.record(keySchema, valueSchema); - break; + }; +}; +function ja_default2() { + return { + localeError: error72() + }; +} + +// node_modules/zod/v4/locales/ka.js +var error73 = () => { + const Sizable = { + string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, + set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", + email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + url: "URL", + emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", + date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", + time: "\u10D3\u10E0\u10DD", + duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", + ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", + cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", + base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8", + base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8", + json_string: "JSON \u10D5\u10D4\u10DA\u10D8", + e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", + jwt: "JWT", + template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", + string: "\u10D5\u10D4\u10DA\u10D8", + boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", + function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", + array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue4.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; } - const objectSchema2 = z2.object(shape).passthrough(); - const recordSchema = z2.looseRecord(keySchema, valueSchema); - zodSchema = z2.intersection(objectSchema2, recordSchema); - break; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; } - if (schema.patternProperties) { - const patternProps = schema.patternProperties; - const patternKeys = Object.keys(patternProps); - const looseRecords = []; - for (const pattern of patternKeys) { - const patternValue = convertSchema2(patternProps[pattern], ctx); - const keySchema = z2.string().regex(new RegExp(pattern)); - looseRecords.push(z2.looseRecord(keySchema, patternValue)); - } - const schemasToIntersect = []; - if (Object.keys(shape).length > 0) { - schemasToIntersect.push(z2.object(shape).passthrough()); - } - schemasToIntersect.push(...looseRecords); - if (schemasToIntersect.length === 0) { - zodSchema = z2.object({}).passthrough(); - } else if (schemasToIntersect.length === 1) { - zodSchema = schemasToIntersect[0]; - } else { - let result = z2.intersection(schemasToIntersect[0], schemasToIntersect[1]); - for (let i = 2; i < schemasToIntersect.length; i++) { - result = z2.intersection(result, schemasToIntersect[i]); - } - zodSchema = result; + case "invalid_value": + if (issue4.values.length === 1) + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive2(issue4.values[0])}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues2(issue4.values, "|")}-\u10D3\u10D0\u10DC`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit}`; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - break; + return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue4.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue4.minimum.toString()}`; } - const objectSchema = z2.object(shape); - if (schema.additionalProperties === false) { - zodSchema = objectSchema.strict(); - } else if (typeof schema.additionalProperties === "object") { - zodSchema = objectSchema.catchall(convertSchema2(schema.additionalProperties, ctx)); - } else { - zodSchema = objectSchema.passthrough(); + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; + } + if (_issue.format === "ends_with") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; + if (_issue.format === "includes") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; + if (_issue.format === "regex") + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue4.format}`; } - break; + case "not_multiple_of": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue4.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; + case "unrecognized_keys": + return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue4.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue4.origin}-\u10E8\u10D8`; + case "invalid_union": + return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; + case "invalid_element": + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue4.origin}-\u10E8\u10D8`; + default: + return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; } - case "array": { - const prefixItems = schema.prefixItems; - const items = schema.items; - if (prefixItems && Array.isArray(prefixItems)) { - const tupleItems = prefixItems.map((item) => convertSchema2(item, ctx)); - const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema2(items, ctx) : void 0; - if (rest) { - zodSchema = z2.tuple(tupleItems).rest(rest); - } else { - zodSchema = z2.tuple(tupleItems); - } - if (typeof schema.minItems === "number") { - zodSchema = zodSchema.check(z2.minLength(schema.minItems)); - } - if (typeof schema.maxItems === "number") { - zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + }; +}; +function ka_default2() { + return { + localeError: error73() + }; +} + +// node_modules/zod/v4/locales/km.js +var error74 = () => { + const Sizable = { + string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, + set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", + email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", + url: "URL", + emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", + date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", + time: "\u1798\u17C9\u17C4\u1784 ISO", + duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", + ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", + cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", + base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", + base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", + json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", + e164: "\u179B\u17C1\u1781 E.164", + jwt: "JWT", + template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u179B\u17C1\u1781", + array: "\u17A2\u17B6\u179A\u17C1 (Array)", + null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue4.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; } - } else if (Array.isArray(items)) { - const tupleItems = items.map((item) => convertSchema2(item, ctx)); - const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema2(schema.additionalItems, ctx) : void 0; - if (rest) { - zodSchema = z2.tuple(tupleItems).rest(rest); - } else { - zodSchema = z2.tuple(tupleItems); + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive2(issue4.values[0])}`; + return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin} ${adj} ${issue4.minimum.toString()} ${sizing.unit}`; } - if (typeof schema.minItems === "number") { - zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue4.origin} ${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; } - if (typeof schema.maxItems === "number") { - zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + if (_issue.format === "ends_with") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue4.divisor}`; + case "unrecognized_keys": + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue4.origin}`; + case "invalid_union": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + case "invalid_element": + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue4.origin}`; + default: + return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; + } + }; +}; +function km_default2() { + return { + localeError: error74() + }; +} + +// node_modules/zod/v4/locales/kh.js +function kh_default2() { + return km_default2(); +} + +// node_modules/zod/v4/locales/ko.js +var error75 = () => { + const Sizable = { + string: { unit: "\uBB38\uC790", verb: "to have" }, + file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, + array: { unit: "\uAC1C", verb: "to have" }, + set: { unit: "\uAC1C", verb: "to have" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\uC785\uB825", + email: "\uC774\uBA54\uC77C \uC8FC\uC18C", + url: "URL", + emoji: "\uC774\uBAA8\uC9C0", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", + date: "ISO \uB0A0\uC9DC", + time: "ISO \uC2DC\uAC04", + duration: "ISO \uAE30\uAC04", + ipv4: "IPv4 \uC8FC\uC18C", + ipv6: "IPv6 \uC8FC\uC18C", + cidrv4: "IPv4 \uBC94\uC704", + cidrv6: "IPv6 \uBC94\uC704", + base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", + json_string: "JSON \uBB38\uC790\uC5F4", + e164: "E.164 \uBC88\uD638", + jwt: "JWT", + template_literal: "\uC785\uB825" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue4.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; } - } else if (items !== void 0) { - const element = convertSchema2(items, ctx); - let arraySchema = z2.array(element); - if (typeof schema.minItems === "number") { - arraySchema = arraySchema.min(schema.minItems); + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive2(issue4.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues2(issue4.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "too_big": { + const adj = issue4.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue4.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue4.maximum.toString()}${unit} ${adj}${suffix}`; + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue4.maximum.toString()} ${adj}${suffix}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; + const sizing = getSizing(issue4.origin); + const unit = sizing?.unit ?? "\uC694\uC18C"; + if (sizing) { + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue4.minimum.toString()}${unit} ${adj}${suffix}`; } - if (typeof schema.maxItems === "number") { - arraySchema = arraySchema.max(schema.maxItems); + return `${issue4.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue4.minimum.toString()} ${adj}${suffix}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; } - zodSchema = arraySchema; - } else { - zodSchema = z2.array(z2.any()); + if (_issue.format === "ends_with") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "includes") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; + if (_issue.format === "regex") + return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue4.format}`; } - break; + case "not_multiple_of": + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue4.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + case "unrecognized_keys": + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\uC798\uBABB\uB41C \uD0A4: ${issue4.origin}`; + case "invalid_union": + return `\uC798\uBABB\uB41C \uC785\uB825`; + case "invalid_element": + return `\uC798\uBABB\uB41C \uAC12: ${issue4.origin}`; + default: + return `\uC798\uBABB\uB41C \uC785\uB825`; } - default: - throw new Error(`Unsupported type: ${type}`); - } - return zodSchema; + }; +}; +function ko_default2() { + return { + localeError: error75() + }; } -function convertSchema2(schema, ctx) { - if (typeof schema === "boolean") { - return schema ? z2.any() : z2.never(); - } - let baseSchema = convertBaseSchema2(schema, ctx); - const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; - if (schema.anyOf && Array.isArray(schema.anyOf)) { - const options = schema.anyOf.map((s) => convertSchema2(s, ctx)); - const anyOfUnion = z2.union(options); - baseSchema = hasExplicitType ? z2.intersection(baseSchema, anyOfUnion) : anyOfUnion; - } - if (schema.oneOf && Array.isArray(schema.oneOf)) { - const options = schema.oneOf.map((s) => convertSchema2(s, ctx)); - const oneOfUnion = z2.xor(options); - baseSchema = hasExplicitType ? z2.intersection(baseSchema, oneOfUnion) : oneOfUnion; - } - if (schema.allOf && Array.isArray(schema.allOf)) { - if (schema.allOf.length === 0) { - baseSchema = hasExplicitType ? baseSchema : z2.any(); - } else { - let result = hasExplicitType ? baseSchema : convertSchema2(schema.allOf[0], ctx); - const startIdx = hasExplicitType ? 0 : 1; - for (let i = startIdx; i < schema.allOf.length; i++) { - result = z2.intersection(result, convertSchema2(schema.allOf[i], ctx)); + +// node_modules/zod/v4/locales/lt.js +var capitalizeFirstCharacter2 = (text) => { + return text.charAt(0).toUpperCase() + text.slice(1); +}; +function getUnitTypeFromNumber2(number7) { + const abs = Math.abs(number7); + const last = abs % 10; + const last2 = abs % 100; + if (last2 >= 11 && last2 <= 19 || last === 0) + return "many"; + if (last === 1) + return "one"; + return "few"; +} +var error76 = () => { + const Sizable = { + string: { + unit: { + one: "simbolis", + few: "simboliai", + many: "simboli\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", + notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", + notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" + } + } + }, + file: { + unit: { + one: "baitas", + few: "baitai", + many: "bait\u0173" + }, + verb: { + smaller: { + inclusive: "turi b\u016Bti ne didesnis kaip", + notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" + }, + bigger: { + inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", + notInclusive: "turi b\u016Bti didesnis kaip" + } + } + }, + array: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } + } + }, + set: { + unit: { + one: "element\u0105", + few: "elementus", + many: "element\u0173" + }, + verb: { + smaller: { + inclusive: "turi tur\u0117ti ne daugiau kaip", + notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" + }, + bigger: { + inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", + notInclusive: "turi tur\u0117ti daugiau kaip" + } } - baseSchema = result; - } - } - if (schema.nullable === true && ctx.version === "openapi-3.0") { - baseSchema = z2.nullable(baseSchema); - } - if (schema.readOnly === true) { - baseSchema = z2.readonly(baseSchema); - } - if (schema.default !== void 0) { - baseSchema = baseSchema.default(schema.default); - } - const extraMeta = {}; - const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; - for (const key of coreMetadataKeys) { - if (key in schema) { - extraMeta[key] = schema[key]; - } - } - const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; - for (const key of contentMetadataKeys) { - if (key in schema) { - extraMeta[key] = schema[key]; } + }; + function getSizing(origin2, unitType, inclusive, targetShouldBe) { + const result = Sizable[origin2] ?? null; + if (result === null) + return result; + return { + unit: result.unit[unitType], + verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] + }; } - for (const key of Object.keys(schema)) { - if (!RECOGNIZED_KEYS2.has(key)) { - extraMeta[key] = schema[key]; + const FormatDictionary = { + regex: "\u012Fvestis", + email: "el. pa\u0161to adresas", + url: "URL", + emoji: "jaustukas", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO data ir laikas", + date: "ISO data", + time: "ISO laikas", + duration: "ISO trukm\u0117", + ipv4: "IPv4 adresas", + ipv6: "IPv6 adresas", + cidrv4: "IPv4 tinklo prefiksas (CIDR)", + cidrv6: "IPv6 tinklo prefiksas (CIDR)", + base64: "base64 u\u017Ekoduota eilut\u0117", + base64url: "base64url u\u017Ekoduota eilut\u0117", + json_string: "JSON eilut\u0117", + e164: "E.164 numeris", + jwt: "JWT", + template_literal: "\u012Fvestis" + }; + const TypeDictionary = { + nan: "NaN", + number: "skai\u010Dius", + bigint: "sveikasis skai\u010Dius", + string: "eilut\u0117", + boolean: "login\u0117 reik\u0161m\u0117", + undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", + function: "funkcija", + symbol: "simbolis", + array: "masyvas", + object: "objektas", + null: "nulin\u0117 reik\u0161m\u0117" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue4.expected}`; + } + return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Privalo b\u016Bti ${stringifyPrimitive2(issue4.values[0])}`; + return `Privalo b\u016Bti vienas i\u0161 ${joinValues2(issue4.values, "|")} pasirinkim\u0173`; + case "too_big": { + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + const sizing = getSizing(issue4.origin, getUnitTypeFromNumber2(Number(issue4.maximum)), issue4.inclusive ?? false, "smaller"); + if (sizing?.verb) + return `${capitalizeFirstCharacter2(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue4.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue4.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; + return `${capitalizeFirstCharacter2(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue4.maximum.toString()} ${sizing?.unit}`; + } + case "too_small": { + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + const sizing = getSizing(issue4.origin, getUnitTypeFromNumber2(Number(issue4.minimum)), issue4.inclusive ?? false, "bigger"); + if (sizing?.verb) + return `${capitalizeFirstCharacter2(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue4.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; + const adj = issue4.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; + return `${capitalizeFirstCharacter2(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue4.minimum.toString()} ${sizing?.unit}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; + if (_issue.format === "regex") + return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; + return `Neteisingas ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Skai\u010Dius privalo b\u016Bti ${issue4.divisor} kartotinis.`; + case "unrecognized_keys": + return `Neatpa\u017Eint${issue4.keys.length > 1 ? "i" : "as"} rakt${issue4.keys.length > 1 ? "ai" : "as"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return "Rastas klaidingas raktas"; + case "invalid_union": + return "Klaidinga \u012Fvestis"; + case "invalid_element": { + const origin2 = TypeDictionary[issue4.origin] ?? issue4.origin; + return `${capitalizeFirstCharacter2(origin2 ?? issue4.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; + } + default: + return "Klaidinga \u012Fvestis"; } - } - if (Object.keys(extraMeta).length > 0) { - ctx.registry.add(baseSchema, extraMeta); - } - if (schema.description) { - baseSchema = baseSchema.describe(schema.description); - } - return baseSchema; -} -function fromJSONSchema2(schema, params) { - if (typeof schema === "boolean") { - return schema ? z2.any() : z2.never(); - } - let normalized; - try { - normalized = JSON.parse(JSON.stringify(schema)); - } catch { - throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas"); - } - const version4 = detectVersion2(normalized, params?.defaultTarget); - const defs = normalized.$defs || normalized.definitions || {}; - const ctx = { - version: version4, - defs, - refs: /* @__PURE__ */ new Map(), - processing: /* @__PURE__ */ new Set(), - rootSchema: normalized, - registry: params?.registry ?? globalRegistry2 }; - return convertSchema2(normalized, ctx); -} - -// node_modules/zod/v4/classic/coerce.js -var coerce_exports2 = {}; -__export(coerce_exports2, { - bigint: () => bigint6, - boolean: () => boolean6, - date: () => date8, - number: () => number6, - string: () => string6 -}); -function string6(params) { - return _coercedString2(ZodString2, params); -} -function number6(params) { - return _coercedNumber2(ZodNumber2, params); -} -function boolean6(params) { - return _coercedBoolean2(ZodBoolean2, params); -} -function bigint6(params) { - return _coercedBigint2(ZodBigInt2, params); -} -function date8(params) { - return _coercedDate2(ZodDate2, params); -} - -// node_modules/zod/v4/classic/external.js -config2(en_default2()); - -// src/util.ts -function composeStatusDescription(infraError, tfSummary) { - let description = infraError ? "Build failed - Infra problems" : "Build finished"; - return description + tfSummary; -} -function getSummary(result) { - const parsedResult = external_exports2.object({ - summary: external_exports2.string().min(1) - }).safeParse(result); - return parsedResult.success ? ` - ${parsedResult.data.summary}` : ""; +}; +function lt_default2() { + return { + localeError: error76() + }; } -// src/schema/input.ts -var stringToArraySchema = external_exports2.string().transform((str) => str.split(";")); -var keyValueArrayToObjectSchema = stringToArraySchema.transform((arr) => { - let obj = {}; - arr.forEach((item) => { - const [key, ...values] = item.split("="); - if (key === "" && Array.isArray(values) && values.length === 0) return; - obj[key] = values.join("="); - }); - return external_exports2.record(external_exports2.string(), external_exports2.string()).parse(obj); -}); -var tmtEnvVarsSchema = keyValueArrayToObjectSchema; -var tmtEnvSecretsSchema = keyValueArrayToObjectSchema; -var tmtArtifactsInputSchema = stringToArraySchema.transform((arr) => { - let artifacts = []; - arr.forEach((item) => { - if (item === "") return; - artifacts.push({ type: "fedora-copr-build", id: item }); - }); - return artifacts; -}); -var tmtContextInputSchema = keyValueArrayToObjectSchema; -var tmtArtifactsSchema = external_exports2.array( - external_exports2.object({ - id: external_exports2.string().min(1), - type: external_exports2.string().min(1), - packages: external_exports2.array(external_exports2.string().min(1)).optional(), - install: external_exports2.boolean().optional(), - order: external_exports2.number().optional() - }) -).default([]); -var tmtContextSchema = external_exports2.looseObject({ - distro: external_exports2.string().min(1).optional(), - variant: external_exports2.string().min(1).optional(), - arch: external_exports2.string().min(1).optional(), - component: external_exports2.string().min(1).optional(), - collection: external_exports2.string().min(1).optional(), - module: external_exports2.string().min(1).optional(), - initiator: external_exports2.string().min(1).optional(), - trigger: external_exports2.string().min(1).optional() -}); -var envSettingsSchema = external_exports2.object({ - pipeline: external_exports2.object({ - skip_guest_setup: external_exports2.boolean().optional() - }).optional(), - provisioning: external_exports2.object({ - post_install_script: external_exports2.string().min(1).optional(), - tags: external_exports2.record(external_exports2.string(), external_exports2.string()).optional() - }).optional() -}).optional(); -var pipelineSettingsSchema = external_exports2.object({ - timeout: external_exports2.number().min(1).optional(), - type: external_exports2.enum(["tmt-multihost"]).optional(), - "provision-error-failed-result": external_exports2.boolean().optional(), - "parallel-limit": external_exports2.number().nonnegative().optional() -}).optional(); -var timeoutSchema = external_exports2.coerce.number(); -var tmtPlanRegexSchema = external_exports2.string().min(1); -var tmtPlanFilterSchema = external_exports2.string().min(1); -var tmtPathSchema = external_exports2.string().min(1); - -// src/schema/testing-farm-api.ts -var requestSchema2 = external_exports2.object({ - id: external_exports2.string(), - state: external_exports2.string(), - created: external_exports2.string(), - updated: external_exports2.string() -}); -var requestDetailsSchema = external_exports2.object({ - id: external_exports2.string(), - state: external_exports2.string(), - result: external_exports2.object({ - summary: external_exports2.union([external_exports2.string(), external_exports2.null()]), - overall: external_exports2.string() - }).nullable(), - run_time: external_exports2.number().nullable(), - created: external_exports2.string(), - updated: external_exports2.string() -}); - -// src/action.ts -async function action(pr) { - const tfInstance = getInput("api_url"); - const api = new TestingFarmAPI( - tfInstance, - getInput("api_key", { required: true }) - ); - const tfScope = (await api.whoami()).token.ranch; - const tfUrl = tfScope === "public" ? "https://artifacts.dev.testing-farm.io" : "https://artifacts.osci.redhat.com/testing-farm"; - const tmtEnvVarsParsed = tmtEnvVarsSchema.safeParse(getInput("variables")); - const tmtEnvVars = tmtEnvVarsParsed.success ? tmtEnvVarsParsed.data : {}; - const tmtEnvSecretsParsed = tmtEnvSecretsSchema.safeParse( - getInput("secrets") - ); - const tmtEnvSecrets = tmtEnvSecretsParsed.success ? tmtEnvSecretsParsed.data : {}; - const tmtArtifactsParsed = tmtArtifactsInputSchema.safeParse( - getInput("copr_artifacts") - ); - const tmtArtifacts = tmtArtifactsParsed.success ? tmtArtifactsSchema.parse(tmtArtifactsParsed.data) : []; - const rawTmtHardware = getInput("tmt_hardware"); - let tmtHardware; - if (rawTmtHardware) { - tmtHardware = JSON.parse(rawTmtHardware); - } - const tmtPathParsed = tmtPathSchema.safeParse(getInput("tmt_path")); - const tmtPath = tmtPathParsed.success ? tmtPathParsed.data : "."; - const tmtContextParsed = tmtContextInputSchema.safeParse( - getInput("tmt_context") - ); - const tmtContext = tmtContextParsed.success ? tmtContextSchema.parse(tmtContextParsed.data) : void 0; - const tmtPlanRegexParsed = tmtPlanRegexSchema.safeParse( - getInput("tmt_plan_regex") - ); - const tmtPlanRegex = tmtPlanRegexParsed.success ? { name: tmtPlanRegexParsed.data } : {}; - const tmtPlanFilterParsed = tmtPlanFilterSchema.safeParse( - getInput("tmt_plan_filter") - ); - const tmtPlanFilter = tmtPlanFilterParsed.success ? tmtPlanFilterParsed.data : void 0; - const envSettingsParsed = envSettingsSchema.safeParse( - JSON.parse(getInput("environment_settings")) - ); - const envSettings = envSettingsParsed.success ? envSettingsParsed.data : {}; - const pipelineSettings = pipelineSettingsSchema.parse( - JSON.parse(getInput("pipeline_settings")) - ); - const ref = getInput("git_ref") || "master"; - debug(`Using git_ref: '${ref}'`); - const composeInput = getInput("compose"); - const poolInput = getInput("pool"); - const environment = { - arch: getInput("arch"), - ...poolInput ? { pool: poolInput } : {}, - variables: tmtEnvVars, - settings: envSettings, - secrets: tmtEnvSecrets, - artifacts: tmtArtifacts, - tmt: { - ...tmtContext ? { context: tmtContext } : {} - } +// node_modules/zod/v4/locales/mk.js +var error77 = () => { + const Sizable = { + string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, + set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } }; - if (composeInput) { - environment.os = { - compose: composeInput - }; - } else { - environment.os = null; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const request3 = { - test: { - fmf: { - url: getInput("git_url", { required: true }), - ref, - path: tmtPath, - plan_filter: tmtPlanFilter, - ...tmtPlanRegex - } - }, - environments: [environment], - settings: { - pipeline: pipelineSettings - } + const FormatDictionary = { + regex: "\u0432\u043D\u0435\u0441", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", + url: "URL", + emoji: "\u0435\u043C\u043E\u045F\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", + date: "ISO \u0434\u0430\u0442\u0443\u043C", + time: "ISO \u0432\u0440\u0435\u043C\u0435", + duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", + cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", + cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", + base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", + json_string: "JSON \u043D\u0438\u0437\u0430", + e164: "E.164 \u0431\u0440\u043E\u0458", + jwt: "JWT", + template_literal: "\u0432\u043D\u0435\u0441" }; - let tfResponseRaw; - if (!rawTmtHardware) { - tfResponseRaw = await api.newRequest(request3, false); - } else { - tfResponseRaw = await api.unsafeNewRequest({ - ...request3, - environments: [{ ...request3.environments[0], hardware: tmtHardware }] - }); - } - request3.environments.map( - (env) => delete env.secrets - ); - debug( - `Testing Farm request (except environment[].secrets): ${JSON.stringify( - request3, - null, - 2 - )}` - ); - debug(`Testing Farm response: ${JSON.stringify(tfResponseRaw, null, 2)}`); - const tfResponse = requestSchema2.parse(tfResponseRaw); - const tfArtifactUrl = `${tfUrl}/${tfResponse.id}`; - notice(`Testing Farm logs: ${tfArtifactUrl}`); - debug("Setting outputs and states"); - setOutput("request_id", tfResponse.id); - setOutput("request_url", `${tfInstance}/requests/${tfResponse.id}`); - setOutput("test_log_url", tfArtifactUrl); - setTfRequestId(tfResponse.id); - setTfArtifactUrl(tfArtifactUrl); - pr.isInitialized() && await pr.setStatus("pending", "Build started", `${tfArtifactUrl}`); - const interval = 120 * 1e3; - const parsedTimeout = timeoutSchema.safeParse(getInput("timeout")); - let timeout = parsedTimeout.success ? parsedTimeout.data * 2 : 960; - let tfResult; - debug(`Testing Farm - waiting for results (timeout: ${timeout} minutes)`); - do { - tfResult = requestDetailsSchema.parse( - await api.requestDetails(tfResponse.id, false) - ); - if (tfResult.state !== "running" && tfResult.state !== "new" && tfResult.state !== "pending" && tfResult.state !== "queued") { - break; - } - debug(`Testing Farm - state: '${tfResult.state}'`); - timeout--; - await setTimeout2(interval); - } while (timeout > 0); - if (timeout === 0) { - throw new TFError( - `Testing Farm - timeout reached. The test is still in state: '${tfResult.state}'`, - `${tfArtifactUrl}` - ); - } - debug(`response:'${JSON.stringify(tfResult, null, 2)}'`); - const state = tfResult.state; - const result = tfResult.result ? tfResult.result.overall : "unknown"; - let finalState = "success"; - let infraError = false; - let log = ""; - notice(`State is ${state} and result is: ${result}`); - if (state === "complete") { - if (result !== "passed") { - finalState = "failure"; - } - } else { - infraError = true; - finalState = "failure"; - log = "pipeline.log"; - } - notice(`Final state is: ${finalState}`); - notice(`Infra state is: ${infraError ? "Failed" : "OK"}`); - const summary2 = new Summary2([], { - id: tfResponse.id, - name: getInput("pull_request_status_name"), - runTime: tfResult.run_time || 0, - created: tfResponse.created, - updated: tfResponse.updated, - compose: composeInput || null, - arch: getInput("arch"), - infrastructureFailure: infraError, - status: state, - outcome: result, - results: [ - `test `, - `pipeline` - ] - }); - debug(`Set PR status to ${finalState} with result" ${tfResult.result}`); - pr.isInitialized() && await pr.setStatus( - finalState, - composeStatusDescription(infraError, getSummary(tfResult.result)), - `${tfArtifactUrl}` - ); - if (pr.isInitialized() && getBooleanInput("create_issue_comment")) { - do { - const timeout2 = Math.floor(Math.random() * 1e4); - debug(`set timeout to ${timeout2}`); - await setTimeout2(timeout2); - await pr.metadata.refresh(); - } while (pr.metadata.lock === "true"); - debug(`metadata unlocked`); - await pr.metadata.controller.setMetadata( - pr.number, - "lock", - "true" - ); - summary2.refreshData(pr.metadata.data); - debug(`Publish Comment: ${summary2.data}`); - await pr.publishComment( - `### Testing Farm results -${summary2.getTableSummary()}`, - summary2.data - ); - await pr.metadata.setMetadata(summary2.data, "false"); - } - if (getBooleanInput("create_github_summary")) { - debug(`Creating GitHub Summary`); - await summary2.setJobSummary(); - } - if (finalState === "failure") { - throw new TFError( - composeStatusDescription(infraError, getSummary(tfResult.result)), - `${tfArtifactUrl}` - ); - } -} -var action_default = action; - -// node_modules/@actions/github/lib/context.js -import { readFileSync, existsSync as existsSync2 } from "fs"; -import { EOL as EOL5 } from "os"; -var Context = class { - /** - * Hydrate the context from the environment - */ - constructor() { - var _a5, _b, _c; - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { - if (existsSync2(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); - } else { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${EOL5}`); + const TypeDictionary = { + nan: "NaN", + number: "\u0431\u0440\u043E\u0458", + array: "\u043D\u0438\u0437\u0430" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue4.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; + } + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; } + case "invalid_value": + if (issue4.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive2(issue4.values[0])}`; + return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue4.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; + return `Invalid ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue4.origin}`; + case "invalid_union": + return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; + case "invalid_element": + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue4.origin}`; + default: + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; } - this.eventName = process.env.GITHUB_EVENT_NAME; - this.sha = process.env.GITHUB_SHA; - this.ref = process.env.GITHUB_REF; - this.workflow = process.env.GITHUB_WORKFLOW; - this.action = process.env.GITHUB_ACTION; - this.actor = process.env.GITHUB_ACTOR; - this.job = process.env.GITHUB_JOB; - this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); - this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); - this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a5 = process.env.GITHUB_API_URL) !== null && _a5 !== void 0 ? _a5 : `https://api.github.com`; - this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; - this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; - } - get issue() { - const payload = this.payload; - return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); - } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); - return { owner, repo }; - } - if (this.payload.repository) { - return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name - }; - } - throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); - } + }; }; +function mk_default2() { + return { + localeError: error77() + }; +} -// node_modules/@actions/github/lib/internal/utils.js -var httpClient = __toESM(require_lib(), 1); -var import_undici2 = __toESM(require_undici(), 1); -var __awaiter2 = function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve) { - resolve(value); - }); +// node_modules/zod/v4/locales/ms.js +var error78 = () => { + const Sizable = { + string: { unit: "aksara", verb: "mempunyai" }, + file: { unit: "bait", verb: "mempunyai" }, + array: { unit: "elemen", verb: "mempunyai" }, + set: { unit: "elemen", verb: "mempunyai" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - return new (P || (P = Promise))(function(resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + const FormatDictionary = { + regex: "input", + email: "alamat e-mel", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "tarikh masa ISO", + date: "tarikh ISO", + time: "masa ISO", + duration: "tempoh ISO", + ipv4: "alamat IPv4", + ipv6: "alamat IPv6", + cidrv4: "julat IPv4", + cidrv6: "julat IPv6", + base64: "string dikodkan base64", + base64url: "string dikodkan base64url", + json_string: "string JSON", + e164: "nombor E.164", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "nombor" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Input tidak sah: dijangka instanceof ${issue4.expected}, diterima ${received}`; + } + return `Input tidak sah: dijangka ${expected}, diterima ${received}`; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + case "invalid_value": + if (issue4.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive2(issue4.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Terlalu besar: dijangka ${issue4.origin ?? "nilai"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue4.origin ?? "nilai"} adalah ${adj}${issue4.maximum.toString()}`; } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Terlalu kecil: dijangka ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Terlalu kecil: dijangka ${issue4.origin} adalah ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; + if (_issue.format === "includes") + return `String tidak sah: mesti mengandungi "${_issue.includes}"`; + if (_issue.format === "regex") + return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} tidak sah`; + } + case "not_multiple_of": + return `Nombor tidak sah: perlu gandaan ${issue4.divisor}`; + case "unrecognized_keys": + return `Kunci tidak dikenali: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Kunci tidak sah dalam ${issue4.origin}`; + case "invalid_union": + return "Input tidak sah"; + case "invalid_element": + return `Nilai tidak sah dalam ${issue4.origin}`; + default: + return `Input tidak sah`; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + }; }; -function getProxyAgent(destinationUrl) { - const hc = new httpClient.HttpClient(); - return hc.getAgent(destinationUrl); -} -function getProxyAgentDispatcher(destinationUrl) { - const hc = new httpClient.HttpClient(); - return hc.getAgentDispatcher(destinationUrl); -} -function getProxyFetch(destinationUrl) { - const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url5, opts) => __awaiter2(this, void 0, void 0, function* () { - return (0, import_undici2.fetch)(url5, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); - }); - return proxyFetch; -} -function getApiBaseUrl() { - return process.env["GITHUB_API_URL"] || "https://api.github.com"; +function ms_default2() { + return { + localeError: error78() + }; } -// node_modules/universal-user-agent/index.js -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - if (typeof process === "object" && process.version !== void 0) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - return ""; -} - -// node_modules/before-after-hook/lib/register.js -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - if (!options) { - options = {}; - } - if (Array.isArray(name)) { - return name.reverse().reduce((callback, name2) => { - return register.bind(null, state, name2, callback, options); - }, method)(); - } - return Promise.resolve().then(() => { - if (!state.registry[name]) { - return method(options); - } - return state.registry[name].reduce((method2, registered) => { - return registered.hook.bind(null, method2, options); - }, method)(); - }); -} - -// node_modules/before-after-hook/lib/add.js -function addHook(state, kind, name, hook2) { - const orig = hook2; - if (!state.registry[name]) { - state.registry[name] = []; - } - if (kind === "before") { - hook2 = (method, options) => { - return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options)); - }; - } - if (kind === "after") { - hook2 = (method, options) => { - let result; - return Promise.resolve().then(method.bind(null, options)).then((result_) => { - result = result_; - return orig(result, options); - }).then(() => { - return result; - }); - }; - } - if (kind === "error") { - hook2 = (method, options) => { - return Promise.resolve().then(method.bind(null, options)).catch((error100) => { - return orig(error100, options); - }); - }; - } - state.registry[name].push({ - hook: hook2, - orig - }); -} - -// node_modules/before-after-hook/lib/remove.js -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - const index = state.registry[name].map((registered) => { - return registered.orig; - }).indexOf(method); - if (index === -1) { - return; +// node_modules/zod/v4/locales/nl.js +var error79 = () => { + const Sizable = { + string: { unit: "tekens", verb: "heeft" }, + file: { unit: "bytes", verb: "heeft" }, + array: { unit: "elementen", verb: "heeft" }, + set: { unit: "elementen", verb: "heeft" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - state.registry[name].splice(index, 1); -} - -// node_modules/before-after-hook/index.js -var bind2 = Function.bind; -var bindable = bind2.bind(bind2); -function bindApi(hook2, state, name) { - const removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook2.api = { remove: removeHookRef }; - hook2.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach((kind) => { - const args = name ? [state, kind, name] : [state, kind]; - hook2[kind] = hook2.api[kind] = bindable(addHook, null).apply(null, args); - }); -} -function Singular() { - const singularHookName = /* @__PURE__ */ Symbol("Singular"); - const singularHookState = { - registry: {} + const FormatDictionary = { + regex: "invoer", + email: "emailadres", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum en tijd", + date: "ISO datum", + time: "ISO tijd", + duration: "ISO duur", + ipv4: "IPv4-adres", + ipv6: "IPv6-adres", + cidrv4: "IPv4-bereik", + cidrv6: "IPv6-bereik", + base64: "base64-gecodeerde tekst", + base64url: "base64 URL-gecodeerde tekst", + json_string: "JSON string", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "invoer" }; - const singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; -} -function Collection() { - const state = { - registry: {} + const TypeDictionary = { + nan: "NaN", + number: "getal" }; - const hook2 = register.bind(null, state); - bindApi(hook2, state); - return hook2; -} -var before_after_hook_default = { Singular, Collection }; - -// node_modules/@octokit/endpoint/dist-bundle/index.js -var VERSION3 = "0.0.0-development"; -var userAgent = `octokit-endpoint.js/${VERSION3} ${getUserAgent()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; -function lowercaseKeys(object4) { - if (!object4) { - return {}; - } - return Object.keys(object4).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object4[key]; - return newObj; - }, {}); -} -function isPlainObject4(value) { - if (typeof value !== "object" || value === null) return false; - if (Object.prototype.toString.call(value) !== "[object Object]") return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} -function mergeDeep(defaults3, options) { - const result = Object.assign({}, defaults3); - Object.keys(options).forEach((key) => { - if (isPlainObject4(options[key])) { - if (!(key in defaults3)) Object.assign(result, { [key]: options[key] }); - else result[key] = mergeDeep(defaults3[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} -function merge4(defaults3, route, options) { - if (typeof route === "string") { - let [method, url5] = route.split(" "); - options = Object.assign(url5 ? { method, url: url5 } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults3 || {}, options); - if (options.url === "/graphql") { - if (defaults3 && defaults3.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults3.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} -function addQueryParameters(url5, parameters) { - const separator = /\?/.test(url5) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url5; - } - return url5 + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} -var urlVariableRegex = /\{[^{}}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); -} -function omit3(object4, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object4)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object4[key]; - } - } - return result; -} -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context3, operator, key, modifier) { - var value = context3[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ongeldige invoer: verwacht instanceof ${issue4.expected}, ontving ${received}`; } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); + return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive2(issue4.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + const longName = issue4.origin === "date" ? "laat" : issue4.origin === "string" ? "lang" : "groot"; + if (sizing) + return `Te ${longName}: verwacht dat ${issue4.origin ?? "waarde"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; + return `Te ${longName}: verwacht dat ${issue4.origin ?? "waarde"} ${adj}${issue4.maximum.toString()} is`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + const shortName = issue4.origin === "date" ? "vroeg" : issue4.origin === "string" ? "kort" : "klein"; + if (sizing) { + return `Te ${shortName}: verwacht dat ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} ${sizing.verb}`; } + return `Te ${shortName}: verwacht dat ${issue4.origin} ${adj}${issue4.minimum.toString()} is`; } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; + } + if (_issue.format === "ends_with") + return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; + if (_issue.format === "includes") + return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; + if (_issue.format === "regex") + return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; + return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue4.format}`; } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); + case "not_multiple_of": + return `Ongeldig getal: moet een veelvoud van ${issue4.divisor} zijn`; + case "unrecognized_keys": + return `Onbekende key${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ongeldige key in ${issue4.origin}`; + case "invalid_union": + return "Ongeldige invoer"; + case "invalid_element": + return `Ongeldige waarde in ${issue4.origin}`; + default: + return `Ongeldige invoer`; } - } - return result; -} -function parseUrl(template) { + }; +}; +function nl_default2() { return { - expand: expand.bind(null, template) + localeError: error79() }; } -function expand(template, context3) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal4) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); + +// node_modules/zod/v4/locales/no.js +var error80 = () => { + const Sizable = { + string: { unit: "tegn", verb: "\xE5 ha" }, + file: { unit: "bytes", verb: "\xE5 ha" }, + array: { unit: "elementer", verb: "\xE5 inneholde" }, + set: { unit: "elementer", verb: "\xE5 inneholde" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "input", + email: "e-postadresse", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO dato- og klokkeslett", + date: "ISO-dato", + time: "ISO-klokkeslett", + duration: "ISO-varighet", + ipv4: "IPv4-omr\xE5de", + ipv6: "IPv6-omr\xE5de", + cidrv4: "IPv4-spekter", + cidrv6: "IPv6-spekter", + base64: "base64-enkodet streng", + base64url: "base64url-enkodet streng", + json_string: "JSON-streng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "tall", + array: "liste" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ugyldig input: forventet instanceof ${issue4.expected}, fikk ${received}`; } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); + return `Ugyldig input: forventet ${expected}, fikk ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive2(issue4.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `For stor(t): forventet ${issue4.origin ?? "value"} til \xE5 ha ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue4.origin ?? "value"} til \xE5 ha ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `For lite(n): forventet ${issue4.origin} til \xE5 ha ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - } else { - return encodeReserved(literal4); + return `For lite(n): forventet ${issue4.origin} til \xE5 ha ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; + return `Ugyldig ${FormatDictionary[_issue.format] ?? issue4.format}`; } + case "not_multiple_of": + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ugyldig n\xF8kkel i ${issue4.origin}`; + case "invalid_union": + return "Ugyldig input"; + case "invalid_element": + return `Ugyldig verdi i ${issue4.origin}`; + default: + return `Ugyldig input`; } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } + }; +}; +function no_default2() { + return { + localeError: error80() + }; } -function parse5(options) { - let method = options.method.toUpperCase(); - let url5 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit3(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url5); - url5 = parseUrl(url5).expand(parameters); - if (!/^http/.test(url5)) { - url5 = options.baseUrl + url5; + +// node_modules/zod/v4/locales/ota.js +var error81 = () => { + const Sizable = { + string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, + file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, + array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, + set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit3(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format2) => format2.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url5.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/(? { - const format2 = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format2}`; - }).join(","); + const FormatDictionary = { + regex: "giren", + email: "epostag\xE2h", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO heng\xE2m\u0131", + date: "ISO tarihi", + time: "ISO zaman\u0131", + duration: "ISO m\xFCddeti", + ipv4: "IPv4 ni\u015F\xE2n\u0131", + ipv6: "IPv6 ni\u015F\xE2n\u0131", + cidrv4: "IPv4 menzili", + cidrv6: "IPv6 menzili", + base64: "base64-\u015Fifreli metin", + base64url: "base64url-\u015Fifreli metin", + json_string: "JSON metin", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "giren" + }; + const TypeDictionary = { + nan: "NaN", + number: "numara", + array: "saf", + null: "gayb" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `F\xE2sit giren: umulan instanceof ${issue4.expected}, al\u0131nan ${received}`; + } + return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; } - } - } - if (["GET", "HEAD"].includes(method)) { - url5 = addQueryParameters(url5, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; + case "invalid_value": + if (issue4.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive2(issue4.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Fazla b\xFCy\xFCk: ${issue4.origin ?? "value"}, ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue4.origin ?? "value"}, ${adj}${issue4.maximum.toString()} olmal\u0131yd\u0131.`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Fazla k\xFC\xE7\xFCk: ${issue4.origin}, ${adj}${issue4.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + } + return `Fazla k\xFC\xE7\xFCk: ${issue4.origin}, ${adj}${issue4.minimum.toString()} olmal\u0131yd\u0131.`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; + if (_issue.format === "ends_with") + return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; + if (_issue.format === "includes") + return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; + if (_issue.format === "regex") + return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; + return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue4.format}`; } + case "not_multiple_of": + return `F\xE2sit say\u0131: ${issue4.divisor} kat\u0131 olmal\u0131yd\u0131.`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar ${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} i\xE7in tan\u0131nmayan anahtar var.`; + case "invalid_union": + return "Giren tan\u0131namad\u0131."; + case "invalid_element": + return `${issue4.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + default: + return `K\u0131ymet tan\u0131namad\u0131.`; } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url: url5, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} -function endpointWithDefaults(defaults3, route, options) { - return parse5(merge4(defaults3, route, options)); -} -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS22 = merge4(oldDefaults, newDefaults); - const endpoint22 = endpointWithDefaults.bind(null, DEFAULTS22); - return Object.assign(endpoint22, { - DEFAULTS: DEFAULTS22, - defaults: withDefaults.bind(null, DEFAULTS22), - merge: merge4.bind(null, DEFAULTS22), - parse: parse5 - }); + }; +}; +function ota_default2() { + return { + localeError: error81() + }; } -var endpoint = withDefaults(null, DEFAULTS); - -// node_modules/@octokit/request/dist-bundle/index.js -var import_content_type = __toESM(require_dist(), 1); -// node_modules/json-with-bigint/json-with-bigint.js -var intRegex = /^-?\d+$/; -var noiseValue = /^-?\d+n+$/; -var originalStringify = JSON.stringify; -var originalParse = JSON.parse; -var customFormat = /^-?\d+n$/; -var bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; -var noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; -var JSONStringify = (value, replacer, space) => { - if ("rawJSON" in JSON) { - return originalStringify( - value, - (key, value2) => { - if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString()); - if (typeof replacer === "function") return replacer(key, value2); - if (Array.isArray(replacer) && replacer.includes(key)) return value2; - return value2; - }, - space - ); - } - if (!value) return originalStringify(value, replacer, space); - const convertedToCustomJSON = originalStringify( - value, - (key, value2) => { - const isNoise = typeof value2 === "string" && noiseValue.test(value2); - if (isNoise) return value2.toString() + "n"; - if (typeof value2 === "bigint") return value2.toString() + "n"; - if (typeof replacer === "function") return replacer(key, value2); - if (Array.isArray(replacer) && replacer.includes(key)) return value2; - return value2; - }, - space - ); - const processedJSON = convertedToCustomJSON.replace( - bigIntsStringify, - "$1$2$3" - ); - const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3"); - return denoisedJSON; -}; -var featureCache = /* @__PURE__ */ new Map(); -var isContextSourceSupported = () => { - const parseFingerprint = JSON.parse.toString(); - if (featureCache.has(parseFingerprint)) { - return featureCache.get(parseFingerprint); - } - try { - const result = JSON.parse( - "1", - (_, __, context3) => !!context3?.source && context3.source === "1" - ); - featureCache.set(parseFingerprint, result); - return result; - } catch { - featureCache.set(parseFingerprint, false); - return false; +// node_modules/zod/v4/locales/ps.js +var error82 = () => { + const Sizable = { + string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, + array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, + set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } -}; -var convertMarkedBigIntsReviver = (key, value, context3, userReviver) => { - const isCustomFormatBigInt = typeof value === "string" && customFormat.test(value); - if (isCustomFormatBigInt) return BigInt(value.slice(0, -1)); - const isNoiseValue = typeof value === "string" && noiseValue.test(value); - if (isNoiseValue) return value.slice(0, -1); - if (typeof userReviver !== "function") return value; - return userReviver(key, value, context3); -}; -var JSONParseV2 = (text, reviver) => { - return JSON.parse(text, (key, value, context3) => { - const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER); - const isInt = context3 && intRegex.test(context3.source); - const isBigInt = isBigNumber && isInt; - if (isBigInt) return BigInt(context3.source); - if (typeof reviver !== "function") return value; - return reviver(key, value, context3); - }); -}; -var MAX_INT = Number.MAX_SAFE_INTEGER.toString(); -var MAX_DIGITS = MAX_INT.length; -var stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g; -var noiseValueWithQuotes = /^"-?\d+n+"$/; -var JSONParse = (text, reviver) => { - if (!text) return originalParse(text, reviver); - if (isContextSourceSupported()) return JSONParseV2(text, reviver); - const serializedData = text.replace( - stringsOrLargeNumbers, - (text2, digits, fractional, exponential) => { - const isString2 = text2[0] === '"'; - const isNoise = isString2 && noiseValueWithQuotes.test(text2); - if (isNoise) return text2.substring(0, text2.length - 1) + 'n"'; - const isFractionalOrExponential = fractional || exponential; - const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT); - if (isString2 || isFractionalOrExponential || isLessThanMaxSafeInt) - return text2; - return '"' + text2 + 'n"'; - } - ); - return originalParse( - serializedData, - (key, value, context3) => convertMarkedBigIntsReviver(key, value, context3, reviver) - ); -}; - -// node_modules/@octokit/request-error/dist-src/index.js -var RequestError = class extends Error { - name; - /** - * http status code - */ - status; - /** - * Request options that lead to the error. - */ - request; - /** - * Response object if a response was received - */ - response; - constructor(message2, statusCode, options) { - super(message2, { cause: options.cause }); - this.name = "HttpError"; - this.status = Number.parseInt(statusCode); - if (Number.isNaN(this.status)) { - this.status = 0; - } - if ("response" in options) { - this.response = options.response; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - /(? { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue4.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + } + case "invalid_value": + if (issue4.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive2(issue4.values[0])} \u0648\u0627\u06CC`; + } + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues2(issue4.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue4.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue4.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue4.maximum.toString()} \u0648\u064A`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + } + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue4.origin} \u0628\u0627\u06CC\u062F ${adj}${issue4.minimum.toString()} \u0648\u064A`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; + } + if (_issue.format === "ends_with") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; + } + if (_issue.format === "includes") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; + } + if (_issue.format === "regex") { + return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; + } + return `${FormatDictionary[_issue.format] ?? issue4.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + } + case "not_multiple_of": + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue4.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + case "unrecognized_keys": + return `\u0646\u0627\u0633\u0645 ${issue4.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue4.origin} \u06A9\u06D0`; + case "invalid_union": + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + case "invalid_element": + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue4.origin} \u06A9\u06D0`; + default: + return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; } - requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - } -}; - -// node_modules/@octokit/request/dist-bundle/index.js -var VERSION4 = "10.0.10"; -var defaults_default2 = { - headers: { - "user-agent": `octokit-request.js/${VERSION4} ${getUserAgent()}` - } + }; }; -function isPlainObject5(value) { - if (typeof value !== "object" || value === null) return false; - if (Object.prototype.toString.call(value) !== "[object Object]") return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +function ps_default2() { + return { + localeError: error82() + }; } -var noop2 = () => ""; -async function fetchWrapper(requestOptions) { - const fetch3 = requestOptions.request?.fetch || globalThis.fetch; - if (!fetch3) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); + +// node_modules/zod/v4/locales/pl.js +var error83 = () => { + const Sizable = { + string: { unit: "znak\xF3w", verb: "mie\u0107" }, + file: { unit: "bajt\xF3w", verb: "mie\u0107" }, + array: { unit: "element\xF3w", verb: "mie\u0107" }, + set: { unit: "element\xF3w", verb: "mie\u0107" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - const log = requestOptions.request?.log || console; - const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - const body = isPlainObject5(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body; - const requestHeaders = Object.fromEntries( - Object.entries(requestOptions.headers).map(([name, value]) => [ - name, - String(value) - ]) - ); - let fetchResponse; - try { - fetchResponse = await fetch3(requestOptions.url, { - method: requestOptions.method, - body, - redirect: requestOptions.request?.redirect, - headers: requestHeaders, - signal: requestOptions.request?.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }); - } catch (error100) { - let message2 = "Unknown Error"; - if (error100 instanceof Error) { - if (error100.name === "AbortError") { - error100.status = 500; - throw error100; + const FormatDictionary = { + regex: "wyra\u017Cenie", + email: "adres email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data i godzina w formacie ISO", + date: "data w formacie ISO", + time: "godzina w formacie ISO", + duration: "czas trwania ISO", + ipv4: "adres IPv4", + ipv6: "adres IPv6", + cidrv4: "zakres IPv4", + cidrv6: "zakres IPv6", + base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", + base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", + json_string: "ci\u0105g znak\xF3w w formacie JSON", + e164: "liczba E.164", + jwt: "JWT", + template_literal: "wej\u015Bcie" + }; + const TypeDictionary = { + nan: "NaN", + number: "liczba", + array: "tablica" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue4.expected}, otrzymano ${received}`; + } + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive2(issue4.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + } + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue4.maximum.toString()}`; } - message2 = error100.message; - if (error100.name === "TypeError" && "cause" in error100) { - if (error100.cause instanceof Error) { - message2 = error100.cause.message; - } else if (typeof error100.cause === "string") { - message2 = error100.cause; + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue4.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; } + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue4.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; + if (_issue.format === "regex") + return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; + return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue4.format}`; } + case "not_multiple_of": + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue4.divisor}`; + case "unrecognized_keys": + return `Nierozpoznane klucze${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Nieprawid\u0142owy klucz w ${issue4.origin}`; + case "invalid_union": + return "Nieprawid\u0142owe dane wej\u015Bciowe"; + case "invalid_element": + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue4.origin}`; + default: + return `Nieprawid\u0142owe dane wej\u015Bciowe`; } - const requestError = new RequestError(message2, 500, { - request: requestOptions - }); - requestError.cause = error100; - throw requestError; - } - const status = fetchResponse.status; - const url5 = fetchResponse.url; - const responseHeaders = {}; - for (const [key, value] of fetchResponse.headers) { - responseHeaders[key] = value; - } - const octokitResponse = { - url: url5, - status, - headers: responseHeaders, - data: "" }; - if ("deprecation" in responseHeaders) { - const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return octokitResponse; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return octokitResponse; - } - throw new RequestError(fetchResponse.statusText, status, { - response: octokitResponse, - request: requestOptions - }); - } - if (status === 304) { - octokitResponse.data = await getResponseData(fetchResponse); - throw new RequestError("Not modified", status, { - response: octokitResponse, - request: requestOptions - }); - } - if (status >= 400) { - octokitResponse.data = await getResponseData(fetchResponse); - throw new RequestError(toErrorMessage(octokitResponse.data), status, { - response: octokitResponse, - request: requestOptions - }); - } - octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body; - return octokitResponse; +}; +function pl_default2() { + return { + localeError: error83() + }; } -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (!contentType) { - return response.text().catch(noop2); - } - const mimetype = (0, import_content_type.parse)(contentType); - if (isJSONResponse(mimetype)) { - let text = ""; - try { - text = await response.text(); - return JSONParse(text); - } catch (err) { - return text; - } - } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { - return response.text().catch(noop2); - } else { - return response.arrayBuffer().catch( - /* v8 ignore next -- @preserve */ - () => new ArrayBuffer(0) - ); - } -} -function isJSONResponse(mimetype) { - return mimetype.type === "application/json" || mimetype.type === "application/scim+json"; -} -function toErrorMessage(data) { - if (typeof data === "string") { - return data; - } - if (data instanceof ArrayBuffer) { - return "Unknown error"; - } - if ("message" in data) { - const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; - return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; + +// node_modules/zod/v4/locales/pt.js +var error84 = () => { + const Sizable = { + string: { unit: "caracteres", verb: "ter" }, + file: { unit: "bytes", verb: "ter" }, + array: { unit: "itens", verb: "ter" }, + set: { unit: "itens", verb: "ter" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - return `Unknown error: ${JSON.stringify(data)}`; -} -function withDefaults2(oldEndpoint, newDefaults) { - const endpoint22 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint22.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint22.parse(endpointOptions)); + const FormatDictionary = { + regex: "padr\xE3o", + email: "endere\xE7o de e-mail", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "data e hora ISO", + date: "data ISO", + time: "hora ISO", + duration: "dura\xE7\xE3o ISO", + ipv4: "endere\xE7o IPv4", + ipv6: "endere\xE7o IPv6", + cidrv4: "faixa de IPv4", + cidrv6: "faixa de IPv6", + base64: "texto codificado em base64", + base64url: "URL codificada em base64", + json_string: "texto JSON", + e164: "n\xFAmero E.164", + jwt: "JWT", + template_literal: "entrada" + }; + const TypeDictionary = { + nan: "NaN", + number: "n\xFAmero", + null: "nulo" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Tipo inv\xE1lido: esperado instanceof ${issue4.expected}, recebido ${received}`; + } + return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive2(issue4.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Muito grande: esperado que ${issue4.origin ?? "valor"} tivesse ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue4.origin ?? "valor"} fosse ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Muito pequeno: esperado que ${issue4.origin} tivesse ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Muito pequeno: esperado que ${issue4.origin} fosse ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; + if (_issue.format === "regex") + return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} inv\xE1lido`; + } + case "not_multiple_of": + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue4.divisor}`; + case "unrecognized_keys": + return `Chave${issue4.keys.length > 1 ? "s" : ""} desconhecida${issue4.keys.length > 1 ? "s" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Chave inv\xE1lida em ${issue4.origin}`; + case "invalid_union": + return "Entrada inv\xE1lida"; + case "invalid_element": + return `Valor inv\xE1lido em ${issue4.origin}`; + default: + return `Campo inv\xE1lido`; } - const request22 = (route2, parameters2) => { - return fetchWrapper( - endpoint22.parse(endpoint22.merge(route2, parameters2)) - ); - }; - Object.assign(request22, { - endpoint: endpoint22, - defaults: withDefaults2.bind(null, endpoint22) - }); - return endpointOptions.request.hook(request22, endpointOptions); }; - return Object.assign(newApi, { - endpoint: endpoint22, - defaults: withDefaults2.bind(null, endpoint22) - }); +}; +function pt_default2() { + return { + localeError: error84() + }; } -var request = withDefaults2(endpoint, defaults_default2); -// node_modules/@octokit/graphql/dist-bundle/index.js -var VERSION5 = "0.0.0-development"; -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request22, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request22; - this.headers = headers; - this.response = response; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } - name = "GraphqlResponseError"; - errors; - data; -}; -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType", - "operationName" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request22, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); - } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); - } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - if (!result.variables) { - result.variables = {}; - } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl2 = parsedOptions.baseUrl || request22.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl2)) { - requestOptions.url = baseUrl2.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); +// node_modules/zod/v4/locales/ro.js +var error85 = () => { + const Sizable = { + string: { unit: "caractere", verb: "s\u0103 aib\u0103" }, + file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" }, + array: { unit: "elemente", verb: "s\u0103 aib\u0103" }, + set: { unit: "elemente", verb: "s\u0103 aib\u0103" }, + map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - return request22(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; + const FormatDictionary = { + regex: "intrare", + email: "adres\u0103 de email", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "dat\u0103 \u0219i or\u0103 ISO", + date: "dat\u0103 ISO", + time: "or\u0103 ISO", + duration: "durat\u0103 ISO", + ipv4: "adres\u0103 IPv4", + ipv6: "adres\u0103 IPv6", + mac: "adres\u0103 MAC", + cidrv4: "interval IPv4", + cidrv6: "interval IPv6", + base64: "\u0219ir codat base64", + base64url: "\u0219ir codat base64url", + json_string: "\u0219ir JSON", + e164: "num\u0103r E.164", + jwt: "JWT", + template_literal: "intrare" + }; + const TypeDictionary = { + nan: "NaN", + string: "\u0219ir", + number: "num\u0103r", + boolean: "boolean", + function: "func\u021Bie", + array: "matrice", + object: "obiect", + undefined: "nedefinit", + symbol: "simbol", + bigint: "num\u0103r mare", + void: "void", + never: "never", + map: "hart\u0103", + set: "set" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`; } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); + case "invalid_value": + if (issue4.values.length === 1) + return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive2(issue4.values[0])}`; + return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Prea mare: a\u0219teptat ca ${issue4.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elemente"}`; + return `Prea mare: a\u0219teptat ca ${issue4.origin ?? "valoarea"} s\u0103 fie ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Prea mic: a\u0219teptat ca ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Prea mic: a\u0219teptat ca ${issue4.origin} s\u0103 fie ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`; + return `Format invalid: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue4.divisor}`; + case "unrecognized_keys": + return `Chei nerecunoscute: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Cheie invalid\u0103 \xEEn ${issue4.origin}`; + case "invalid_union": + return "Intrare invalid\u0103"; + case "invalid_element": + return `Valoare invalid\u0103 \xEEn ${issue4.origin}`; + default: + return `Intrare invalid\u0103`; } - return response.data.data; - }); -} -function withDefaults3(request22, newDefaults) { - const newRequest = request22.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); }; - return Object.assign(newApi, { - defaults: withDefaults3.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} -var graphql2 = withDefaults3(request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION5} ${getUserAgent()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults3(customRequest, { - method: "POST", - url: "/graphql" - }); -} - -// node_modules/@octokit/auth-token/dist-bundle/index.js -var b64url = "(?:[a-zA-Z0-9_-]+)"; -var sep = "\\."; -var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`); -var isJWT = jwtRE.test.bind(jwtRE); -async function auth(token) { - const isApp = isJWT(token); - const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_"); - const isUserToServer = token.startsWith("ghu_"); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; +}; +function ro_default() { return { - type: "token", - token, - tokenType + localeError: error85() }; } -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} -async function hook(token, request3, route, parameters) { - const endpoint3 = request3.endpoint.merge( - route, - parameters - ); - endpoint3.headers.authorization = withAuthorizationPrefix(token); - return request3(endpoint3); -} -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; - -// node_modules/@octokit/core/dist-src/version.js -var VERSION6 = "7.0.6"; -// node_modules/@octokit/core/dist-src/index.js -var noop3 = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -function createLogger(logger = {}) { - if (typeof logger.debug !== "function") { - logger.debug = noop3; - } - if (typeof logger.info !== "function") { - logger.info = noop3; +// node_modules/zod/v4/locales/ru.js +function getRussianPlural2(count, one, few, many) { + const absCount = Math.abs(count); + const lastDigit = absCount % 10; + const lastTwoDigits = absCount % 100; + if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { + return many; } - if (typeof logger.warn !== "function") { - logger.warn = consoleWarn; + if (lastDigit === 1) { + return one; } - if (typeof logger.error !== "function") { - logger.error = consoleError; + if (lastDigit >= 2 && lastDigit <= 4) { + return few; } - return logger; + return many; } -var userAgentTrail = `octokit-core.js/${VERSION6} ${getUserAgent()}`; -var Octokit = class { - static VERSION = VERSION6; - static defaults(defaults3) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults3 === "function") { - super(defaults3(options)); - return; +var error86 = () => { + const Sizable = { + string: { + unit: { + one: "\u0441\u0438\u043C\u0432\u043E\u043B", + few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", + many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + file: { + unit: { + one: "\u0431\u0430\u0439\u0442", + few: "\u0431\u0430\u0439\u0442\u0430", + many: "\u0431\u0430\u0439\u0442" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + array: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + }, + set: { + unit: { + one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", + few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", + many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" + }, + verb: "\u0438\u043C\u0435\u0442\u044C" + } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0432\u0432\u043E\u0434", + email: "email \u0430\u0434\u0440\u0435\u0441", + url: "URL", + emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", + date: "ISO \u0434\u0430\u0442\u0430", + time: "ISO \u0432\u0440\u0435\u043C\u044F", + duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", + ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", + ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", + cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", + base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", + base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", + json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", + jwt: "JWT", + template_literal: "\u0432\u0432\u043E\u0434" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0441\u0438\u0432" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue4.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; } - super( - Object.assign( - {}, - defaults3, - options, - options.userAgent && defaults3.userAgent ? { - userAgent: `${options.userAgent} ${defaults3.userAgent}` - } : null - ) - ); + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; } - }; - return OctokitWithDefaults; - } - static plugins = []; - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); - }; - return NewOctokit; - } - constructor(options = {}) { - const hook2 = new before_after_hook_default.Collection(); - const requestDefaults = { - baseUrl: request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook2.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" + case "invalid_value": + if (issue4.values.length === 1) + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive2(issue4.values[0])}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const maxValue = Number(issue4.maximum); + const unit = getRussianPlural2(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue4.maximum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue4.maximum.toString()}`; } - }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + const minValue = Number(issue4.minimum); + const unit = getRussianPlural2(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue4.minimum.toString()} ${unit}`; + } + return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue4.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; + if (_issue.format === "ends_with") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; + if (_issue.format === "regex") + return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue4.divisor}`; + case "unrecognized_keys": + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue4.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u0438" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue4.origin}`; + case "invalid_union": + return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; + case "invalid_element": + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue4.origin}`; + default: + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; + }; +}; +function ru_default2() { + return { + localeError: error86() + }; +} + +// node_modules/zod/v4/locales/sl.js +var error87 = () => { + const Sizable = { + string: { unit: "znakov", verb: "imeti" }, + file: { unit: "bajtov", verb: "imeti" }, + array: { unit: "elementov", verb: "imeti" }, + set: { unit: "elementov", verb: "imeti" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "vnos", + email: "e-po\u0161tni naslov", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO datum in \u010Das", + date: "ISO datum", + time: "ISO \u010Das", + duration: "ISO trajanje", + ipv4: "IPv4 naslov", + ipv6: "IPv6 naslov", + cidrv4: "obseg IPv4", + cidrv6: "obseg IPv6", + base64: "base64 kodiran niz", + base64url: "base64url kodiran niz", + json_string: "JSON niz", + e164: "E.164 \u0161tevilka", + jwt: "JWT", + template_literal: "vnos" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0161tevilo", + array: "tabela" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue4.expected}, prejeto ${received}`; + } + return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive2(issue4.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Preveliko: pri\u010Dakovano, da bo ${issue4.origin ?? "vrednost"} imelo ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue4.origin ?? "vrednost"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `Premajhno: pri\u010Dakovano, da bo ${issue4.origin} imelo ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `Premajhno: pri\u010Dakovano, da bo ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; + if (_issue.format === "regex") + return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; + return `Neveljaven ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue4.divisor}`; + case "unrecognized_keys": + return `Neprepoznan${issue4.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Neveljaven klju\u010D v ${issue4.origin}`; + case "invalid_union": + return "Neveljaven vnos"; + case "invalid_element": + return `Neveljavna vrednost v ${issue4.origin}`; + default: + return "Neveljaven vnos"; } - this.request = request.defaults(requestDefaults); - this.graphql = withCustomRequest(this.request).defaults(requestDefaults); - this.log = createLogger(options.log); - this.hook = hook2; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - const auth2 = createTokenAuth(options.auth); - hook2.wrap("request", auth2.hook); - this.auth = auth2; + }; +}; +function sl_default2() { + return { + localeError: error87() + }; +} + +// node_modules/zod/v4/locales/sv.js +var error88 = () => { + const Sizable = { + string: { unit: "tecken", verb: "att ha" }, + file: { unit: "bytes", verb: "att ha" }, + array: { unit: "objekt", verb: "att inneh\xE5lla" }, + set: { unit: "objekt", verb: "att inneh\xE5lla" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "regulj\xE4rt uttryck", + email: "e-postadress", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO-datum och tid", + date: "ISO-datum", + time: "ISO-tid", + duration: "ISO-varaktighet", + ipv4: "IPv4-intervall", + ipv6: "IPv6-intervall", + cidrv4: "IPv4-spektrum", + cidrv6: "IPv6-spektrum", + base64: "base64-kodad str\xE4ng", + base64url: "base64url-kodad str\xE4ng", + json_string: "JSON-str\xE4ng", + e164: "E.164-nummer", + jwt: "JWT", + template_literal: "mall-literal" + }; + const TypeDictionary = { + nan: "NaN", + number: "antal", + array: "lista" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue4.expected}, fick ${received}`; + } + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; } - } else { - const { authStrategy, ...otherOptions } = options; - const auth2 = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook2.wrap("request", auth2.hook); - this.auth = auth2; + case "invalid_value": + if (issue4.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive2(issue4.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "element"}`; + } + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + } + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue4.origin ?? "v\xE4rdet"} att ha ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; + if (_issue.format === "includes") + return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; + if (_issue.format === "regex") + return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; + return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue4.divisor}`; + case "unrecognized_keys": + return `${issue4.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `Ogiltig nyckel i ${issue4.origin ?? "v\xE4rdet"}`; + case "invalid_union": + return "Ogiltig input"; + case "invalid_element": + return `Ogiltigt v\xE4rde i ${issue4.origin ?? "v\xE4rdet"}`; + default: + return `Ogiltig input`; } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); + }; +}; +function sv_default2() { + return { + localeError: error88() + }; +} + +// node_modules/zod/v4/locales/ta.js +var error89 = () => { + const Sizable = { + string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, + set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", + email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", + time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", + duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", + ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", + cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", + base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", + json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", + e164: "E.164 \u0B8E\u0BA3\u0BCD", + jwt: "JWT", + template_literal: "input" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0B8E\u0BA3\u0BCD", + array: "\u0B85\u0BA3\u0BBF", + null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue4.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive2(issue4.values[0])}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues2(issue4.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue4.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue4.origin} ${adj}${issue4.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "ends_with") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "includes") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + if (_issue.format === "regex") + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue4.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + case "unrecognized_keys": + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue4.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + case "invalid_union": + return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; + case "invalid_element": + return `${issue4.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + default: + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; } + }; +}; +function ta_default2() { + return { + localeError: error89() + }; +} + +// node_modules/zod/v4/locales/th.js +var error90 = () => { + const Sizable = { + string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, + set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; } - // assigned during constructor - request; - graphql; - log; - hook; - // TODO: type `octokit.auth` based on passed options.authStrategy - auth; + const FormatDictionary = { + regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", + email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", + url: "URL", + emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", + time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", + ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", + ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", + cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", + cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", + base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", + base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", + json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", + e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", + jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", + template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" + }; + const TypeDictionary = { + nan: "NaN", + number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", + array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", + null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue4.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive2(issue4.values[0])}`; + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue4.origin); + if (sizing) { + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.minimum.toString()} ${sizing.unit}`; + } + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue4.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; + } + if (_issue.format === "ends_with") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; + if (_issue.format === "includes") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; + if (_issue.format === "regex") + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue4.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + case "unrecognized_keys": + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue4.origin}`; + case "invalid_union": + return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; + case "invalid_element": + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue4.origin}`; + default: + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + } + }; }; +function th_default2() { + return { + localeError: error90() + }; +} -// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js -var VERSION7 = "17.0.0"; +// node_modules/zod/v4/locales/tr.js +var error91 = () => { + const Sizable = { + string: { unit: "karakter", verb: "olmal\u0131" }, + file: { unit: "bayt", verb: "olmal\u0131" }, + array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, + set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } + }; + function getSizing(origin2) { + return Sizable[origin2] ?? null; + } + const FormatDictionary = { + regex: "girdi", + email: "e-posta adresi", + url: "URL", + emoji: "emoji", + uuid: "UUID", + uuidv4: "UUIDv4", + uuidv6: "UUIDv6", + nanoid: "nanoid", + guid: "GUID", + cuid: "cuid", + cuid2: "cuid2", + ulid: "ULID", + xid: "XID", + ksuid: "KSUID", + datetime: "ISO tarih ve saat", + date: "ISO tarih", + time: "ISO saat", + duration: "ISO s\xFCre", + ipv4: "IPv4 adresi", + ipv6: "IPv6 adresi", + cidrv4: "IPv4 aral\u0131\u011F\u0131", + cidrv6: "IPv6 aral\u0131\u011F\u0131", + base64: "base64 ile \u015Fifrelenmi\u015F metin", + base64url: "base64url ile \u015Fifrelenmi\u015F metin", + json_string: "JSON dizesi", + e164: "E.164 say\u0131s\u0131", + jwt: "JWT", + template_literal: "\u015Eablon dizesi" + }; + const TypeDictionary = { + nan: "NaN" + }; + return (issue4) => { + switch (issue4.code) { + case "invalid_type": { + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); + const received = TypeDictionary[receivedType] ?? receivedType; + if (/^[A-Z]/.test(issue4.expected)) { + return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue4.expected}, al\u0131nan ${received}`; + } + return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; + } + case "invalid_value": + if (issue4.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive2(issue4.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues2(issue4.values, "|")}`; + case "too_big": { + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ok b\xFCy\xFCk: beklenen ${issue4.origin ?? "de\u011Fer"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue4.origin ?? "de\u011Fer"} ${adj}${issue4.maximum.toString()}`; + } + case "too_small": { + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue4.origin} ${adj}${issue4.minimum.toString()}`; + } + case "invalid_format": { + const _issue = issue4; + if (_issue.format === "starts_with") + return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; + if (_issue.format === "ends_with") + return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; + if (_issue.format === "includes") + return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; + if (_issue.format === "regex") + return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; + return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue4.format}`; + } + case "not_multiple_of": + return `Ge\xE7ersiz say\u0131: ${issue4.divisor} ile tam b\xF6l\xFCnebilmeli`; + case "unrecognized_keys": + return `Tan\u0131nmayan anahtar${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue4.keys, ", ")}`; + case "invalid_key": + return `${issue4.origin} i\xE7inde ge\xE7ersiz anahtar`; + case "invalid_union": + return "Ge\xE7ersiz de\u011Fer"; + case "invalid_element": + return `${issue4.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + default: + return `Ge\xE7ersiz de\u011Fer`; + } + }; +}; +function tr_default2() { + return { + localeError: error91() + }; +} -// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js -var Endpoints = { - actions: { - addCustomLabelsToSelfHostedRunnerForOrg: [ - "POST /orgs/{org}/actions/runners/{runner_id}/labels" - ], - addCustomLabelsToSelfHostedRunnerForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - addRepoAccessToSelfHostedRunnerGroupInOrg: [ - "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}" - ], - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" - ], - addSelectedRepoToOrgVariable: [ - "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" - ], - approveWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" - ], - cancelWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" - ], - createEnvironmentVariable: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/variables" - ], - createHostedRunnerForOrg: ["POST /orgs/{org}/actions/hosted-runners"], - createOrUpdateEnvironmentSecret: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" - ], - createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" - ], - createOrgVariable: ["POST /orgs/{org}/actions/variables"], - createRegistrationTokenForOrg: [ - "POST /orgs/{org}/actions/runners/registration-token" - ], - createRegistrationTokenForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/registration-token" - ], - createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], - createRemoveTokenForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/remove-token" - ], - createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], - createWorkflowDispatch: [ - "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" - ], - deleteActionsCacheById: [ - "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" - ], - deleteActionsCacheByKey: [ - "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" - ], - deleteArtifact: [ - "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" - ], - deleteCustomImageFromOrg: [ - "DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}" - ], - deleteCustomImageVersionFromOrg: [ - "DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}" - ], - deleteEnvironmentSecret: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" - ], - deleteEnvironmentVariable: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" - ], - deleteHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], - deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" - ], - deleteRepoVariable: [ - "DELETE /repos/{owner}/{repo}/actions/variables/{name}" - ], - deleteSelfHostedRunnerFromOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}" - ], - deleteSelfHostedRunnerFromRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" - ], - deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], - deleteWorkflowRunLogs: [ - "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" - ], - disableSelectedRepositoryGithubActionsOrganization: [ - "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" - ], - disableWorkflow: [ - "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" - ], - downloadArtifact: [ - "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" - ], - downloadJobLogsForWorkflowRun: [ - "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" - ], - downloadWorkflowRunAttemptLogs: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" - ], - downloadWorkflowRunLogs: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" - ], - enableSelectedRepositoryGithubActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" - ], - enableWorkflow: [ - "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" - ], - forceCancelWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" - ], - generateRunnerJitconfigForOrg: [ - "POST /orgs/{org}/actions/runners/generate-jitconfig" - ], - generateRunnerJitconfigForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" - ], - getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], - getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], - getActionsCacheUsageByRepoForOrg: [ - "GET /orgs/{org}/actions/cache/usage-by-repository" - ], - getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], - getAllowedActionsOrganization: [ - "GET /orgs/{org}/actions/permissions/selected-actions" - ], - getAllowedActionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" - ], - getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], - getCustomImageForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}" - ], - getCustomImageVersionForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}" - ], - getCustomOidcSubClaimForRepo: [ - "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - getEnvironmentPublicKey: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key" - ], - getEnvironmentSecret: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" - ], - getEnvironmentVariable: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" - ], - getGithubActionsDefaultWorkflowPermissionsOrganization: [ - "GET /orgs/{org}/actions/permissions/workflow" - ], - getGithubActionsDefaultWorkflowPermissionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/workflow" - ], - getGithubActionsPermissionsOrganization: [ - "GET /orgs/{org}/actions/permissions" - ], - getGithubActionsPermissionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions" - ], - getHostedRunnerForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" - ], - getHostedRunnersGithubOwnedImagesForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/github-owned" - ], - getHostedRunnersLimitsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/limits" - ], - getHostedRunnersMachineSpecsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/machine-sizes" - ], - getHostedRunnersPartnerImagesForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/partner" - ], - getHostedRunnersPlatformsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/platforms" - ], - getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], - getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], - getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], - getPendingDeploymentsForRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" - ], - getRepoPermissions: [ - "GET /repos/{owner}/{repo}/actions/permissions", - {}, - { renamed: ["actions", "getGithubActionsPermissionsRepository"] } - ], - getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], - getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], - getReviewsForRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" - ], - getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], - getSelfHostedRunnerForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" - ], - getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], - getWorkflowAccessToRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/access" - ], - getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], - getWorkflowRunAttempt: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" - ], - getWorkflowRunUsage: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" - ], - getWorkflowUsage: [ - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" - ], - listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], - listCustomImageVersionsForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions" - ], - listCustomImagesForOrg: [ - "GET /orgs/{org}/actions/hosted-runners/images/custom" - ], - listEnvironmentSecrets: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets" - ], - listEnvironmentVariables: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/variables" - ], - listGithubHostedRunnersInGroupForOrg: [ - "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners" - ], - listHostedRunnersForOrg: ["GET /orgs/{org}/actions/hosted-runners"], - listJobsForWorkflowRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" - ], - listJobsForWorkflowRunAttempt: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" - ], - listLabelsForSelfHostedRunnerForOrg: [ - "GET /orgs/{org}/actions/runners/{runner_id}/labels" - ], - listLabelsForSelfHostedRunnerForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], - listOrgVariables: ["GET /orgs/{org}/actions/variables"], - listRepoOrganizationSecrets: [ - "GET /repos/{owner}/{repo}/actions/organization-secrets" - ], - listRepoOrganizationVariables: [ - "GET /repos/{owner}/{repo}/actions/organization-variables" - ], - listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], - listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], - listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], - listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], - listRunnerApplicationsForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/downloads" - ], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" - ], - listSelectedReposForOrgVariable: [ - "GET /orgs/{org}/actions/variables/{name}/repositories" - ], - listSelectedRepositoriesEnabledGithubActionsOrganization: [ - "GET /orgs/{org}/actions/permissions/repositories" - ], - listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], - listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], - listWorkflowRunArtifacts: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" - ], - listWorkflowRuns: [ - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" - ], - listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], - reRunJobForWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" - ], - reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], - reRunWorkflowFailedJobs: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" - ], - removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" - ], - removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - removeCustomLabelFromSelfHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" - ], - removeCustomLabelFromSelfHostedRunnerForRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" - ], - removeSelectedRepoFromOrgVariable: [ - "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" - ], - reviewCustomGatesForRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" - ], - reviewPendingDeploymentsForRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" - ], - setAllowedActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/selected-actions" - ], - setAllowedActionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" - ], - setCustomLabelsForSelfHostedRunnerForOrg: [ - "PUT /orgs/{org}/actions/runners/{runner_id}/labels" - ], - setCustomLabelsForSelfHostedRunnerForRepo: [ - "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - setCustomOidcSubClaimForRepo: [ - "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - setGithubActionsDefaultWorkflowPermissionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/workflow" - ], - setGithubActionsDefaultWorkflowPermissionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/workflow" - ], - setGithubActionsPermissionsOrganization: [ - "PUT /orgs/{org}/actions/permissions" - ], - setGithubActionsPermissionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" - ], - setSelectedReposForOrgVariable: [ - "PUT /orgs/{org}/actions/variables/{name}/repositories" - ], - setSelectedRepositoriesEnabledGithubActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/repositories" - ], - setWorkflowAccessToRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/access" - ], - updateEnvironmentVariable: [ - "PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" - ], - updateHostedRunnerForOrg: [ - "PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" - ], - updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], - updateRepoVariable: [ - "PATCH /repos/{owner}/{repo}/actions/variables/{name}" - ] - }, - activity: { - checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], - deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], - deleteThreadSubscription: [ - "DELETE /notifications/threads/{thread_id}/subscription" - ], - getFeeds: ["GET /feeds"], - getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], - getThread: ["GET /notifications/threads/{thread_id}"], - getThreadSubscriptionForAuthenticatedUser: [ - "GET /notifications/threads/{thread_id}/subscription" - ], - listEventsForAuthenticatedUser: ["GET /users/{username}/events"], - listNotificationsForAuthenticatedUser: ["GET /notifications"], - listOrgEventsForAuthenticatedUser: [ - "GET /users/{username}/events/orgs/{org}" - ], - listPublicEvents: ["GET /events"], - listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], - listPublicEventsForUser: ["GET /users/{username}/events/public"], - listPublicOrgEvents: ["GET /orgs/{org}/events"], - listReceivedEventsForUser: ["GET /users/{username}/received_events"], - listReceivedPublicEventsForUser: [ - "GET /users/{username}/received_events/public" - ], - listRepoEvents: ["GET /repos/{owner}/{repo}/events"], - listRepoNotificationsForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/notifications" - ], - listReposStarredByAuthenticatedUser: ["GET /user/starred"], - listReposStarredByUser: ["GET /users/{username}/starred"], - listReposWatchedByUser: ["GET /users/{username}/subscriptions"], - listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], - listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], - listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], - markNotificationsAsRead: ["PUT /notifications"], - markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], - markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], - markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], - setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], - setThreadSubscription: [ - "PUT /notifications/threads/{thread_id}/subscription" - ], - starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], - unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] - }, - apps: { - addRepoToInstallation: [ - "PUT /user/installations/{installation_id}/repositories/{repository_id}", - {}, - { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } - ], - addRepoToInstallationForAuthenticatedUser: [ - "PUT /user/installations/{installation_id}/repositories/{repository_id}" - ], - checkToken: ["POST /applications/{client_id}/token"], - createFromManifest: ["POST /app-manifests/{code}/conversions"], - createInstallationAccessToken: [ - "POST /app/installations/{installation_id}/access_tokens" - ], - deleteAuthorization: ["DELETE /applications/{client_id}/grant"], - deleteInstallation: ["DELETE /app/installations/{installation_id}"], - deleteToken: ["DELETE /applications/{client_id}/token"], - getAuthenticated: ["GET /app"], - getBySlug: ["GET /apps/{app_slug}"], - getInstallation: ["GET /app/installations/{installation_id}"], - getOrgInstallation: ["GET /orgs/{org}/installation"], - getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], - getSubscriptionPlanForAccount: [ - "GET /marketplace_listing/accounts/{account_id}" - ], - getSubscriptionPlanForAccountStubbed: [ - "GET /marketplace_listing/stubbed/accounts/{account_id}" - ], - getUserInstallation: ["GET /users/{username}/installation"], - getWebhookConfigForApp: ["GET /app/hook/config"], - getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], - listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], - listAccountsForPlanStubbed: [ - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" - ], - listInstallationReposForAuthenticatedUser: [ - "GET /user/installations/{installation_id}/repositories" - ], - listInstallationRequestsForAuthenticatedApp: [ - "GET /app/installation-requests" - ], - listInstallations: ["GET /app/installations"], - listInstallationsForAuthenticatedUser: ["GET /user/installations"], - listPlans: ["GET /marketplace_listing/plans"], - listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], - listReposAccessibleToInstallation: ["GET /installation/repositories"], - listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], - listSubscriptionsForAuthenticatedUserStubbed: [ - "GET /user/marketplace_purchases/stubbed" - ], - listWebhookDeliveries: ["GET /app/hook/deliveries"], - redeliverWebhookDelivery: [ - "POST /app/hook/deliveries/{delivery_id}/attempts" - ], - removeRepoFromInstallation: [ - "DELETE /user/installations/{installation_id}/repositories/{repository_id}", - {}, - { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } - ], - removeRepoFromInstallationForAuthenticatedUser: [ - "DELETE /user/installations/{installation_id}/repositories/{repository_id}" - ], - resetToken: ["PATCH /applications/{client_id}/token"], - revokeInstallationAccessToken: ["DELETE /installation/token"], - scopeToken: ["POST /applications/{client_id}/token/scoped"], - suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], - unsuspendInstallation: [ - "DELETE /app/installations/{installation_id}/suspended" - ], - updateWebhookConfigForApp: ["PATCH /app/hook/config"] - }, - billing: { - getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], - getGithubActionsBillingUser: [ - "GET /users/{username}/settings/billing/actions" - ], - getGithubBillingPremiumRequestUsageReportOrg: [ - "GET /organizations/{org}/settings/billing/premium_request/usage" - ], - getGithubBillingPremiumRequestUsageReportUser: [ - "GET /users/{username}/settings/billing/premium_request/usage" - ], - getGithubBillingUsageReportOrg: [ - "GET /organizations/{org}/settings/billing/usage" - ], - getGithubBillingUsageReportUser: [ - "GET /users/{username}/settings/billing/usage" - ], - getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], - getGithubPackagesBillingUser: [ - "GET /users/{username}/settings/billing/packages" - ], - getSharedStorageBillingOrg: [ - "GET /orgs/{org}/settings/billing/shared-storage" - ], - getSharedStorageBillingUser: [ - "GET /users/{username}/settings/billing/shared-storage" - ] - }, - campaigns: { - createCampaign: ["POST /orgs/{org}/campaigns"], - deleteCampaign: ["DELETE /orgs/{org}/campaigns/{campaign_number}"], - getCampaignSummary: ["GET /orgs/{org}/campaigns/{campaign_number}"], - listOrgCampaigns: ["GET /orgs/{org}/campaigns"], - updateCampaign: ["PATCH /orgs/{org}/campaigns/{campaign_number}"] - }, - checks: { - create: ["POST /repos/{owner}/{repo}/check-runs"], - createSuite: ["POST /repos/{owner}/{repo}/check-suites"], - get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], - getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], - listAnnotations: [ - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" - ], - listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], - listForSuite: [ - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" - ], - listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], - rerequestRun: [ - "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" - ], - rerequestSuite: [ - "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" - ], - setSuitesPreferences: [ - "PATCH /repos/{owner}/{repo}/check-suites/preferences" - ], - update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] - }, - codeScanning: { - commitAutofix: [ - "POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits" - ], - createAutofix: [ - "POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix" - ], - createVariantAnalysis: [ - "POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses" - ], - deleteAnalysis: [ - "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" - ], - deleteCodeqlDatabase: [ - "DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" - ], - getAlert: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", - {}, - { renamedParameters: { alert_id: "alert_number" } } - ], - getAnalysis: [ - "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" - ], - getAutofix: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix" - ], - getCodeqlDatabase: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" - ], - getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], - getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], - getVariantAnalysis: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}" - ], - getVariantAnalysisRepoTask: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}" - ], - listAlertInstances: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" - ], - listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], - listAlertsInstances: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - {}, - { renamed: ["codeScanning", "listAlertInstances"] } - ], - listCodeqlDatabases: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" - ], - listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" - ], - updateDefaultSetup: [ - "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" - ], - uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] - }, - codeSecurity: { - attachConfiguration: [ - "POST /orgs/{org}/code-security/configurations/{configuration_id}/attach" - ], - attachEnterpriseConfiguration: [ - "POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach" - ], - createConfiguration: ["POST /orgs/{org}/code-security/configurations"], - createConfigurationForEnterprise: [ - "POST /enterprises/{enterprise}/code-security/configurations" - ], - deleteConfiguration: [ - "DELETE /orgs/{org}/code-security/configurations/{configuration_id}" - ], - deleteConfigurationForEnterprise: [ - "DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}" - ], - detachConfiguration: [ - "DELETE /orgs/{org}/code-security/configurations/detach" - ], - getConfiguration: [ - "GET /orgs/{org}/code-security/configurations/{configuration_id}" - ], - getConfigurationForRepository: [ - "GET /repos/{owner}/{repo}/code-security-configuration" - ], - getConfigurationsForEnterprise: [ - "GET /enterprises/{enterprise}/code-security/configurations" - ], - getConfigurationsForOrg: ["GET /orgs/{org}/code-security/configurations"], - getDefaultConfigurations: [ - "GET /orgs/{org}/code-security/configurations/defaults" - ], - getDefaultConfigurationsForEnterprise: [ - "GET /enterprises/{enterprise}/code-security/configurations/defaults" - ], - getRepositoriesForConfiguration: [ - "GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories" - ], - getRepositoriesForEnterpriseConfiguration: [ - "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories" - ], - getSingleConfigurationForEnterprise: [ - "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}" - ], - setConfigurationAsDefault: [ - "PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults" - ], - setConfigurationAsDefaultForEnterprise: [ - "PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults" - ], - updateConfiguration: [ - "PATCH /orgs/{org}/code-security/configurations/{configuration_id}" - ], - updateEnterpriseConfiguration: [ - "PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}" - ] - }, - codesOfConduct: { - getAllCodesOfConduct: ["GET /codes_of_conduct"], - getConductCode: ["GET /codes_of_conduct/{key}"] - }, - codespaces: { - addRepositoryForSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - checkPermissionsForDevcontainer: [ - "GET /repos/{owner}/{repo}/codespaces/permissions_check" - ], - codespaceMachinesForAuthenticatedUser: [ - "GET /user/codespaces/{codespace_name}/machines" - ], - createForAuthenticatedUser: ["POST /user/codespaces"], - createOrUpdateOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}" - ], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - createOrUpdateSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}" - ], - createWithPrForAuthenticatedUser: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" - ], - createWithRepoForAuthenticatedUser: [ - "POST /repos/{owner}/{repo}/codespaces" - ], - deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], - deleteFromOrganization: [ - "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - deleteSecretForAuthenticatedUser: [ - "DELETE /user/codespaces/secrets/{secret_name}" - ], - exportForAuthenticatedUser: [ - "POST /user/codespaces/{codespace_name}/exports" - ], - getCodespacesForUserInOrg: [ - "GET /orgs/{org}/members/{username}/codespaces" - ], - getExportDetailsForAuthenticatedUser: [ - "GET /user/codespaces/{codespace_name}/exports/{export_id}" - ], - getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], - getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], - getPublicKeyForAuthenticatedUser: [ - "GET /user/codespaces/secrets/public-key" - ], - getRepoPublicKey: [ - "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" - ], - getRepoSecret: [ - "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - getSecretForAuthenticatedUser: [ - "GET /user/codespaces/secrets/{secret_name}" - ], - listDevcontainersInRepositoryForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/devcontainers" - ], - listForAuthenticatedUser: ["GET /user/codespaces"], - listInOrganization: [ - "GET /orgs/{org}/codespaces", - {}, - { renamedParameters: { org_id: "org" } } - ], - listInRepositoryForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces" - ], - listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], - listRepositoriesForSecretForAuthenticatedUser: [ - "GET /user/codespaces/secrets/{secret_name}/repositories" - ], - listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" - ], - preFlightWithRepoForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/new" - ], - publishForAuthenticatedUser: [ - "POST /user/codespaces/{codespace_name}/publish" - ], - removeRepositoryForSecretForAuthenticatedUser: [ - "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - repoMachinesForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/machines" - ], - setRepositoriesForSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}/repositories" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" - ], - startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], - stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], - stopInOrganization: [ - "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" - ], - updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] - }, - copilot: { - addCopilotSeatsForTeams: [ - "POST /orgs/{org}/copilot/billing/selected_teams" - ], - addCopilotSeatsForUsers: [ - "POST /orgs/{org}/copilot/billing/selected_users" - ], - cancelCopilotSeatAssignmentForTeams: [ - "DELETE /orgs/{org}/copilot/billing/selected_teams" - ], - cancelCopilotSeatAssignmentForUsers: [ - "DELETE /orgs/{org}/copilot/billing/selected_users" - ], - copilotMetricsForOrganization: ["GET /orgs/{org}/copilot/metrics"], - copilotMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/metrics"], - getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], - getCopilotSeatDetailsForUser: [ - "GET /orgs/{org}/members/{username}/copilot" - ], - listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] - }, - credentials: { revoke: ["POST /credentials/revoke"] }, - dependabot: { - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" - ], - createOrUpdateOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}" - ], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], - getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], - getRepoPublicKey: [ - "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" - ], - getRepoSecret: [ - "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - listAlertsForEnterprise: [ - "GET /enterprises/{enterprise}/dependabot/alerts" - ], - listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], - listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" - ], - repositoryAccessForOrg: [ - "GET /organizations/{org}/dependabot/repository-access" - ], - setRepositoryAccessDefaultLevel: [ - "PUT /organizations/{org}/dependabot/repository-access/default-level" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" - ], - updateRepositoryAccessForOrg: [ - "PATCH /organizations/{org}/dependabot/repository-access" - ] - }, - dependencyGraph: { - createRepositorySnapshot: [ - "POST /repos/{owner}/{repo}/dependency-graph/snapshots" - ], - diffRange: [ - "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" - ], - exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] - }, - emojis: { get: ["GET /emojis"] }, - enterpriseTeamMemberships: { - add: [ - "PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" - ], - bulkAdd: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add" - ], - bulkRemove: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove" - ], - get: [ - "GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" - ], - list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"], - remove: [ - "DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" - ] - }, - enterpriseTeamOrganizations: { - add: [ - "PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" - ], - bulkAdd: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add" - ], - bulkRemove: [ - "POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove" - ], - delete: [ - "DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" - ], - getAssignment: [ - "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" - ], - getAssignments: [ - "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations" - ] - }, - enterpriseTeams: { - create: ["POST /enterprises/{enterprise}/teams"], - delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"], - get: ["GET /enterprises/{enterprise}/teams/{team_slug}"], - list: ["GET /enterprises/{enterprise}/teams"], - update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"] - }, - gists: { - checkIsStarred: ["GET /gists/{gist_id}/star"], - create: ["POST /gists"], - createComment: ["POST /gists/{gist_id}/comments"], - delete: ["DELETE /gists/{gist_id}"], - deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], - fork: ["POST /gists/{gist_id}/forks"], - get: ["GET /gists/{gist_id}"], - getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], - getRevision: ["GET /gists/{gist_id}/{sha}"], - list: ["GET /gists"], - listComments: ["GET /gists/{gist_id}/comments"], - listCommits: ["GET /gists/{gist_id}/commits"], - listForUser: ["GET /users/{username}/gists"], - listForks: ["GET /gists/{gist_id}/forks"], - listPublic: ["GET /gists/public"], - listStarred: ["GET /gists/starred"], - star: ["PUT /gists/{gist_id}/star"], - unstar: ["DELETE /gists/{gist_id}/star"], - update: ["PATCH /gists/{gist_id}"], - updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] - }, - git: { - createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], - createCommit: ["POST /repos/{owner}/{repo}/git/commits"], - createRef: ["POST /repos/{owner}/{repo}/git/refs"], - createTag: ["POST /repos/{owner}/{repo}/git/tags"], - createTree: ["POST /repos/{owner}/{repo}/git/trees"], - deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], - getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], - getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], - getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], - getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], - getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], - listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], - updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] - }, - gitignore: { - getAllTemplates: ["GET /gitignore/templates"], - getTemplate: ["GET /gitignore/templates/{name}"] - }, - hostedCompute: { - createNetworkConfigurationForOrg: [ - "POST /orgs/{org}/settings/network-configurations" - ], - deleteNetworkConfigurationFromOrg: [ - "DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}" - ], - getNetworkConfigurationForOrg: [ - "GET /orgs/{org}/settings/network-configurations/{network_configuration_id}" - ], - getNetworkSettingsForOrg: [ - "GET /orgs/{org}/settings/network-settings/{network_settings_id}" - ], - listNetworkConfigurationsForOrg: [ - "GET /orgs/{org}/settings/network-configurations" - ], - updateNetworkConfigurationForOrg: [ - "PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}" - ] - }, - interactions: { - getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], - getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], - getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], - getRestrictionsForYourPublicRepos: [ - "GET /user/interaction-limits", - {}, - { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } - ], - removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], - removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], - removeRestrictionsForRepo: [ - "DELETE /repos/{owner}/{repo}/interaction-limits" - ], - removeRestrictionsForYourPublicRepos: [ - "DELETE /user/interaction-limits", - {}, - { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } - ], - setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], - setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], - setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], - setRestrictionsForYourPublicRepos: [ - "PUT /user/interaction-limits", - {}, - { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } - ] - }, - issues: { - addAssignees: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" - ], - addBlockedByDependency: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by" - ], - addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], - addSubIssue: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues" - ], - checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], - checkUserCanBeAssignedToIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" - ], - create: ["POST /repos/{owner}/{repo}/issues"], - createComment: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" - ], - createLabel: ["POST /repos/{owner}/{repo}/labels"], - createMilestone: ["POST /repos/{owner}/{repo}/milestones"], - deleteComment: [ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" - ], - deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], - deleteMilestone: [ - "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" - ], - get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], - getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], - getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], - getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], - getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], - getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"], - list: ["GET /issues"], - listAssignees: ["GET /repos/{owner}/{repo}/assignees"], - listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], - listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], - listDependenciesBlockedBy: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by" - ], - listDependenciesBlocking: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking" - ], - listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], - listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], - listEventsForTimeline: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" - ], - listForAuthenticatedUser: ["GET /user/issues"], - listForOrg: ["GET /orgs/{org}/issues"], - listForRepo: ["GET /repos/{owner}/{repo}/issues"], - listLabelsForMilestone: [ - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" - ], - listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], - listLabelsOnIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" - ], - listMilestones: ["GET /repos/{owner}/{repo}/milestones"], - listSubIssues: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues" - ], - lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], - removeAllLabels: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" - ], - removeAssignees: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" - ], - removeDependencyBlockedBy: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}" - ], - removeLabel: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" - ], - removeSubIssue: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue" - ], - reprioritizeSubIssue: [ - "PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority" - ], - setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], - unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], - update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], - updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], - updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], - updateMilestone: [ - "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" - ] - }, - licenses: { - get: ["GET /licenses/{license}"], - getAllCommonlyUsed: ["GET /licenses"], - getForRepo: ["GET /repos/{owner}/{repo}/license"] - }, - markdown: { - render: ["POST /markdown"], - renderRaw: [ - "POST /markdown/raw", - { headers: { "content-type": "text/plain; charset=utf-8" } } - ] - }, - meta: { - get: ["GET /meta"], - getAllVersions: ["GET /versions"], - getOctocat: ["GET /octocat"], - getZen: ["GET /zen"], - root: ["GET /"] - }, - migrations: { - deleteArchiveForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/archive" - ], - deleteArchiveForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/archive" - ], - downloadArchiveForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}/archive" - ], - getArchiveForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}/archive" - ], - getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], - getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], - listForAuthenticatedUser: ["GET /user/migrations"], - listForOrg: ["GET /orgs/{org}/migrations"], - listReposForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}/repositories" - ], - listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], - listReposForUser: [ - "GET /user/migrations/{migration_id}/repositories", - {}, - { renamed: ["migrations", "listReposForAuthenticatedUser"] } - ], - startForAuthenticatedUser: ["POST /user/migrations"], - startForOrg: ["POST /orgs/{org}/migrations"], - unlockRepoForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" - ], - unlockRepoForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" - ] - }, - oidc: { - getOidcCustomSubTemplateForOrg: [ - "GET /orgs/{org}/actions/oidc/customization/sub" - ], - updateOidcCustomSubTemplateForOrg: [ - "PUT /orgs/{org}/actions/oidc/customization/sub" - ] - }, - orgs: { - addSecurityManagerTeam: [ - "PUT /orgs/{org}/security-managers/teams/{team_slug}", - {}, - { - deprecated: "octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team" - } - ], - assignTeamToOrgRole: [ - "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" - ], - assignUserToOrgRole: [ - "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" - ], - blockUser: ["PUT /orgs/{org}/blocks/{username}"], - cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], - checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], - checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], - checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], - convertMemberToOutsideCollaborator: [ - "PUT /orgs/{org}/outside_collaborators/{username}" - ], - createArtifactStorageRecord: [ - "POST /orgs/{org}/artifacts/metadata/storage-record" - ], - createInvitation: ["POST /orgs/{org}/invitations"], - createIssueType: ["POST /orgs/{org}/issue-types"], - createWebhook: ["POST /orgs/{org}/hooks"], - customPropertiesForOrgsCreateOrUpdateOrganizationValues: [ - "PATCH /organizations/{org}/org-properties/values" - ], - customPropertiesForOrgsGetOrganizationValues: [ - "GET /organizations/{org}/org-properties/values" - ], - customPropertiesForReposCreateOrUpdateOrganizationDefinition: [ - "PUT /orgs/{org}/properties/schema/{custom_property_name}" - ], - customPropertiesForReposCreateOrUpdateOrganizationDefinitions: [ - "PATCH /orgs/{org}/properties/schema" - ], - customPropertiesForReposCreateOrUpdateOrganizationValues: [ - "PATCH /orgs/{org}/properties/values" - ], - customPropertiesForReposDeleteOrganizationDefinition: [ - "DELETE /orgs/{org}/properties/schema/{custom_property_name}" - ], - customPropertiesForReposGetOrganizationDefinition: [ - "GET /orgs/{org}/properties/schema/{custom_property_name}" - ], - customPropertiesForReposGetOrganizationDefinitions: [ - "GET /orgs/{org}/properties/schema" - ], - customPropertiesForReposGetOrganizationValues: [ - "GET /orgs/{org}/properties/values" - ], - delete: ["DELETE /orgs/{org}"], - deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"], - deleteAttestationsById: [ - "DELETE /orgs/{org}/attestations/{attestation_id}" - ], - deleteAttestationsBySubjectDigest: [ - "DELETE /orgs/{org}/attestations/digest/{subject_digest}" - ], - deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"], - deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], - disableSelectedRepositoryImmutableReleasesOrganization: [ - "DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}" - ], - enableSelectedRepositoryImmutableReleasesOrganization: [ - "PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}" - ], - get: ["GET /orgs/{org}"], - getImmutableReleasesSettings: [ - "GET /orgs/{org}/settings/immutable-releases" - ], - getImmutableReleasesSettingsRepositories: [ - "GET /orgs/{org}/settings/immutable-releases/repositories" - ], - getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], - getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], - getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], - getOrgRulesetHistory: ["GET /orgs/{org}/rulesets/{ruleset_id}/history"], - getOrgRulesetVersion: [ - "GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}" - ], - getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], - getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], - getWebhookDelivery: [ - "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" - ], - list: ["GET /organizations"], - listAppInstallations: ["GET /orgs/{org}/installations"], - listArtifactStorageRecords: [ - "GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records" - ], - listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"], - listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"], - listAttestationsBulk: [ - "POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}" - ], - listBlockedUsers: ["GET /orgs/{org}/blocks"], - listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], - listForAuthenticatedUser: ["GET /user/orgs"], - listForUser: ["GET /users/{username}/orgs"], - listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], - listIssueTypes: ["GET /orgs/{org}/issue-types"], - listMembers: ["GET /orgs/{org}/members"], - listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], - listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], - listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], - listOrgRoles: ["GET /orgs/{org}/organization-roles"], - listOrganizationFineGrainedPermissions: [ - "GET /orgs/{org}/organization-fine-grained-permissions" - ], - listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], - listPatGrantRepositories: [ - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" - ], - listPatGrantRequestRepositories: [ - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" - ], - listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], - listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], - listPendingInvitations: ["GET /orgs/{org}/invitations"], - listPublicMembers: ["GET /orgs/{org}/public_members"], - listSecurityManagerTeams: [ - "GET /orgs/{org}/security-managers", - {}, - { - deprecated: "octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams" - } - ], - listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], - listWebhooks: ["GET /orgs/{org}/hooks"], - pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeMember: ["DELETE /orgs/{org}/members/{username}"], - removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], - removeOutsideCollaborator: [ - "DELETE /orgs/{org}/outside_collaborators/{username}" - ], - removePublicMembershipForAuthenticatedUser: [ - "DELETE /orgs/{org}/public_members/{username}" - ], - removeSecurityManagerTeam: [ - "DELETE /orgs/{org}/security-managers/teams/{team_slug}", - {}, - { - deprecated: "octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team" - } - ], - reviewPatGrantRequest: [ - "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" - ], - reviewPatGrantRequestsInBulk: [ - "POST /orgs/{org}/personal-access-token-requests" - ], - revokeAllOrgRolesTeam: [ - "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" - ], - revokeAllOrgRolesUser: [ - "DELETE /orgs/{org}/organization-roles/users/{username}" - ], - revokeOrgRoleTeam: [ - "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" - ], - revokeOrgRoleUser: [ - "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" - ], - setImmutableReleasesSettings: [ - "PUT /orgs/{org}/settings/immutable-releases" - ], - setImmutableReleasesSettingsRepositories: [ - "PUT /orgs/{org}/settings/immutable-releases/repositories" - ], - setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: [ - "PUT /orgs/{org}/public_members/{username}" - ], - unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], - update: ["PATCH /orgs/{org}"], - updateIssueType: ["PUT /orgs/{org}/issue-types/{issue_type_id}"], - updateMembershipForAuthenticatedUser: [ - "PATCH /user/memberships/orgs/{org}" - ], - updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], - updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], - updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], - updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] - }, - packages: { - deletePackageForAuthenticatedUser: [ - "DELETE /user/packages/{package_type}/{package_name}" - ], - deletePackageForOrg: [ - "DELETE /orgs/{org}/packages/{package_type}/{package_name}" - ], - deletePackageForUser: [ - "DELETE /users/{username}/packages/{package_type}/{package_name}" - ], - deletePackageVersionForAuthenticatedUser: [ - "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - deletePackageVersionForOrg: [ - "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - deletePackageVersionForUser: [ - "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getAllPackageVersionsForAPackageOwnedByAnOrg: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - {}, - { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } - ], - getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions", - {}, - { - renamed: [ - "packages", - "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" - ] - } - ], - getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions" - ], - getAllPackageVersionsForPackageOwnedByOrg: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" - ], - getAllPackageVersionsForPackageOwnedByUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}/versions" - ], - getPackageForAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}" - ], - getPackageForOrganization: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}" - ], - getPackageForUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}" - ], - getPackageVersionForAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getPackageVersionForOrganization: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getPackageVersionForUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - listDockerMigrationConflictingPackagesForAuthenticatedUser: [ - "GET /user/docker/conflicts" - ], - listDockerMigrationConflictingPackagesForOrganization: [ - "GET /orgs/{org}/docker/conflicts" - ], - listDockerMigrationConflictingPackagesForUser: [ - "GET /users/{username}/docker/conflicts" - ], - listPackagesForAuthenticatedUser: ["GET /user/packages"], - listPackagesForOrganization: ["GET /orgs/{org}/packages"], - listPackagesForUser: ["GET /users/{username}/packages"], - restorePackageForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageForUser: [ - "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageVersionForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ], - restorePackageVersionForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ], - restorePackageVersionForUser: [ - "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ] - }, - privateRegistries: { - createOrgPrivateRegistry: ["POST /orgs/{org}/private-registries"], - deleteOrgPrivateRegistry: [ - "DELETE /orgs/{org}/private-registries/{secret_name}" - ], - getOrgPrivateRegistry: ["GET /orgs/{org}/private-registries/{secret_name}"], - getOrgPublicKey: ["GET /orgs/{org}/private-registries/public-key"], - listOrgPrivateRegistries: ["GET /orgs/{org}/private-registries"], - updateOrgPrivateRegistry: [ - "PATCH /orgs/{org}/private-registries/{secret_name}" - ] - }, - projects: { - addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"], - addItemForUser: [ - "POST /users/{username}/projectsV2/{project_number}/items" - ], - deleteItemForOrg: [ - "DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}" - ], - deleteItemForUser: [ - "DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}" - ], - getFieldForOrg: [ - "GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}" - ], - getFieldForUser: [ - "GET /users/{username}/projectsV2/{project_number}/fields/{field_id}" - ], - getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"], - getForUser: ["GET /users/{username}/projectsV2/{project_number}"], - getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"], - getUserItem: [ - "GET /users/{username}/projectsV2/{project_number}/items/{item_id}" - ], - listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"], - listFieldsForUser: [ - "GET /users/{username}/projectsV2/{project_number}/fields" - ], - listForOrg: ["GET /orgs/{org}/projectsV2"], - listForUser: ["GET /users/{username}/projectsV2"], - listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"], - listItemsForUser: [ - "GET /users/{username}/projectsV2/{project_number}/items" - ], - updateItemForOrg: [ - "PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}" - ], - updateItemForUser: [ - "PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}" - ] - }, - pulls: { - checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - create: ["POST /repos/{owner}/{repo}/pulls"], - createReplyForReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" - ], - createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - createReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" - ], - deletePendingReview: [ - "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - deleteReviewComment: [ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" - ], - dismissReview: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" - ], - get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], - getReview: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - list: ["GET /repos/{owner}/{repo}/pulls"], - listCommentsForReview: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" - ], - listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], - listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], - listRequestedReviewers: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - listReviewComments: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" - ], - listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], - listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - removeRequestedReviewers: [ - "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - requestReviewers: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - submitReview: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" - ], - update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], - updateBranch: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" - ], - updateReview: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - updateReviewComment: [ - "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" - ] - }, - rateLimit: { get: ["GET /rate_limit"] }, - reactions: { - createForCommitComment: [ - "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" - ], - createForIssue: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" - ], - createForIssueComment: [ - "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" - ], - createForPullRequestReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" - ], - createForRelease: [ - "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" - ], - createForTeamDiscussionCommentInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" - ], - createForTeamDiscussionInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" - ], - deleteForCommitComment: [ - "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForIssue: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" - ], - deleteForIssueComment: [ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForPullRequestComment: [ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForRelease: [ - "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" - ], - deleteForTeamDiscussion: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" - ], - deleteForTeamDiscussionComment: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" - ], - listForCommitComment: [ - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" - ], - listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], - listForIssueComment: [ - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" - ], - listForPullRequestReviewComment: [ - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" - ], - listForRelease: [ - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" - ], - listForTeamDiscussionCommentInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" - ], - listForTeamDiscussionInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" - ] - }, - repos: { - acceptInvitation: [ - "PATCH /user/repository_invitations/{invitation_id}", - {}, - { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } - ], - acceptInvitationForAuthenticatedUser: [ - "PATCH /user/repository_invitations/{invitation_id}" - ], - addAppAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], - addStatusCheckContexts: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - addTeamAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - addUserAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - cancelPagesDeployment: [ - "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" - ], - checkAutomatedSecurityFixes: [ - "GET /repos/{owner}/{repo}/automated-security-fixes" - ], - checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], - checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"], - checkPrivateVulnerabilityReporting: [ - "GET /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - checkVulnerabilityAlerts: [ - "GET /repos/{owner}/{repo}/vulnerability-alerts" - ], - codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], - compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], - compareCommitsWithBasehead: [ - "GET /repos/{owner}/{repo}/compare/{basehead}" - ], - createAttestation: ["POST /repos/{owner}/{repo}/attestations"], - createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], - createCommitComment: [ - "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" - ], - createCommitSignatureProtection: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], - createDeployKey: ["POST /repos/{owner}/{repo}/keys"], - createDeployment: ["POST /repos/{owner}/{repo}/deployments"], - createDeploymentBranchPolicy: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" - ], - createDeploymentProtectionRule: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" - ], - createDeploymentStatus: [ - "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" - ], - createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], - createForAuthenticatedUser: ["POST /user/repos"], - createFork: ["POST /repos/{owner}/{repo}/forks"], - createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateEnvironment: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}" - ], - createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createOrgRuleset: ["POST /orgs/{org}/rulesets"], - createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], - createPagesSite: ["POST /repos/{owner}/{repo}/pages"], - createRelease: ["POST /repos/{owner}/{repo}/releases"], - createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], - createUsingTemplate: [ - "POST /repos/{template_owner}/{template_repo}/generate" - ], - createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - customPropertiesForReposCreateOrUpdateRepositoryValues: [ - "PATCH /repos/{owner}/{repo}/properties/values" - ], - customPropertiesForReposGetRepositoryValues: [ - "GET /repos/{owner}/{repo}/properties/values" - ], - declineInvitation: [ - "DELETE /user/repository_invitations/{invitation_id}", - {}, - { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } - ], - declineInvitationForAuthenticatedUser: [ - "DELETE /user/repository_invitations/{invitation_id}" - ], - delete: ["DELETE /repos/{owner}/{repo}"], - deleteAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" - ], - deleteAdminBranchProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - deleteAnEnvironment: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}" - ], - deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], - deleteBranchProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" - ], - deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], - deleteCommitSignatureProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], - deleteDeployment: [ - "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" - ], - deleteDeploymentBranchPolicy: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], - deleteInvitation: [ - "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" - ], - deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], - deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], - deletePullRequestReviewProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], - deleteReleaseAsset: [ - "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" - ], - deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], - disableAutomatedSecurityFixes: [ - "DELETE /repos/{owner}/{repo}/automated-security-fixes" - ], - disableDeploymentProtectionRule: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" - ], - disableImmutableReleases: [ - "DELETE /repos/{owner}/{repo}/immutable-releases" - ], - disablePrivateVulnerabilityReporting: [ - "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - disableVulnerabilityAlerts: [ - "DELETE /repos/{owner}/{repo}/vulnerability-alerts" - ], - downloadArchive: [ - "GET /repos/{owner}/{repo}/zipball/{ref}", - {}, - { renamed: ["repos", "downloadZipballArchive"] } - ], - downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], - downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], - enableAutomatedSecurityFixes: [ - "PUT /repos/{owner}/{repo}/automated-security-fixes" - ], - enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"], - enablePrivateVulnerabilityReporting: [ - "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - enableVulnerabilityAlerts: [ - "PUT /repos/{owner}/{repo}/vulnerability-alerts" - ], - generateReleaseNotes: [ - "POST /repos/{owner}/{repo}/releases/generate-notes" - ], - get: ["GET /repos/{owner}/{repo}"], - getAccessRestrictions: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" - ], - getAdminBranchProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - getAllDeploymentProtectionRules: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" - ], - getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], - getAllStatusCheckContexts: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" - ], - getAllTopics: ["GET /repos/{owner}/{repo}/topics"], - getAppsWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" - ], - getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], - getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], - getBranchProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection" - ], - getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], - getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], - getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], - getCollaboratorPermissionLevel: [ - "GET /repos/{owner}/{repo}/collaborators/{username}/permission" - ], - getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], - getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], - getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], - getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], - getCommitSignatureProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], - getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], - getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], - getCustomDeploymentProtectionRule: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" - ], - getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], - getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], - getDeploymentBranchPolicy: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - getDeploymentStatus: [ - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" - ], - getEnvironment: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}" - ], - getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], - getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], - getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], - getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], - getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], - getOrgRulesets: ["GET /orgs/{org}/rulesets"], - getPages: ["GET /repos/{owner}/{repo}/pages"], - getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], - getPagesDeployment: [ - "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" - ], - getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], - getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], - getPullRequestReviewProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], - getReadme: ["GET /repos/{owner}/{repo}/readme"], - getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], - getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], - getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], - getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], - getRepoRuleSuite: [ - "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" - ], - getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], - getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - getRepoRulesetHistory: [ - "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history" - ], - getRepoRulesetVersion: [ - "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}" - ], - getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], - getStatusChecksProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - getTeamsWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" - ], - getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], - getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], - getUsersWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" - ], - getViews: ["GET /repos/{owner}/{repo}/traffic/views"], - getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], - getWebhookConfigForRepo: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" - ], - getWebhookDelivery: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" - ], - listActivities: ["GET /repos/{owner}/{repo}/activity"], - listAttestations: [ - "GET /repos/{owner}/{repo}/attestations/{subject_digest}" - ], - listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], - listBranches: ["GET /repos/{owner}/{repo}/branches"], - listBranchesForHeadCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" - ], - listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], - listCommentsForCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" - ], - listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], - listCommitStatusesForRef: [ - "GET /repos/{owner}/{repo}/commits/{ref}/statuses" - ], - listCommits: ["GET /repos/{owner}/{repo}/commits"], - listContributors: ["GET /repos/{owner}/{repo}/contributors"], - listCustomDeploymentRuleIntegrations: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" - ], - listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], - listDeploymentBranchPolicies: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" - ], - listDeploymentStatuses: [ - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" - ], - listDeployments: ["GET /repos/{owner}/{repo}/deployments"], - listForAuthenticatedUser: ["GET /user/repos"], - listForOrg: ["GET /orgs/{org}/repos"], - listForUser: ["GET /users/{username}/repos"], - listForks: ["GET /repos/{owner}/{repo}/forks"], - listInvitations: ["GET /repos/{owner}/{repo}/invitations"], - listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], - listLanguages: ["GET /repos/{owner}/{repo}/languages"], - listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], - listPublic: ["GET /repositories"], - listPullRequestsAssociatedWithCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" - ], - listReleaseAssets: [ - "GET /repos/{owner}/{repo}/releases/{release_id}/assets" - ], - listReleases: ["GET /repos/{owner}/{repo}/releases"], - listTags: ["GET /repos/{owner}/{repo}/tags"], - listTeams: ["GET /repos/{owner}/{repo}/teams"], - listWebhookDeliveries: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" - ], - listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], - merge: ["POST /repos/{owner}/{repo}/merges"], - mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], - pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeAppAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - removeCollaborator: [ - "DELETE /repos/{owner}/{repo}/collaborators/{username}" - ], - removeStatusCheckContexts: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - removeStatusCheckProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - removeTeamAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - removeUserAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], - requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], - setAdminBranchProtection: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - setAppAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - setStatusCheckContexts: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - setTeamAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - setUserAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], - transfer: ["POST /repos/{owner}/{repo}/transfer"], - update: ["PATCH /repos/{owner}/{repo}"], - updateBranchProtection: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection" - ], - updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], - updateDeploymentBranchPolicy: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], - updateInvitation: [ - "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" - ], - updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], - updatePullRequestReviewProtection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], - updateReleaseAsset: [ - "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" - ], - updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - updateStatusCheckPotection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", - {}, - { renamed: ["repos", "updateStatusCheckProtection"] } - ], - updateStatusCheckProtection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], - updateWebhookConfigForRepo: [ - "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" - ], - uploadReleaseAsset: [ - "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", - { baseUrl: "https://uploads.github.com" } - ] - }, - search: { - code: ["GET /search/code"], - commits: ["GET /search/commits"], - issuesAndPullRequests: ["GET /search/issues"], - labels: ["GET /search/labels"], - repos: ["GET /search/repositories"], - topics: ["GET /search/topics"], - users: ["GET /search/users"] - }, - secretScanning: { - createPushProtectionBypass: [ - "POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses" - ], - getAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ], - getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"], - listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], - listLocationsForAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" - ], - listOrgPatternConfigs: [ - "GET /orgs/{org}/secret-scanning/pattern-configurations" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ], - updateOrgPatternConfigs: [ - "PATCH /orgs/{org}/secret-scanning/pattern-configurations" - ] - }, - securityAdvisories: { - createFork: [ - "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" - ], - createPrivateVulnerabilityReport: [ - "POST /repos/{owner}/{repo}/security-advisories/reports" - ], - createRepositoryAdvisory: [ - "POST /repos/{owner}/{repo}/security-advisories" - ], - createRepositoryAdvisoryCveRequest: [ - "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" - ], - getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], - getRepositoryAdvisory: [ - "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" - ], - listGlobalAdvisories: ["GET /advisories"], - listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], - listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], - updateRepositoryAdvisory: [ - "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" - ] - }, - teams: { - addOrUpdateMembershipForUserInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - addOrUpdateRepoPermissionsInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - checkPermissionsForRepoInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - create: ["POST /orgs/{org}/teams"], - createDiscussionCommentInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" - ], - createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], - deleteDiscussionCommentInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - deleteDiscussionInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], - getByName: ["GET /orgs/{org}/teams/{team_slug}"], - getDiscussionCommentInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - getDiscussionInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - getMembershipForUserInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - list: ["GET /orgs/{org}/teams"], - listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], - listDiscussionCommentsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" - ], - listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], - listForAuthenticatedUser: ["GET /user/teams"], - listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], - listPendingInvitationsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/invitations" - ], - listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - removeRepoInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - updateDiscussionCommentInOrg: [ - "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - updateDiscussionInOrg: [ - "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] - }, - users: { - addEmailForAuthenticated: [ - "POST /user/emails", - {}, - { renamed: ["users", "addEmailForAuthenticatedUser"] } - ], - addEmailForAuthenticatedUser: ["POST /user/emails"], - addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], - block: ["PUT /user/blocks/{username}"], - checkBlocked: ["GET /user/blocks/{username}"], - checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], - checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: [ - "POST /user/gpg_keys", - {}, - { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } - ], - createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: [ - "POST /user/keys", - {}, - { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } - ], - createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], - createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], - deleteAttestationsBulk: [ - "POST /users/{username}/attestations/delete-request" - ], - deleteAttestationsById: [ - "DELETE /users/{username}/attestations/{attestation_id}" - ], - deleteAttestationsBySubjectDigest: [ - "DELETE /users/{username}/attestations/digest/{subject_digest}" - ], - deleteEmailForAuthenticated: [ - "DELETE /user/emails", - {}, - { renamed: ["users", "deleteEmailForAuthenticatedUser"] } - ], - deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: [ - "DELETE /user/gpg_keys/{gpg_key_id}", - {}, - { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } - ], - deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: [ - "DELETE /user/keys/{key_id}", - {}, - { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } - ], - deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], - deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], - deleteSshSigningKeyForAuthenticatedUser: [ - "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" - ], - follow: ["PUT /user/following/{username}"], - getAuthenticated: ["GET /user"], - getById: ["GET /user/{account_id}"], - getByUsername: ["GET /users/{username}"], - getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: [ - "GET /user/gpg_keys/{gpg_key_id}", - {}, - { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } - ], - getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: [ - "GET /user/keys/{key_id}", - {}, - { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } - ], - getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], - getSshSigningKeyForAuthenticatedUser: [ - "GET /user/ssh_signing_keys/{ssh_signing_key_id}" - ], - list: ["GET /users"], - listAttestations: ["GET /users/{username}/attestations/{subject_digest}"], - listAttestationsBulk: [ - "POST /users/{username}/attestations/bulk-list{?per_page,before,after}" - ], - listBlockedByAuthenticated: [ - "GET /user/blocks", - {}, - { renamed: ["users", "listBlockedByAuthenticatedUser"] } - ], - listBlockedByAuthenticatedUser: ["GET /user/blocks"], - listEmailsForAuthenticated: [ - "GET /user/emails", - {}, - { renamed: ["users", "listEmailsForAuthenticatedUser"] } - ], - listEmailsForAuthenticatedUser: ["GET /user/emails"], - listFollowedByAuthenticated: [ - "GET /user/following", - {}, - { renamed: ["users", "listFollowedByAuthenticatedUser"] } - ], - listFollowedByAuthenticatedUser: ["GET /user/following"], - listFollowersForAuthenticatedUser: ["GET /user/followers"], - listFollowersForUser: ["GET /users/{username}/followers"], - listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: [ - "GET /user/gpg_keys", - {}, - { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } - ], - listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], - listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: [ - "GET /user/public_emails", - {}, - { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } - ], - listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], - listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: [ - "GET /user/keys", - {}, - { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } - ], - listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], - listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], - listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], - listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], - listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], - setPrimaryEmailVisibilityForAuthenticated: [ - "PATCH /user/email/visibility", - {}, - { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } - ], - setPrimaryEmailVisibilityForAuthenticatedUser: [ - "PATCH /user/email/visibility" - ], - unblock: ["DELETE /user/blocks/{username}"], - unfollow: ["DELETE /user/following/{username}"], - updateAuthenticated: ["PATCH /user"] - } -}; -var endpoints_default = Endpoints; - -// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js -var endpointMethodsMap = /* @__PURE__ */ new Map(); -for (const [scope, endpoints] of Object.entries(endpoints_default)) { - for (const [methodName, endpoint3] of Object.entries(endpoints)) { - const [route, defaults3, decorations] = endpoint3; - const [method, url5] = route.split(/ /); - const endpointDefaults = Object.assign( - { - method, - url: url5 - }, - defaults3 - ); - if (!endpointMethodsMap.has(scope)) { - endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); - } - endpointMethodsMap.get(scope).set(methodName, { - scope, - methodName, - endpointDefaults, - decorations - }); - } -} -var handler = { - has({ scope }, methodName) { - return endpointMethodsMap.get(scope).has(methodName); - }, - getOwnPropertyDescriptor(target, methodName) { - return { - value: this.get(target, methodName), - // ensures method is in the cache - configurable: true, - writable: true, - enumerable: true - }; - }, - defineProperty(target, methodName, descriptor) { - Object.defineProperty(target.cache, methodName, descriptor); - return true; - }, - deleteProperty(target, methodName) { - delete target.cache[methodName]; - return true; - }, - ownKeys({ scope }) { - return [...endpointMethodsMap.get(scope).keys()]; - }, - set(target, methodName, value) { - return target.cache[methodName] = value; - }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; - } - const method = endpointMethodsMap.get(scope).get(methodName); - if (!method) { - return void 0; - } - const { endpointDefaults, decorations } = method; - if (decorations) { - cache[methodName] = decorate( - octokit, - scope, - methodName, - endpointDefaults, - decorations - ); - } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); - } - return cache[methodName]; - } -}; -function endpointsToMethods(octokit) { - const newMethods = {}; - for (const scope of endpointMethodsMap.keys()) { - newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); - } - return newMethods; -} -function decorate(octokit, scope, methodName, defaults3, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults3); - function withDecorations(...args) { - let options = requestWithDefaults.endpoint.merge(...args); - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: void 0 - }); - return requestWithDefaults(options); - } - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn( - `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` - ); - } - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); - } - if (decorations.renamedParameters) { - const options2 = requestWithDefaults.endpoint.merge(...args); - for (const [name, alias] of Object.entries( - decorations.renamedParameters - )) { - if (name in options2) { - octokit.log.warn( - `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` - ); - if (!(alias in options2)) { - options2[alias] = options2[name]; - } - delete options2[name]; - } - } - return requestWithDefaults(options2); - } - return requestWithDefaults(...args); - } - return Object.assign(withDecorations, requestWithDefaults); -} - -// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; -} -restEndpointMethods.VERSION = VERSION7; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; -} -legacyRestEndpointMethods.VERSION = VERSION7; - -// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js -var VERSION8 = "0.0.0-development"; -function normalizePaginatedListResponse(response) { - if (!response.data) { - return { - ...response, - data: [] - }; - } - const responseNeedsNormalization = ("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data); - if (!responseNeedsNormalization) return response; - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - const totalCommits = response.data.total_commits; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - delete response.data.total_commits; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - response.data.total_count = totalCount; - response.data.total_commits = totalCommits; - return response; -} -function iterator2(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url5 = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url5) return { done: true }; - try { - const response = await requestMethod({ method, url: url5, headers }); - const normalizedResponse = normalizePaginatedListResponse(response); - url5 = ((normalizedResponse.headers.link || "").match( - /<([^<>]+)>;\s*rel="next"/ - ) || [])[1]; - if (!url5 && "total_commits" in normalizedResponse.data) { - const parsedUrl = new URL(normalizedResponse.url); - const params = parsedUrl.searchParams; - const page = parseInt(params.get("page") || "1", 10); - const per_page = parseInt(params.get("per_page") || "250", 10); - if (page * per_page < normalizedResponse.data.total_commits) { - params.set("page", String(page + 1)); - url5 = parsedUrl.toString(); - } - } - return { value: normalizedResponse }; - } catch (error100) { - if (error100.status !== 409) throw error100; - url5 = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; - } - } - }) - }; -} -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = void 0; - } - return gather( - octokit, - [], - iterator2(octokit, route, parameters)[Symbol.asyncIterator](), - mapFn - ); -} -function gather(octokit, results, iterator22, mapFn) { - return iterator22.next().then((result) => { - if (result.done) { - return results; - } - let earlyExit = false; - function done() { - earlyExit = true; - } - results = results.concat( - mapFn ? mapFn(result.value, done) : result.value.data - ); - if (earlyExit) { - return results; - } - return gather(octokit, results, iterator22, mapFn); - }); -} -var composePaginateRest = Object.assign(paginate, { - iterator: iterator2 -}); -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator2.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = VERSION8; - -// node_modules/@actions/github/lib/utils.js -var context = new Context(); -var baseUrl = getApiBaseUrl(); -var defaults2 = { - baseUrl, - request: { - agent: getProxyAgent(baseUrl), - fetch: getProxyFetch(baseUrl) - } -}; -var GitHub = Octokit.plugin(restEndpointMethods, paginateRest).defaults(defaults2); - -// node_modules/@actions/github/lib/github.js -var context2 = new Context(); - -// src/context.ts -var CustomContext = class { - constructor() { - const repoOwnerInput = getInput("repo_owner"); - const repoNameInput = getInput("repo_name"); - const prNumberInput = getInput("pr_number"); - const commitShaInput = getInput("commit_sha"); - this.repo = { - owner: this.isInputAvailable(repoOwnerInput) ? repoOwnerInput : context2.repo.owner, - repo: this.isInputAvailable(repoNameInput) ? repoNameInput : context2.repo.repo - }; - this.issue = { - number: this.isInputAvailable(prNumberInput) ? +prNumberInput : context2.issue?.number - }; - this.sha = this.isInputAvailable(commitShaInput) ? commitShaInput : void 0; - } - isRepoAvailable() { - return !!this.repo.owner && !!this.repo.repo; - } - isIssueNumberAvailable() { - return !!this.issue.number; - } - isShaAvailable() { - return !!this.sha; - } - isInputAvailable(input) { - return !!input; - } -}; - -// node_modules/@octokit/plugin-throttling/dist-bundle/index.js -var import_light = __toESM(require_light(), 1); -var VERSION9 = "0.0.0-development"; -var noop4 = () => Promise.resolve(); -function wrapRequest(state, request3, options) { - return state.retryLimiter.schedule(doRequest, state, request3, options); -} -async function doRequest(state, request3, options) { - const { pathname } = new URL(options.url, "http://github.test"); - const isAuth = isAuthRequest(options.method, pathname); - const isWrite = !isAuth && options.method !== "GET" && options.method !== "HEAD"; - const isSearch = options.method === "GET" && pathname.startsWith("/search/"); - const isGraphQL = pathname.startsWith("/graphql"); - const retryCount = ~~request3.retryCount; - const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {}; - if (state.clustering) { - jobOptions.expiration = 1e3 * 60; - } - if (isWrite || isGraphQL) { - await state.write.key(state.id).schedule(jobOptions, noop4); - } - if (isWrite && state.triggersNotification(pathname)) { - await state.notifications.key(state.id).schedule(jobOptions, noop4); - } - if (isSearch) { - await state.search.key(state.id).schedule(jobOptions, noop4); - } - const req = (isAuth ? state.auth : state.global).key(state.id).schedule(jobOptions, request3, options); - if (isGraphQL) { - const res = await req; - if (res.data.errors != null && res.data.errors.some((error100) => error100.type === "RATE_LIMITED")) { - const error100 = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { - response: res, - data: res.data - }); - throw error100; - } - } - return req; -} -function isAuthRequest(method, pathname) { - return method === "PATCH" && // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-a-scoped-access-token - /^\/applications\/[^/]+\/token\/scoped$/.test(pathname) || method === "POST" && // https://docs.github.com/en/rest/apps/oauth-applications?apiVersion=2022-11-28#reset-a-token - (/^\/applications\/[^/]+\/token$/.test(pathname) || // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app - /^\/app\/installations\/[^/]+\/access_tokens$/.test(pathname) || // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps - pathname === "/login/oauth/access_token"); -} -var triggers_notification_paths_default = [ - "/orgs/{org}/invitations", - "/orgs/{org}/invitations/{invitation_id}", - "/orgs/{org}/teams/{team_slug}/discussions", - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", - "/repos/{owner}/{repo}/collaborators/{username}", - "/repos/{owner}/{repo}/commits/{commit_sha}/comments", - "/repos/{owner}/{repo}/issues", - "/repos/{owner}/{repo}/issues/{issue_number}/comments", - "/repos/{owner}/{repo}/issues/{issue_number}/sub_issue", - "/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority", - "/repos/{owner}/{repo}/pulls", - "/repos/{owner}/{repo}/pulls/{pull_number}/comments", - "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", - "/repos/{owner}/{repo}/pulls/{pull_number}/merge", - "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", - "/repos/{owner}/{repo}/releases", - "/teams/{team_id}/discussions", - "/teams/{team_id}/discussions/{discussion_number}/comments" -]; -function routeMatcher(paths) { - const regexes = paths.map( - (path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") - ); - const regex2 = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`; - return new RegExp(regex2, "i"); -} -var regex = routeMatcher(triggers_notification_paths_default); -var triggersNotification = regex.test.bind(regex); -var groups = {}; -var createGroups = function(Bottleneck, common) { - groups.global = new Bottleneck.Group({ - id: "octokit-global", - maxConcurrent: 10, - ...common - }); - groups.auth = new Bottleneck.Group({ - id: "octokit-auth", - maxConcurrent: 1, - ...common - }); - groups.search = new Bottleneck.Group({ - id: "octokit-search", - maxConcurrent: 1, - minTime: 2e3, - ...common - }); - groups.write = new Bottleneck.Group({ - id: "octokit-write", - maxConcurrent: 1, - minTime: 1e3, - ...common - }); - groups.notifications = new Bottleneck.Group({ - id: "octokit-notifications", - maxConcurrent: 1, - minTime: 3e3, - ...common - }); -}; -function throttling(octokit, octokitOptions) { - const { - enabled = true, - Bottleneck = import_light.default, - id = "no-id", - timeout = 1e3 * 60 * 2, - // Redis TTL: 2 minutes - connection - } = octokitOptions.throttle || {}; - if (!enabled) { - return {}; - } - const common = { timeout }; - if (typeof connection !== "undefined") { - common.connection = connection; - } - if (groups.global == null) { - createGroups(Bottleneck, common); - } - const state = Object.assign( - { - clustering: connection != null, - triggersNotification, - fallbackSecondaryRateRetryAfter: 60, - retryAfterBaseValue: 1e3, - retryLimiter: new Bottleneck(), - id, - ...groups - }, - octokitOptions.throttle - ); - if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { - throw new Error(`octokit/plugin-throttling error: - You must pass the onSecondaryRateLimit and onRateLimit error handlers. - See https://octokit.github.io/rest.js/#throttling - - const octokit = new Octokit({ - throttle: { - onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, - onRateLimit: (retryAfter, options) => {/* ... */} - } - }) - `); - } - const events = {}; - const emitter = new Bottleneck.Events(events); - events.on("secondary-limit", state.onSecondaryRateLimit); - events.on("rate-limit", state.onRateLimit); - events.on( - "error", - (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) - ); - state.retryLimiter.on("failed", async function(error100, info2) { - const [state2, request3, options] = info2.args; - const { pathname } = new URL(options.url, "http://github.test"); - const shouldRetryGraphQL = pathname.startsWith("/graphql") && error100.status !== 401; - if (!(shouldRetryGraphQL || error100.status === 403 || error100.status === 429)) { - return; - } - const retryCount = ~~request3.retryCount; - request3.retryCount = retryCount; - options.request.retryCount = retryCount; - const { wantRetry, retryAfter = 0 } = await (async function() { - if (/\bsecondary rate\b/i.test(error100.message)) { - const retryAfter2 = Number(error100.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; - const wantRetry2 = await emitter.trigger( - "secondary-limit", - retryAfter2, - options, - octokit, - retryCount - ); - return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; - } - if (error100.response.headers != null && error100.response.headers["x-ratelimit-remaining"] === "0" || (error100.response.data?.errors ?? []).some( - (error211) => error211.type === "RATE_LIMITED" - )) { - const rateLimitReset = new Date( - ~~error100.response.headers["x-ratelimit-reset"] * 1e3 - ).getTime(); - const retryAfter2 = Math.max( - // Add one second so we retry _after_ the reset time - // https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#exceeding-the-rate-limit - Math.ceil((rateLimitReset - Date.now()) / 1e3) + 1, - 0 - ); - const wantRetry2 = await emitter.trigger( - "rate-limit", - retryAfter2, - options, - octokit, - retryCount - ); - return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; - } - return {}; - })(); - if (wantRetry) { - request3.retryCount++; - return retryAfter * state2.retryAfterBaseValue; - } - }); - octokit.hook.wrap("request", wrapRequest.bind(null, state)); - return {}; -} -throttling.VERSION = VERSION9; -throttling.triggersNotification = triggersNotification; - -// src/octokit.ts -var CustomOctokit = Octokit.plugin(throttling); -function getOctokit(token) { - return new CustomOctokit({ - auth: token, - throttle: { - onRateLimit: (retryAfter, options, _octokit, retryCount) => { - warning( - `Request quota exhausted for request ${options.method} ${options.url}` - ); - if (retryCount < 1) { - info(`Retrying after ${retryAfter} seconds!`); - return true; - } - }, - onSecondaryRateLimit: (_retryAfter, options) => { - warning( - `SecondaryRateLimit detected for request ${options.method} ${options.url}` - ); - } - } - }); -} - -// src/post.ts -var RUNNER_TIMEOUT_SEC = 6 * 60 * 60 - 30; -async function post(pr, octokit) { - const tfInstance = getInput("api_url"); - const tfRequestId = getTfRequestId(); - const tfArtifactUrl = getTfArtifactUrl(); - const parsedTimeout = timeoutSchema.safeParse(getInput("timeout")); - let timeout = parsedTimeout.success ? parsedTimeout.data * 2 : 960; - const jobsData = (await octokit.request( - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", - { - // use Custom Context to take into account `repo_owner` and `repo_name` inputs - ...pr.context.repo, - run_id: context2.runId - } - )).data; - const tooLongRunningJob = jobsData.jobs.find((job) => { - job.status === "in_progress" && job.steps?.some((step) => step.conclusion === "cancelled") && getJobRunningTime(job.started_at) >= RUNNER_TIMEOUT_SEC; - }); - if (tooLongRunningJob) { - notice( - `Job ${tooLongRunningJob.name} is running for too long. Workflow run is going to be canceled by GitHub Actions Public Runner. For more information see: https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits` - ); - if (timeout > RUNNER_TIMEOUT_SEC / 60) { - notice( - `Testing Farm request won't be cancelled, because the timeout is set to ${timeout} minutes. Results can be accessed at ${tfArtifactUrl}.` - ); - return; - } - } - const api = new TestingFarmAPI(tfInstance); - if (!tfRequestId) { - throw new Error("POST: Missing Testing Farm request id"); - } - const request3 = { - api_key: getInput("api_key", { required: true }) - }; - notice(`Cancelling Testing Farm request: ${tfRequestId}`); - await api.cancelRequest(tfRequestId, request3, false); - debug(`Request ${tfRequestId} was cancelled`); - pr.isInitialized() && await pr.setStatus( - "success", - "Testing Farm request was cancelled", - tfArtifactUrl ?? void 0 - ); -} -function getJobRunningTime(startedAt) { - const started = new Date(startedAt); - const now = /* @__PURE__ */ new Date(); - const diff = (now.getTime() - started.getTime()) / 1e3; - notice(`Job is running for ${diff} seconds`); - return diff; -} -var post_default = post; - -// node_modules/issue-metadata/dist/index.js -var __create2 = Object.create; -var __defProp2 = Object.defineProperty; -var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; -var __getOwnPropNames2 = Object.getOwnPropertyNames; -var __getProtoOf2 = Object.getPrototypeOf; -var __hasOwnProp2 = Object.prototype.hasOwnProperty; -var __commonJS2 = (cb, mod) => function __require2() { - return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export2 = (target, all3) => { - for (var name in all3) - __defProp2(target, name, { get: all3[name], enumerable: true }); -}; -var __copyProps2 = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames2(from)) - if (!__hasOwnProp2.call(to, key) && key !== except) - __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var require_fast_content_type_parse = __commonJS2({ - "node_modules/fast-content-type-parse/index.js"(exports, module) { - "use strict"; - var NullObject = function NullObject2() { - }; - NullObject.prototype = /* @__PURE__ */ Object.create(null); - var paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu; - var quotedPairRE = /\\([\v\u0020-\u00ff])/gu; - var mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u; - var defaultContentType = { type: "", parameters: new NullObject() }; - Object.freeze(defaultContentType.parameters); - Object.freeze(defaultContentType); - function parse42(header) { - if (typeof header !== "string") { - throw new TypeError("argument header is required and must be a string"); - } - let index = header.indexOf(";"); - const type = index !== -1 ? header.slice(0, index).trim() : header.trim(); - if (mediaTypeRE.test(type) === false) { - throw new TypeError("invalid media type"); - } - const result = { - type: type.toLowerCase(), - parameters: new NullObject() - }; - if (index === -1) { - return result; - } - let key; - let match2; - let value; - paramRE.lastIndex = index; - while (match2 = paramRE.exec(header)) { - if (match2.index !== index) { - throw new TypeError("invalid parameter format"); - } - index += match2[0].length; - key = match2[1].toLowerCase(); - value = match2[2]; - if (value[0] === '"') { - value = value.slice(1, value.length - 1); - quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); - } - result.parameters[key] = value; - } - if (index !== header.length) { - throw new TypeError("invalid parameter format"); - } - return result; - } - function safeParse42(header) { - if (typeof header !== "string") { - return defaultContentType; - } - let index = header.indexOf(";"); - const type = index !== -1 ? header.slice(0, index).trim() : header.trim(); - if (mediaTypeRE.test(type) === false) { - return defaultContentType; - } - const result = { - type: type.toLowerCase(), - parameters: new NullObject() - }; - if (index === -1) { - return result; - } - let key; - let match2; - let value; - paramRE.lastIndex = index; - while (match2 = paramRE.exec(header)) { - if (match2.index !== index) { - return defaultContentType; - } - index += match2[0].length; - key = match2[1].toLowerCase(); - value = match2[2]; - if (value[0] === '"') { - value = value.slice(1, value.length - 1); - quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1")); - } - result.parameters[key] = value; - } - if (index !== header.length) { - return defaultContentType; - } - return result; - } - module.exports.default = { parse: parse42, safeParse: safeParse42 }; - module.exports.parse = parse42; - module.exports.safeParse = safeParse42; - module.exports.defaultContentType = defaultContentType; - } -}); -function getUserAgent2() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - if (typeof process === "object" && process.version !== void 0) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - return ""; -} -var VERSION10 = "0.0.0-development"; -var userAgent2 = `octokit-endpoint.js/${VERSION10} ${getUserAgent2()}`; -var DEFAULTS2 = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent2 - }, - mediaType: { - format: "" - } -}; -function lowercaseKeys2(object22) { - if (!object22) { - return {}; - } - return Object.keys(object22).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object22[key]; - return newObj; - }, {}); -} -function isPlainObject6(value) { - if (typeof value !== "object" || value === null) return false; - if (Object.prototype.toString.call(value) !== "[object Object]") return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} -function mergeDeep2(defaults3, options) { - const result = Object.assign({}, defaults3); - Object.keys(options).forEach((key) => { - if (isPlainObject6(options[key])) { - if (!(key in defaults3)) Object.assign(result, { [key]: options[key] }); - else result[key] = mergeDeep2(defaults3[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); - } - }); - return result; -} -function removeUndefinedProperties2(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; - } - } - return obj; -} -function merge5(defaults3, route, options) { - if (typeof route === "string") { - let [method, url22] = route.split(" "); - options = Object.assign(url22 ? { method, url: url22 } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys2(options.headers); - removeUndefinedProperties2(options); - removeUndefinedProperties2(options.headers); - const mergedOptions = mergeDeep2(defaults3 || {}, options); - if (options.url === "/graphql") { - if (defaults3 && defaults3.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults3.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); - } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} -function addQueryParameters2(url22, parameters) { - const separator = /\?/.test(url22) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url22; - } - return url22 + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} -var urlVariableRegex2 = /\{[^{}}]+\}/g; -function removeNonChars2(variableName) { - return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); -} -function omit4(object22, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object22)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object22[key]; - } - } - return result; -} -function encodeReserved2(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - return part; - }).join(""); -} -function encodeUnreserved2(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue2(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved2(value) : encodeUnreserved2(value); - if (key) { - return encodeUnreserved2(key) + "=" + value; - } else { - return value; - } -} -function isDefined2(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator2(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues2(context3, operator, key, modifier) { - var value = context3[key], result = []; - if (isDefined2(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue2(operator, value, isKeyOperator2(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined2).forEach(function(value2) { - result.push( - encodeValue2(operator, value2, isKeyOperator2(operator) ? key : "") - ); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined2(value[k])) { - result.push(encodeValue2(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined2).forEach(function(value2) { - tmp.push(encodeValue2(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined2(value[k])) { - tmp.push(encodeUnreserved2(k)); - tmp.push(encodeValue2(operator, value[k].toString())); - } - }); - } - if (isKeyOperator2(operator)) { - result.push(encodeUnreserved2(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined2(value)) { - result.push(encodeUnreserved2(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved2(key) + "="); - } else if (value === "") { - result.push(""); - } - } - return result; -} -function parseUrl2(template) { - return { - expand: expand2.bind(null, template) - }; -} -function expand2(template, context3) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal22) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues2(context3, operator, tmp[1], tmp[2] || tmp[3])); - }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved2(literal22); - } - } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); - } -} -function parse7(options) { - let method = options.method.toUpperCase(); - let url22 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit4(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames2(url22); - url22 = parseUrl2(url22).expand(parameters); - if (!/^http/.test(url22)) { - url22 = options.baseUrl + url22; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit4(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format2) => format2.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); - } - if (url22.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/(? { - const format2 = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format2}`; - }).join(","); - } - } - } - if (["GET", "HEAD"].includes(method)) { - url22 = addQueryParameters2(url22, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } - } - } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url: url22, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} -function endpointWithDefaults2(defaults3, route, options) { - return parse7(merge5(defaults3, route, options)); -} -function withDefaults4(oldDefaults, newDefaults) { - const DEFAULTS22 = merge5(oldDefaults, newDefaults); - const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22); - return Object.assign(endpoint22, { - DEFAULTS: DEFAULTS22, - defaults: withDefaults4.bind(null, DEFAULTS22), - merge: merge5.bind(null, DEFAULTS22), - parse: parse7 - }); -} -var endpoint2 = withDefaults4(null, DEFAULTS2); -var import_fast_content_type_parse = __toESM2(require_fast_content_type_parse(), 1); -var intRegex2 = /^-?\d+$/; -var noiseValue2 = /^-?\d+n+$/; -var originalStringify2 = JSON.stringify; -var originalParse2 = JSON.parse; -var customFormat2 = /^-?\d+n$/; -var bigIntsStringify2 = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; -var noiseStringify2 = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; -var JSONStringify2 = (value, replacer, space) => { - if ("rawJSON" in JSON) { - return originalStringify2( - value, - (key, value2) => { - if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString()); - if (typeof replacer === "function") return replacer(key, value2); - if (Array.isArray(replacer) && replacer.includes(key)) return value2; - return value2; - }, - space - ); - } - if (!value) return originalStringify2(value, replacer, space); - const convertedToCustomJSON = originalStringify2( - value, - (key, value2) => { - const isNoise = typeof value2 === "string" && noiseValue2.test(value2); - if (isNoise) return value2.toString() + "n"; - if (typeof value2 === "bigint") return value2.toString() + "n"; - if (typeof replacer === "function") return replacer(key, value2); - if (Array.isArray(replacer) && replacer.includes(key)) return value2; - return value2; - }, - space - ); - const processedJSON = convertedToCustomJSON.replace( - bigIntsStringify2, - "$1$2$3" - ); - const denoisedJSON = processedJSON.replace(noiseStringify2, "$1$2$3"); - return denoisedJSON; -}; -var featureCache2 = /* @__PURE__ */ new Map(); -var isContextSourceSupported2 = () => { - const parseFingerprint = JSON.parse.toString(); - if (featureCache2.has(parseFingerprint)) { - return featureCache2.get(parseFingerprint); - } - try { - const result = JSON.parse( - "1", - (_, __, context3) => !!context3?.source && context3.source === "1" - ); - featureCache2.set(parseFingerprint, result); - return result; - } catch { - featureCache2.set(parseFingerprint, false); - return false; - } -}; -var convertMarkedBigIntsReviver2 = (key, value, context3, userReviver) => { - const isCustomFormatBigInt = typeof value === "string" && customFormat2.test(value); - if (isCustomFormatBigInt) return BigInt(value.slice(0, -1)); - const isNoiseValue = typeof value === "string" && noiseValue2.test(value); - if (isNoiseValue) return value.slice(0, -1); - if (typeof userReviver !== "function") return value; - return userReviver(key, value, context3); -}; -var JSONParseV22 = (text, reviver) => { - return JSON.parse(text, (key, value, context3) => { - const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER); - const isInt = context3 && intRegex2.test(context3.source); - const isBigInt = isBigNumber && isInt; - if (isBigInt) return BigInt(context3.source); - if (typeof reviver !== "function") return value; - return reviver(key, value, context3); - }); -}; -var MAX_INT2 = Number.MAX_SAFE_INTEGER.toString(); -var MAX_DIGITS2 = MAX_INT2.length; -var stringsOrLargeNumbers2 = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g; -var noiseValueWithQuotes2 = /^"-?\d+n+"$/; -var JSONParse2 = (text, reviver) => { - if (!text) return originalParse2(text, reviver); - if (isContextSourceSupported2()) return JSONParseV22(text, reviver); - const serializedData = text.replace( - stringsOrLargeNumbers2, - (text2, digits, fractional, exponential) => { - const isString2 = text2[0] === '"'; - const isNoise = isString2 && noiseValueWithQuotes2.test(text2); - if (isNoise) return text2.substring(0, text2.length - 1) + 'n"'; - const isFractionalOrExponential = fractional || exponential; - const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS2 || digits.length === MAX_DIGITS2 && digits <= MAX_INT2); - if (isString2 || isFractionalOrExponential || isLessThanMaxSafeInt) - return text2; - return '"' + text2 + 'n"'; - } - ); - return originalParse2( - serializedData, - (key, value, context3) => convertMarkedBigIntsReviver2(key, value, context3, reviver) - ); -}; -var RequestError2 = class extends Error { - name; - /** - * http status code - */ - status; - /** - * Request options that lead to the error. - */ - request; - /** - * Response object if a response was received - */ - response; - constructor(message2, statusCode, options) { - super(message2, { cause: options.cause }); - this.name = "HttpError"; - this.status = Number.parseInt(statusCode); - if (Number.isNaN(this.status)) { - this.status = 0; - } - if ("response" in options) { - this.response = options.response; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - /(? ""; -async function fetchWrapper2(requestOptions) { - const fetch3 = requestOptions.request?.fetch || globalThis.fetch; - if (!fetch3) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - const log = requestOptions.request?.log || console; - const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; - const body = isPlainObject22(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify2(requestOptions.body) : requestOptions.body; - const requestHeaders = Object.fromEntries( - Object.entries(requestOptions.headers).map(([name, value]) => [ - name, - String(value) - ]) - ); - let fetchResponse; - try { - fetchResponse = await fetch3(requestOptions.url, { - method: requestOptions.method, - body, - redirect: requestOptions.request?.redirect, - headers: requestHeaders, - signal: requestOptions.request?.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }); - } catch (error482) { - let message2 = "Unknown Error"; - if (error482 instanceof Error) { - if (error482.name === "AbortError") { - error482.status = 500; - throw error482; - } - message2 = error482.message; - if (error482.name === "TypeError" && "cause" in error482) { - if (error482.cause instanceof Error) { - message2 = error482.cause.message; - } else if (typeof error482.cause === "string") { - message2 = error482.cause; - } - } - } - const requestError = new RequestError2(message2, 500, { - request: requestOptions - }); - requestError.cause = error482; - throw requestError; - } - const status = fetchResponse.status; - const url22 = fetchResponse.url; - const responseHeaders = {}; - for (const [key, value] of fetchResponse.headers) { - responseHeaders[key] = value; - } - const octokitResponse = { - url: url22, - status, - headers: responseHeaders, - data: "" - }; - if ("deprecation" in responseHeaders) { - const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); - } - if (status === 204 || status === 205) { - return octokitResponse; - } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return octokitResponse; - } - throw new RequestError2(fetchResponse.statusText, status, { - response: octokitResponse, - request: requestOptions - }); - } - if (status === 304) { - octokitResponse.data = await getResponseData2(fetchResponse); - throw new RequestError2("Not modified", status, { - response: octokitResponse, - request: requestOptions - }); - } - if (status >= 400) { - octokitResponse.data = await getResponseData2(fetchResponse); - throw new RequestError2(toErrorMessage2(octokitResponse.data), status, { - response: octokitResponse, - request: requestOptions - }); - } - octokitResponse.data = parseSuccessResponseBody ? await getResponseData2(fetchResponse) : fetchResponse.body; - return octokitResponse; -} -async function getResponseData2(response) { - const contentType = response.headers.get("content-type"); - if (!contentType) { - return response.text().catch(noop5); - } - const mimetype = (0, import_fast_content_type_parse.safeParse)(contentType); - if (isJSONResponse2(mimetype)) { - let text = ""; - try { - text = await response.text(); - return JSONParse2(text); - } catch (err) { - return text; - } - } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { - return response.text().catch(noop5); - } else { - return response.arrayBuffer().catch( - /* v8 ignore next -- @preserve */ - () => new ArrayBuffer(0) - ); - } -} -function isJSONResponse2(mimetype) { - return mimetype.type === "application/json" || mimetype.type === "application/scim+json"; -} -function toErrorMessage2(data) { - if (typeof data === "string") { - return data; - } - if (data instanceof ArrayBuffer) { - return "Unknown error"; - } - if ("message" in data) { - const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; - return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; - } - return `Unknown error: ${JSON.stringify(data)}`; -} -function withDefaults22(oldEndpoint, newDefaults) { - const endpoint22 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint22.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper2(endpoint22.parse(endpointOptions)); - } - const request22 = (route2, parameters2) => { - return fetchWrapper2( - endpoint22.parse(endpoint22.merge(route2, parameters2)) - ); - }; - Object.assign(request22, { - endpoint: endpoint22, - defaults: withDefaults22.bind(null, endpoint22) - }); - return endpointOptions.request.hook(request22, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint22, - defaults: withDefaults22.bind(null, endpoint22) - }); -} -var request2 = withDefaults22(endpoint2, defaults_default3); -function parseMetadata(body, key, regexp) { - const match2 = body.match(regexp); - if (match2) { - const data = JSON.parse(match2[1]); - return key ? data && data[key] : data; - } -} -function getBodyAndMetadata(body, regexp) { - let metadata; - let issue22 = body.replace(regexp, (_, json22) => { - metadata = JSON.parse(json22); - return ""; - }); - if (!metadata) metadata = {}; - return { body: issue22, metadata }; -} -function assignNewMetadata(metadata, key, value) { - if (typeof key === "object") { - Object.assign(metadata, key); - return metadata; - } - return { ...metadata, [key]: value ? value : "" }; -} -var external_exports3 = {}; -__export2(external_exports3, { - $brand: () => $brand3, - $input: () => $input3, - $output: () => $output3, - NEVER: () => NEVER3, - TimePrecision: () => TimePrecision3, - ZodAny: () => ZodAny3, - ZodArray: () => ZodArray3, - ZodBase64: () => ZodBase643, - ZodBase64URL: () => ZodBase64URL3, - ZodBigInt: () => ZodBigInt3, - ZodBigIntFormat: () => ZodBigIntFormat3, - ZodBoolean: () => ZodBoolean3, - ZodCIDRv4: () => ZodCIDRv43, - ZodCIDRv6: () => ZodCIDRv63, - ZodCUID: () => ZodCUID4, - ZodCUID2: () => ZodCUID23, - ZodCatch: () => ZodCatch3, - ZodCodec: () => ZodCodec3, - ZodCustom: () => ZodCustom3, - ZodCustomStringFormat: () => ZodCustomStringFormat3, - ZodDate: () => ZodDate3, - ZodDefault: () => ZodDefault3, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion3, - ZodE164: () => ZodE1643, - ZodEmail: () => ZodEmail3, - ZodEmoji: () => ZodEmoji3, - ZodEnum: () => ZodEnum3, - ZodError: () => ZodError3, - ZodExactOptional: () => ZodExactOptional3, - ZodFile: () => ZodFile3, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind3, - ZodFunction: () => ZodFunction3, - ZodGUID: () => ZodGUID3, - ZodIPv4: () => ZodIPv43, - ZodIPv6: () => ZodIPv63, - ZodISODate: () => ZodISODate3, - ZodISODateTime: () => ZodISODateTime3, - ZodISODuration: () => ZodISODuration3, - ZodISOTime: () => ZodISOTime3, - ZodIntersection: () => ZodIntersection3, - ZodIssueCode: () => ZodIssueCode3, - ZodJWT: () => ZodJWT3, - ZodKSUID: () => ZodKSUID3, - ZodLazy: () => ZodLazy3, - ZodLiteral: () => ZodLiteral3, - ZodMAC: () => ZodMAC3, - ZodMap: () => ZodMap3, - ZodNaN: () => ZodNaN3, - ZodNanoID: () => ZodNanoID3, - ZodNever: () => ZodNever3, - ZodNonOptional: () => ZodNonOptional3, - ZodNull: () => ZodNull3, - ZodNullable: () => ZodNullable3, - ZodNumber: () => ZodNumber3, - ZodNumberFormat: () => ZodNumberFormat3, - ZodObject: () => ZodObject3, - ZodOptional: () => ZodOptional3, - ZodPipe: () => ZodPipe3, - ZodPrefault: () => ZodPrefault3, - ZodPromise: () => ZodPromise3, - ZodReadonly: () => ZodReadonly3, - ZodRealError: () => ZodRealError3, - ZodRecord: () => ZodRecord3, - ZodSet: () => ZodSet3, - ZodString: () => ZodString3, - ZodStringFormat: () => ZodStringFormat3, - ZodSuccess: () => ZodSuccess3, - ZodSymbol: () => ZodSymbol3, - ZodTemplateLiteral: () => ZodTemplateLiteral3, - ZodTransform: () => ZodTransform3, - ZodTuple: () => ZodTuple3, - ZodType: () => ZodType3, - ZodULID: () => ZodULID3, - ZodURL: () => ZodURL3, - ZodUUID: () => ZodUUID3, - ZodUndefined: () => ZodUndefined3, - ZodUnion: () => ZodUnion3, - ZodUnknown: () => ZodUnknown3, - ZodVoid: () => ZodVoid3, - ZodXID: () => ZodXID3, - ZodXor: () => ZodXor3, - _ZodString: () => _ZodString3, - _default: () => _default22, - _function: () => _function3, - any: () => any3, - array: () => array3, - base64: () => base6422, - base64url: () => base64url22, - bigint: () => bigint22, - boolean: () => boolean22, - catch: () => _catch22, - check: () => check3, - cidrv4: () => cidrv422, - cidrv6: () => cidrv622, - clone: () => clone3, - codec: () => codec3, - coerce: () => coerce_exports3, - config: () => config3, - core: () => core_exports22, - cuid: () => cuid32, - cuid2: () => cuid222, - custom: () => custom3, - date: () => date32, - decode: () => decode22, - decodeAsync: () => decodeAsync22, - describe: () => describe22, - discriminatedUnion: () => discriminatedUnion3, - e164: () => e16422, - email: () => email22, - emoji: () => emoji22, - encode: () => encode22, - encodeAsync: () => encodeAsync22, - endsWith: () => _endsWith3, - enum: () => _enum22, - exactOptional: () => exactOptional3, - file: () => file3, - flattenError: () => flattenError3, - float32: () => float323, - float64: () => float643, - formatError: () => formatError3, - fromJSONSchema: () => fromJSONSchema3, - function: () => _function3, - getErrorMap: () => getErrorMap3, - globalRegistry: () => globalRegistry3, - gt: () => _gt3, - gte: () => _gte3, - guid: () => guid22, - hash: () => hash3, - hex: () => hex22, - hostname: () => hostname22, - httpUrl: () => httpUrl3, - includes: () => _includes3, - instanceof: () => _instanceof3, - int: () => int3, - int32: () => int323, - int64: () => int643, - intersection: () => intersection3, - ipv4: () => ipv422, - ipv6: () => ipv622, - iso: () => iso_exports3, - json: () => json3, - jwt: () => jwt3, - keyof: () => keyof3, - ksuid: () => ksuid22, - lazy: () => lazy3, - length: () => _length3, - literal: () => literal3, - locales: () => locales_exports3, - looseObject: () => looseObject3, - looseRecord: () => looseRecord3, - lowercase: () => _lowercase3, - lt: () => _lt3, - lte: () => _lte3, - mac: () => mac22, - map: () => map3, - maxLength: () => _maxLength3, - maxSize: () => _maxSize3, - meta: () => meta22, - mime: () => _mime3, - minLength: () => _minLength3, - minSize: () => _minSize3, - multipleOf: () => _multipleOf3, - nan: () => nan3, - nanoid: () => nanoid22, - nativeEnum: () => nativeEnum3, - negative: () => _negative3, - never: () => never3, - nonnegative: () => _nonnegative3, - nonoptional: () => nonoptional3, - nonpositive: () => _nonpositive3, - normalize: () => _normalize3, - null: () => _null32, - nullable: () => nullable3, - nullish: () => nullish22, - number: () => number22, - object: () => object3, - optional: () => optional3, - overwrite: () => _overwrite3, - parse: () => parse32, - parseAsync: () => parseAsync22, - partialRecord: () => partialRecord3, - pipe: () => pipe3, - positive: () => _positive3, - prefault: () => prefault3, - preprocess: () => preprocess3, - prettifyError: () => prettifyError3, - promise: () => promise3, - property: () => _property3, - readonly: () => readonly3, - record: () => record3, - refine: () => refine3, - regex: () => _regex3, - regexes: () => regexes_exports3, - registry: () => registry3, - safeDecode: () => safeDecode22, - safeDecodeAsync: () => safeDecodeAsync22, - safeEncode: () => safeEncode22, - safeEncodeAsync: () => safeEncodeAsync22, - safeParse: () => safeParse32, - safeParseAsync: () => safeParseAsync22, - set: () => set3, - setErrorMap: () => setErrorMap3, - size: () => _size3, - slugify: () => _slugify3, - startsWith: () => _startsWith3, - strictObject: () => strictObject3, - string: () => string22, - stringFormat: () => stringFormat3, - stringbool: () => stringbool3, - success: () => success3, - superRefine: () => superRefine3, - symbol: () => symbol3, - templateLiteral: () => templateLiteral3, - toJSONSchema: () => toJSONSchema3, - toLowerCase: () => _toLowerCase3, - toUpperCase: () => _toUpperCase3, - transform: () => transform3, - treeifyError: () => treeifyError3, - trim: () => _trim3, - tuple: () => tuple3, - uint32: () => uint323, - uint64: () => uint643, - ulid: () => ulid22, - undefined: () => _undefined32, - union: () => union3, - unknown: () => unknown3, - uppercase: () => _uppercase3, - url: () => url4, - util: () => util_exports3, - uuid: () => uuid22, - uuidv4: () => uuidv43, - uuidv6: () => uuidv63, - uuidv7: () => uuidv73, - void: () => _void22, - xid: () => xid22, - xor: () => xor3 -}); -var core_exports22 = {}; -__export2(core_exports22, { - $ZodAny: () => $ZodAny3, - $ZodArray: () => $ZodArray3, - $ZodAsyncError: () => $ZodAsyncError3, - $ZodBase64: () => $ZodBase643, - $ZodBase64URL: () => $ZodBase64URL3, - $ZodBigInt: () => $ZodBigInt3, - $ZodBigIntFormat: () => $ZodBigIntFormat3, - $ZodBoolean: () => $ZodBoolean3, - $ZodCIDRv4: () => $ZodCIDRv43, - $ZodCIDRv6: () => $ZodCIDRv63, - $ZodCUID: () => $ZodCUID4, - $ZodCUID2: () => $ZodCUID23, - $ZodCatch: () => $ZodCatch3, - $ZodCheck: () => $ZodCheck3, - $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat3, - $ZodCheckEndsWith: () => $ZodCheckEndsWith3, - $ZodCheckGreaterThan: () => $ZodCheckGreaterThan3, - $ZodCheckIncludes: () => $ZodCheckIncludes3, - $ZodCheckLengthEquals: () => $ZodCheckLengthEquals3, - $ZodCheckLessThan: () => $ZodCheckLessThan3, - $ZodCheckLowerCase: () => $ZodCheckLowerCase3, - $ZodCheckMaxLength: () => $ZodCheckMaxLength3, - $ZodCheckMaxSize: () => $ZodCheckMaxSize3, - $ZodCheckMimeType: () => $ZodCheckMimeType3, - $ZodCheckMinLength: () => $ZodCheckMinLength3, - $ZodCheckMinSize: () => $ZodCheckMinSize3, - $ZodCheckMultipleOf: () => $ZodCheckMultipleOf3, - $ZodCheckNumberFormat: () => $ZodCheckNumberFormat3, - $ZodCheckOverwrite: () => $ZodCheckOverwrite3, - $ZodCheckProperty: () => $ZodCheckProperty3, - $ZodCheckRegex: () => $ZodCheckRegex3, - $ZodCheckSizeEquals: () => $ZodCheckSizeEquals3, - $ZodCheckStartsWith: () => $ZodCheckStartsWith3, - $ZodCheckStringFormat: () => $ZodCheckStringFormat3, - $ZodCheckUpperCase: () => $ZodCheckUpperCase3, - $ZodCodec: () => $ZodCodec3, - $ZodCustom: () => $ZodCustom3, - $ZodCustomStringFormat: () => $ZodCustomStringFormat3, - $ZodDate: () => $ZodDate3, - $ZodDefault: () => $ZodDefault3, - $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion3, - $ZodE164: () => $ZodE1643, - $ZodEmail: () => $ZodEmail3, - $ZodEmoji: () => $ZodEmoji3, - $ZodEncodeError: () => $ZodEncodeError3, - $ZodEnum: () => $ZodEnum3, - $ZodError: () => $ZodError3, - $ZodExactOptional: () => $ZodExactOptional3, - $ZodFile: () => $ZodFile3, - $ZodFunction: () => $ZodFunction3, - $ZodGUID: () => $ZodGUID3, - $ZodIPv4: () => $ZodIPv43, - $ZodIPv6: () => $ZodIPv63, - $ZodISODate: () => $ZodISODate3, - $ZodISODateTime: () => $ZodISODateTime3, - $ZodISODuration: () => $ZodISODuration3, - $ZodISOTime: () => $ZodISOTime3, - $ZodIntersection: () => $ZodIntersection3, - $ZodJWT: () => $ZodJWT3, - $ZodKSUID: () => $ZodKSUID3, - $ZodLazy: () => $ZodLazy3, - $ZodLiteral: () => $ZodLiteral3, - $ZodMAC: () => $ZodMAC3, - $ZodMap: () => $ZodMap3, - $ZodNaN: () => $ZodNaN3, - $ZodNanoID: () => $ZodNanoID3, - $ZodNever: () => $ZodNever3, - $ZodNonOptional: () => $ZodNonOptional3, - $ZodNull: () => $ZodNull3, - $ZodNullable: () => $ZodNullable3, - $ZodNumber: () => $ZodNumber3, - $ZodNumberFormat: () => $ZodNumberFormat3, - $ZodObject: () => $ZodObject3, - $ZodObjectJIT: () => $ZodObjectJIT3, - $ZodOptional: () => $ZodOptional3, - $ZodPipe: () => $ZodPipe3, - $ZodPrefault: () => $ZodPrefault3, - $ZodPromise: () => $ZodPromise3, - $ZodReadonly: () => $ZodReadonly3, - $ZodRealError: () => $ZodRealError3, - $ZodRecord: () => $ZodRecord3, - $ZodRegistry: () => $ZodRegistry3, - $ZodSet: () => $ZodSet3, - $ZodString: () => $ZodString3, - $ZodStringFormat: () => $ZodStringFormat3, - $ZodSuccess: () => $ZodSuccess3, - $ZodSymbol: () => $ZodSymbol3, - $ZodTemplateLiteral: () => $ZodTemplateLiteral3, - $ZodTransform: () => $ZodTransform3, - $ZodTuple: () => $ZodTuple3, - $ZodType: () => $ZodType3, - $ZodULID: () => $ZodULID3, - $ZodURL: () => $ZodURL3, - $ZodUUID: () => $ZodUUID3, - $ZodUndefined: () => $ZodUndefined3, - $ZodUnion: () => $ZodUnion3, - $ZodUnknown: () => $ZodUnknown3, - $ZodVoid: () => $ZodVoid3, - $ZodXID: () => $ZodXID3, - $ZodXor: () => $ZodXor3, - $brand: () => $brand3, - $constructor: () => $constructor3, - $input: () => $input3, - $output: () => $output3, - Doc: () => Doc3, - JSONSchema: () => json_schema_exports3, - JSONSchemaGenerator: () => JSONSchemaGenerator3, - NEVER: () => NEVER3, - TimePrecision: () => TimePrecision3, - _any: () => _any3, - _array: () => _array3, - _base64: () => _base643, - _base64url: () => _base64url3, - _bigint: () => _bigint3, - _boolean: () => _boolean3, - _catch: () => _catch5, - _check: () => _check3, - _cidrv4: () => _cidrv43, - _cidrv6: () => _cidrv63, - _coercedBigint: () => _coercedBigint3, - _coercedBoolean: () => _coercedBoolean3, - _coercedDate: () => _coercedDate3, - _coercedNumber: () => _coercedNumber3, - _coercedString: () => _coercedString3, - _cuid: () => _cuid4, - _cuid2: () => _cuid23, - _custom: () => _custom3, - _date: () => _date3, - _decode: () => _decode3, - _decodeAsync: () => _decodeAsync3, - _default: () => _default5, - _discriminatedUnion: () => _discriminatedUnion3, - _e164: () => _e1643, - _email: () => _email3, - _emoji: () => _emoji22, - _encode: () => _encode3, - _encodeAsync: () => _encodeAsync3, - _endsWith: () => _endsWith3, - _enum: () => _enum5, - _file: () => _file3, - _float32: () => _float323, - _float64: () => _float643, - _gt: () => _gt3, - _gte: () => _gte3, - _guid: () => _guid3, - _includes: () => _includes3, - _int: () => _int3, - _int32: () => _int323, - _int64: () => _int643, - _intersection: () => _intersection3, - _ipv4: () => _ipv43, - _ipv6: () => _ipv63, - _isoDate: () => _isoDate3, - _isoDateTime: () => _isoDateTime3, - _isoDuration: () => _isoDuration3, - _isoTime: () => _isoTime3, - _jwt: () => _jwt3, - _ksuid: () => _ksuid3, - _lazy: () => _lazy3, - _length: () => _length3, - _literal: () => _literal3, - _lowercase: () => _lowercase3, - _lt: () => _lt3, - _lte: () => _lte3, - _mac: () => _mac3, - _map: () => _map3, - _max: () => _lte3, - _maxLength: () => _maxLength3, - _maxSize: () => _maxSize3, - _mime: () => _mime3, - _min: () => _gte3, - _minLength: () => _minLength3, - _minSize: () => _minSize3, - _multipleOf: () => _multipleOf3, - _nan: () => _nan3, - _nanoid: () => _nanoid3, - _nativeEnum: () => _nativeEnum3, - _negative: () => _negative3, - _never: () => _never3, - _nonnegative: () => _nonnegative3, - _nonoptional: () => _nonoptional3, - _nonpositive: () => _nonpositive3, - _normalize: () => _normalize3, - _null: () => _null22, - _nullable: () => _nullable3, - _number: () => _number3, - _optional: () => _optional3, - _overwrite: () => _overwrite3, - _parse: () => _parse3, - _parseAsync: () => _parseAsync3, - _pipe: () => _pipe3, - _positive: () => _positive3, - _promise: () => _promise3, - _property: () => _property3, - _readonly: () => _readonly3, - _record: () => _record3, - _refine: () => _refine3, - _regex: () => _regex3, - _safeDecode: () => _safeDecode3, - _safeDecodeAsync: () => _safeDecodeAsync3, - _safeEncode: () => _safeEncode3, - _safeEncodeAsync: () => _safeEncodeAsync3, - _safeParse: () => _safeParse3, - _safeParseAsync: () => _safeParseAsync3, - _set: () => _set3, - _size: () => _size3, - _slugify: () => _slugify3, - _startsWith: () => _startsWith3, - _string: () => _string3, - _stringFormat: () => _stringFormat3, - _stringbool: () => _stringbool3, - _success: () => _success3, - _superRefine: () => _superRefine3, - _symbol: () => _symbol3, - _templateLiteral: () => _templateLiteral3, - _toLowerCase: () => _toLowerCase3, - _toUpperCase: () => _toUpperCase3, - _transform: () => _transform3, - _trim: () => _trim3, - _tuple: () => _tuple3, - _uint32: () => _uint323, - _uint64: () => _uint643, - _ulid: () => _ulid3, - _undefined: () => _undefined22, - _union: () => _union3, - _unknown: () => _unknown3, - _uppercase: () => _uppercase3, - _url: () => _url3, - _uuid: () => _uuid3, - _uuidv4: () => _uuidv43, - _uuidv6: () => _uuidv63, - _uuidv7: () => _uuidv73, - _void: () => _void5, - _xid: () => _xid3, - _xor: () => _xor3, - clone: () => clone3, - config: () => config3, - createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod3, - createToJSONSchemaMethod: () => createToJSONSchemaMethod3, - decode: () => decode5, - decodeAsync: () => decodeAsync5, - describe: () => describe5, - encode: () => encode7, - encodeAsync: () => encodeAsync5, - extractDefs: () => extractDefs3, - finalize: () => finalize3, - flattenError: () => flattenError3, - formatError: () => formatError3, - globalConfig: () => globalConfig3, - globalRegistry: () => globalRegistry3, - initializeContext: () => initializeContext3, - isValidBase64: () => isValidBase643, - isValidBase64URL: () => isValidBase64URL3, - isValidJWT: () => isValidJWT3, - locales: () => locales_exports3, - meta: () => meta5, - parse: () => parse22, - parseAsync: () => parseAsync5, - prettifyError: () => prettifyError3, - process: () => process22, - regexes: () => regexes_exports3, - registry: () => registry3, - safeDecode: () => safeDecode5, - safeDecodeAsync: () => safeDecodeAsync5, - safeEncode: () => safeEncode5, - safeEncodeAsync: () => safeEncodeAsync5, - safeParse: () => safeParse22, - safeParseAsync: () => safeParseAsync5, - toDotPath: () => toDotPath3, - toJSONSchema: () => toJSONSchema3, - treeifyError: () => treeifyError3, - util: () => util_exports3, - version: () => version3 -}); -var NEVER3 = Object.freeze({ - status: "aborted" -}); -// @__NO_SIDE_EFFECTS__ -function $constructor3(name, initializer32, params) { - function init(inst, def) { - if (!inst._zod) { - Object.defineProperty(inst, "_zod", { - value: { - def, - constr: _, - traits: /* @__PURE__ */ new Set() - }, - enumerable: false - }); - } - if (inst._zod.traits.has(name)) { - return; - } - inst._zod.traits.add(name); - initializer32(inst, def); - const proto = _.prototype; - const keys = Object.keys(proto); - for (let i = 0; i < keys.length; i++) { - const k = keys[i]; - 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) { - var _a22; - const inst = params?.Parent ? new Definition() : this; - init(inst, def); - (_a22 = inst._zod).deferred ?? (_a22.deferred = []); - for (const fn of inst._zod.deferred) { - fn(); - } - 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 $brand3 = /* @__PURE__ */ Symbol("zod_brand"); -var $ZodAsyncError3 = class extends Error { - constructor() { - super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`); - } -}; -var $ZodEncodeError3 = class extends Error { - constructor(name) { - super(`Encountered unidirectional transform during encode: ${name}`); - this.name = "ZodEncodeError"; - } -}; -var globalConfig3 = {}; -function config3(newConfig) { - if (newConfig) - Object.assign(globalConfig3, newConfig); - return globalConfig3; -} -var util_exports3 = {}; -__export2(util_exports3, { - BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES3, - Class: () => Class3, - NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES3, - aborted: () => aborted3, - allowsEval: () => allowsEval3, - assert: () => assert3, - assertEqual: () => assertEqual3, - assertIs: () => assertIs3, - assertNever: () => assertNever3, - assertNotEqual: () => assertNotEqual3, - assignProp: () => assignProp3, - base64ToUint8Array: () => base64ToUint8Array3, - base64urlToUint8Array: () => base64urlToUint8Array3, - cached: () => cached3, - captureStackTrace: () => captureStackTrace3, - cleanEnum: () => cleanEnum3, - cleanRegex: () => cleanRegex3, - clone: () => clone3, - cloneDef: () => cloneDef3, - createTransparentProxy: () => createTransparentProxy3, - defineLazy: () => defineLazy3, - esc: () => esc3, - escapeRegex: () => escapeRegex3, - extend: () => extend4, - finalizeIssue: () => finalizeIssue3, - floatSafeRemainder: () => floatSafeRemainder3, - getElementAtPath: () => getElementAtPath3, - getEnumValues: () => getEnumValues3, - getLengthableOrigin: () => getLengthableOrigin3, - getParsedType: () => getParsedType3, - getSizableOrigin: () => getSizableOrigin3, - hexToUint8Array: () => hexToUint8Array3, - isObject: () => isObject4, - isPlainObject: () => isPlainObject32, - issue: () => issue4, - joinValues: () => joinValues3, - jsonStringifyReplacer: () => jsonStringifyReplacer3, - merge: () => merge22, - mergeDefs: () => mergeDefs3, - normalizeParams: () => normalizeParams3, - nullish: () => nullish5, - numKeys: () => numKeys3, - objectClone: () => objectClone3, - omit: () => omit22, - optionalKeys: () => optionalKeys3, - parsedType: () => parsedType3, - partial: () => partial3, - pick: () => pick3, - prefixIssues: () => prefixIssues3, - primitiveTypes: () => primitiveTypes3, - promiseAllObject: () => promiseAllObject3, - propertyKeyTypes: () => propertyKeyTypes3, - randomString: () => randomString3, - required: () => required3, - safeExtend: () => safeExtend3, - shallowClone: () => shallowClone3, - slugify: () => slugify3, - stringifyPrimitive: () => stringifyPrimitive3, - uint8ArrayToBase64: () => uint8ArrayToBase643, - uint8ArrayToBase64url: () => uint8ArrayToBase64url3, - uint8ArrayToHex: () => uint8ArrayToHex3, - unwrapMessage: () => unwrapMessage3 -}); -function assertEqual3(val) { - return val; -} -function assertNotEqual3(val) { - return val; -} -function assertIs3(_arg) { -} -function assertNever3(_x) { - throw new Error("Unexpected value in exhaustive check"); -} -function assert3(_) { -} -function getEnumValues3(entries) { - const numericValues = Object.values(entries).filter((v) => typeof v === "number"); - const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v); - return values; -} -function joinValues3(array22, separator = "|") { - return array22.map((val) => stringifyPrimitive3(val)).join(separator); -} -function jsonStringifyReplacer3(_, value) { - if (typeof value === "bigint") - return value.toString(); - return value; -} -function cached3(getter) { - const set22 = false; - return { - get value() { - if (!set22) { - const value = getter(); - Object.defineProperty(this, "value", { value }); - return value; - } - throw new Error("cached value already set"); - } - }; -} -function nullish5(input) { - return input === null || input === void 0; -} -function cleanRegex3(source) { - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - return source.slice(start, end); -} -function floatSafeRemainder3(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepString = step.toString(); - let stepDecCount = (stepString.split(".")[1] || "").length; - if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) { - const match2 = stepString.match(/\d?e-(\d?)/); - if (match2?.[1]) { - stepDecCount = Number.parseInt(match2[1]); - } - } - const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount; - const valInt = Number.parseInt(val.toFixed(decCount).replace(".", "")); - const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", "")); - return valInt % stepInt / 10 ** decCount; -} -var EVALUATING3 = /* @__PURE__ */ Symbol("evaluating"); -function defineLazy3(object22, key, getter) { - let value = void 0; - Object.defineProperty(object22, key, { - get() { - if (value === EVALUATING3) { - return void 0; - } - if (value === void 0) { - value = EVALUATING3; - value = getter(); - } - return value; - }, - set(v) { - Object.defineProperty(object22, key, { - value: v - // configurable: true, - }); - }, - configurable: true - }); -} -function objectClone3(obj) { - return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj)); -} -function assignProp3(target, prop, value) { - Object.defineProperty(target, prop, { - value, - writable: true, - enumerable: true, - configurable: true - }); -} -function mergeDefs3(...defs) { - const mergedDescriptors = {}; - for (const def of defs) { - const descriptors = Object.getOwnPropertyDescriptors(def); - Object.assign(mergedDescriptors, descriptors); - } - return Object.defineProperties({}, mergedDescriptors); -} -function cloneDef3(schema) { - return mergeDefs3(schema._zod.def); -} -function getElementAtPath3(obj, path) { - if (!path) - return obj; - return path.reduce((acc, key) => acc?.[key], obj); -} -function promiseAllObject3(promisesObj) { - const keys = Object.keys(promisesObj); - const promises3 = keys.map((key) => promisesObj[key]); - return Promise.all(promises3).then((results) => { - const resolvedObj = {}; - for (let i = 0; i < keys.length; i++) { - resolvedObj[keys[i]] = results[i]; - } - return resolvedObj; - }); -} -function randomString3(length = 10) { - const chars = "abcdefghijklmnopqrstuvwxyz"; - let str = ""; - for (let i = 0; i < length; i++) { - str += chars[Math.floor(Math.random() * chars.length)]; - } - return str; -} -function esc3(str) { - return JSON.stringify(str); -} -function slugify3(input) { - return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""); -} -var captureStackTrace3 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { -}; -function isObject4(data) { - return typeof data === "object" && data !== null && !Array.isArray(data); -} -var allowsEval3 = cached3(() => { - if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { - return false; - } - try { - const F = Function; - new F(""); - return true; - } catch (_) { - return false; - } -}); -function isPlainObject32(o) { - if (isObject4(o) === false) - return false; - const ctor = o.constructor; - if (ctor === void 0) - return true; - if (typeof ctor !== "function") - return true; - const prot = ctor.prototype; - if (isObject4(prot) === false) - return false; - if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) { - return false; - } - return true; -} -function shallowClone3(o) { - if (isPlainObject32(o)) - return { ...o }; - if (Array.isArray(o)) - return [...o]; - return o; -} -function numKeys3(data) { - let keyCount = 0; - for (const key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - keyCount++; - } - } - return keyCount; -} -var getParsedType3 = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return "undefined"; - case "string": - return "string"; - case "number": - return Number.isNaN(data) ? "nan" : "number"; - case "boolean": - return "boolean"; - case "function": - return "function"; - case "bigint": - return "bigint"; - case "symbol": - return "symbol"; - case "object": - if (Array.isArray(data)) { - return "array"; - } - if (data === null) { - return "null"; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return "promise"; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return "map"; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return "set"; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return "date"; - } - if (typeof File !== "undefined" && data instanceof File) { - return "file"; - } - return "object"; - default: - throw new Error(`Unknown data type: ${t}`); - } -}; -var propertyKeyTypes3 = /* @__PURE__ */ new Set(["string", "number", "symbol"]); -var primitiveTypes3 = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]); -function escapeRegex3(str) { - return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); -} -function clone3(inst, def, params) { - const cl = new inst._zod.constr(def ?? inst._zod.def); - if (!def || params?.parent) - cl._zod.parent = inst; - return cl; -} -function normalizeParams3(_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 createTransparentProxy3(getter) { - let target; - return new Proxy({}, { - get(_, prop, receiver) { - target ?? (target = getter()); - return Reflect.get(target, prop, receiver); - }, - set(_, prop, value, receiver) { - target ?? (target = getter()); - return Reflect.set(target, prop, value, receiver); - }, - has(_, prop) { - target ?? (target = getter()); - return Reflect.has(target, prop); - }, - deleteProperty(_, prop) { - target ?? (target = getter()); - return Reflect.deleteProperty(target, prop); - }, - ownKeys(_) { - target ?? (target = getter()); - return Reflect.ownKeys(target); - }, - getOwnPropertyDescriptor(_, prop) { - target ?? (target = getter()); - return Reflect.getOwnPropertyDescriptor(target, prop); - }, - defineProperty(_, prop, descriptor) { - target ?? (target = getter()); - return Reflect.defineProperty(target, prop, descriptor); - } - }); -} -function stringifyPrimitive3(value) { - if (typeof value === "bigint") - return value.toString() + "n"; - if (typeof value === "string") - return `"${value}"`; - return `${value}`; -} -function optionalKeys3(shape) { - return Object.keys(shape).filter((k) => { - return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional"; - }); -} -var NUMBER_FORMAT_RANGES3 = { - safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], - int32: [-2147483648, 2147483647], - uint32: [0, 4294967295], - float32: [-34028234663852886e22, 34028234663852886e22], - float64: [-Number.MAX_VALUE, Number.MAX_VALUE] -}; -var BIGINT_FORMAT_RANGES3 = { - int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")], - uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")] -}; -function pick3(schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".pick() cannot be used on object schemas containing refinements"); - } - const def = mergeDefs3(schema._zod.def, { - get shape() { - const newShape = {}; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - newShape[key] = currDef.shape[key]; - } - assignProp3(this, "shape", newShape); - return newShape; - }, - checks: [] - }); - return clone3(schema, def); -} -function omit22(schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".omit() cannot be used on object schemas containing refinements"); - } - const def = mergeDefs3(schema._zod.def, { - get shape() { - const newShape = { ...schema._zod.def.shape }; - for (const key in mask) { - if (!(key in currDef.shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - delete newShape[key]; - } - assignProp3(this, "shape", newShape); - return newShape; - }, - checks: [] - }); - return clone3(schema, def); -} -function extend4(schema, shape) { - if (!isPlainObject32(shape)) { - throw new Error("Invalid input to extend: expected a plain object"); - } - const checks = schema._zod.def.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - const existingShape = schema._zod.def.shape; - for (const key in shape) { - if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) { - throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead."); - } - } - } - const def = mergeDefs3(schema._zod.def, { - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp3(this, "shape", _shape); - return _shape; - } - }); - return clone3(schema, def); -} -function safeExtend3(schema, shape) { - if (!isPlainObject32(shape)) { - throw new Error("Invalid input to safeExtend: expected a plain object"); - } - const def = mergeDefs3(schema._zod.def, { - get shape() { - const _shape = { ...schema._zod.def.shape, ...shape }; - assignProp3(this, "shape", _shape); - return _shape; - } - }); - return clone3(schema, def); -} -function merge22(a, b) { - const def = mergeDefs3(a._zod.def, { - get shape() { - const _shape = { ...a._zod.def.shape, ...b._zod.def.shape }; - assignProp3(this, "shape", _shape); - return _shape; - }, - get catchall() { - return b._zod.def.catchall; - }, - checks: [] - // delete existing checks - }); - return clone3(a, def); -} -function partial3(Class22, schema, mask) { - const currDef = schema._zod.def; - const checks = currDef.checks; - const hasChecks = checks && checks.length > 0; - if (hasChecks) { - throw new Error(".partial() cannot be used on object schemas containing refinements"); - } - const def = mergeDefs3(schema._zod.def, { - get shape() { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in oldShape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = Class22 ? new Class22({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } else { - for (const key in oldShape) { - shape[key] = Class22 ? new Class22({ - type: "optional", - innerType: oldShape[key] - }) : oldShape[key]; - } - } - assignProp3(this, "shape", shape); - return shape; - }, - checks: [] - }); - return clone3(schema, def); -} -function required3(Class22, schema, mask) { - const def = mergeDefs3(schema._zod.def, { - get shape() { - const oldShape = schema._zod.def.shape; - const shape = { ...oldShape }; - if (mask) { - for (const key in mask) { - if (!(key in shape)) { - throw new Error(`Unrecognized key: "${key}"`); - } - if (!mask[key]) - continue; - shape[key] = new Class22({ - type: "nonoptional", - innerType: oldShape[key] - }); - } - } else { - for (const key in oldShape) { - shape[key] = new Class22({ - type: "nonoptional", - innerType: oldShape[key] - }); - } - } - assignProp3(this, "shape", shape); - return shape; - } - }); - return clone3(schema, def); -} -function aborted3(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 prefixIssues3(path, issues) { - return issues.map((iss) => { - var _a22; - (_a22 = iss).path ?? (_a22.path = []); - iss.path.unshift(path); - return iss; - }); -} -function unwrapMessage3(message2) { - return typeof message2 === "string" ? message2 : message2?.message; -} -function finalizeIssue3(iss, ctx, config22) { - const full = { ...iss, path: iss.path ?? [] }; - if (!iss.message) { - const message2 = unwrapMessage3(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage3(ctx?.error?.(iss)) ?? unwrapMessage3(config22.customError?.(iss)) ?? unwrapMessage3(config22.localeError?.(iss)) ?? "Invalid input"; - full.message = message2; - } - delete full.inst; - delete full.continue; - if (!ctx?.reportInput) { - delete full.input; - } - return full; -} -function getSizableOrigin3(input) { - if (input instanceof Set) - return "set"; - if (input instanceof Map) - return "map"; - if (input instanceof File) - return "file"; - return "unknown"; -} -function getLengthableOrigin3(input) { - if (Array.isArray(input)) - return "array"; - if (typeof input === "string") - return "string"; - return "unknown"; -} -function parsedType3(data) { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "nan" : "number"; - } - case "object": { - if (data === null) { - return "null"; - } - if (Array.isArray(data)) { - return "array"; - } - const obj = data; - if (obj && Object.getPrototypeOf(obj) !== Object.prototype && "constructor" in obj && obj.constructor) { - return obj.constructor.name; - } - } - } - return t; -} -function issue4(...args) { - const [iss, input, inst] = args; - if (typeof iss === "string") { - return { - message: iss, - code: "custom", - input, - inst - }; - } - return { ...iss }; -} -function cleanEnum3(obj) { - return Object.entries(obj).filter(([k, _]) => { - return Number.isNaN(Number.parseInt(k, 10)); - }).map((el) => el[1]); -} -function base64ToUint8Array3(base6432) { - const binaryString = atob(base6432); - const bytes = new Uint8Array(binaryString.length); - for (let i = 0; i < binaryString.length; i++) { - bytes[i] = binaryString.charCodeAt(i); - } - return bytes; -} -function uint8ArrayToBase643(bytes) { - let binaryString = ""; - for (let i = 0; i < bytes.length; i++) { - binaryString += String.fromCharCode(bytes[i]); - } - return btoa(binaryString); -} -function base64urlToUint8Array3(base64url32) { - const base6432 = base64url32.replace(/-/g, "+").replace(/_/g, "/"); - const padding = "=".repeat((4 - base6432.length % 4) % 4); - return base64ToUint8Array3(base6432 + padding); -} -function uint8ArrayToBase64url3(bytes) { - return uint8ArrayToBase643(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, ""); -} -function hexToUint8Array3(hex32) { - const cleanHex = hex32.replace(/^0x/, ""); - if (cleanHex.length % 2 !== 0) { - throw new Error("Invalid hex string length"); - } - const bytes = new Uint8Array(cleanHex.length / 2); - for (let i = 0; i < cleanHex.length; i += 2) { - bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16); - } - return bytes; -} -function uint8ArrayToHex3(bytes) { - return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join(""); -} -var Class3 = class { - constructor(..._args) { - } -}; -var initializer5 = (inst, def) => { - inst.name = "$ZodError"; - Object.defineProperty(inst, "_zod", { - value: inst._zod, - enumerable: false - }); - Object.defineProperty(inst, "issues", { - value: def, - enumerable: false - }); - inst.message = JSON.stringify(def, jsonStringifyReplacer3, 2); - Object.defineProperty(inst, "toString", { - value: () => inst.message, - enumerable: false - }); -}; -var $ZodError3 = /* @__PURE__ */ $constructor3("$ZodError", initializer5); -var $ZodRealError3 = /* @__PURE__ */ $constructor3("$ZodError", initializer5, { Parent: Error }); -function flattenError3(error482, mapper = (issue22) => issue22.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of error482.issues) { - if (sub.path.length > 0) { - fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; - fieldErrors[sub.path[0]].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; -} -function formatError3(error482, mapper = (issue22) => issue22.message) { - const fieldErrors = { _errors: [] }; - const processError = (error492) => { - for (const issue22 of error492.issues) { - if (issue22.code === "invalid_union" && issue22.errors.length) { - issue22.errors.map((issues) => processError({ issues })); - } else if (issue22.code === "invalid_key") { - processError({ issues: issue22.issues }); - } else if (issue22.code === "invalid_element") { - processError({ issues: issue22.issues }); - } else if (issue22.path.length === 0) { - fieldErrors._errors.push(mapper(issue22)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < issue22.path.length) { - const el = issue22.path[i]; - const terminal = i === issue22.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue22)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(error482); - return fieldErrors; -} -function treeifyError3(error482, mapper = (issue22) => issue22.message) { - const result = { errors: [] }; - const processError = (error492, path = []) => { - var _a22, _b; - for (const issue22 of error492.issues) { - if (issue22.code === "invalid_union" && issue22.errors.length) { - issue22.errors.map((issues) => processError({ issues }, issue22.path)); - } else if (issue22.code === "invalid_key") { - processError({ issues: issue22.issues }, issue22.path); - } else if (issue22.code === "invalid_element") { - processError({ issues: issue22.issues }, issue22.path); - } else { - const fullpath = [...path, ...issue22.path]; - if (fullpath.length === 0) { - result.errors.push(mapper(issue22)); - continue; - } - let curr = result; - let i = 0; - while (i < fullpath.length) { - const el = fullpath[i]; - const terminal = i === fullpath.length - 1; - if (typeof el === "string") { - curr.properties ?? (curr.properties = {}); - (_a22 = curr.properties)[el] ?? (_a22[el] = { errors: [] }); - curr = curr.properties[el]; - } else { - curr.items ?? (curr.items = []); - (_b = curr.items)[el] ?? (_b[el] = { errors: [] }); - curr = curr.items[el]; - } - if (terminal) { - curr.errors.push(mapper(issue22)); - } - i++; - } - } - } - }; - processError(error482); - return result; -} -function toDotPath3(_path) { - const segs = []; - const path = _path.map((seg) => typeof seg === "object" ? seg.key : seg); - for (const seg of path) { - if (typeof seg === "number") - segs.push(`[${seg}]`); - else if (typeof seg === "symbol") - segs.push(`[${JSON.stringify(String(seg))}]`); - else if (/[^\w$]/.test(seg)) - segs.push(`[${JSON.stringify(seg)}]`); - else { - if (segs.length) - segs.push("."); - segs.push(seg); - } - } - return segs.join(""); -} -function prettifyError3(error482) { - const lines = []; - const issues = [...error482.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length); - for (const issue22 of issues) { - lines.push(`\u2716 ${issue22.message}`); - if (issue22.path?.length) - lines.push(` \u2192 at ${toDotPath3(issue22.path)}`); - } - return lines.join("\n"); -} -var _parse3 = (_Err) => (schema, value, _ctx, _params) => { - const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; - const result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) { - throw new $ZodAsyncError3(); - } - if (result.issues.length) { - const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))); - captureStackTrace3(e, _params?.callee); - throw e; - } - return result.value; -}; -var parse22 = /* @__PURE__ */ _parse3($ZodRealError3); -var _parseAsync3 = (_Err) => async (schema, value, _ctx, params) => { - const ctx = _ctx ? Object.assign(_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) => finalizeIssue3(iss, ctx, config3()))); - captureStackTrace3(e, params?.callee); - throw e; - } - return result.value; -}; -var parseAsync5 = /* @__PURE__ */ _parseAsync3($ZodRealError3); -var _safeParse3 = (_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 $ZodAsyncError3(); - } - return result.issues.length ? { - success: false, - error: new (_Err ?? $ZodError3)(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) - } : { success: true, data: result.value }; -}; -var safeParse22 = /* @__PURE__ */ _safeParse3($ZodRealError3); -var _safeParseAsync3 = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true }; - let result = schema._zod.run({ value, issues: [] }, ctx); - if (result instanceof Promise) - result = await result; - return result.issues.length ? { - success: false, - error: new _Err(result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) - } : { success: true, data: result.value }; -}; -var safeParseAsync5 = /* @__PURE__ */ _safeParseAsync3($ZodRealError3); -var _encode3 = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _parse3(_Err)(schema, value, ctx); -}; -var encode7 = /* @__PURE__ */ _encode3($ZodRealError3); -var _decode3 = (_Err) => (schema, value, _ctx) => { - return _parse3(_Err)(schema, value, _ctx); -}; -var decode5 = /* @__PURE__ */ _decode3($ZodRealError3); -var _encodeAsync3 = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _parseAsync3(_Err)(schema, value, ctx); -}; -var encodeAsync5 = /* @__PURE__ */ _encodeAsync3($ZodRealError3); -var _decodeAsync3 = (_Err) => async (schema, value, _ctx) => { - return _parseAsync3(_Err)(schema, value, _ctx); -}; -var decodeAsync5 = /* @__PURE__ */ _decodeAsync3($ZodRealError3); -var _safeEncode3 = (_Err) => (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _safeParse3(_Err)(schema, value, ctx); -}; -var safeEncode5 = /* @__PURE__ */ _safeEncode3($ZodRealError3); -var _safeDecode3 = (_Err) => (schema, value, _ctx) => { - return _safeParse3(_Err)(schema, value, _ctx); -}; -var safeDecode5 = /* @__PURE__ */ _safeDecode3($ZodRealError3); -var _safeEncodeAsync3 = (_Err) => async (schema, value, _ctx) => { - const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" }; - return _safeParseAsync3(_Err)(schema, value, ctx); -}; -var safeEncodeAsync5 = /* @__PURE__ */ _safeEncodeAsync3($ZodRealError3); -var _safeDecodeAsync3 = (_Err) => async (schema, value, _ctx) => { - return _safeParseAsync3(_Err)(schema, value, _ctx); -}; -var safeDecodeAsync5 = /* @__PURE__ */ _safeDecodeAsync3($ZodRealError3); -var regexes_exports3 = {}; -__export2(regexes_exports3, { - base64: () => base645, - base64url: () => base64url5, - bigint: () => bigint7, - boolean: () => boolean7, - browserEmail: () => browserEmail3, - cidrv4: () => cidrv45, - cidrv6: () => cidrv65, - cuid: () => cuid6, - cuid2: () => cuid25, - date: () => date9, - datetime: () => datetime5, - domain: () => domain3, - duration: () => duration5, - e164: () => e1645, - email: () => email5, - emoji: () => emoji5, - extendedDuration: () => extendedDuration3, - guid: () => guid5, - hex: () => hex5, - hostname: () => hostname5, - html5Email: () => html5Email3, - idnEmail: () => idnEmail3, - integer: () => integer3, - ipv4: () => ipv45, - ipv6: () => ipv65, - ksuid: () => ksuid5, - lowercase: () => lowercase3, - mac: () => mac5, - md5_base64: () => md5_base643, - md5_base64url: () => md5_base64url3, - md5_hex: () => md5_hex3, - nanoid: () => nanoid5, - null: () => _null7, - number: () => number7, - rfc5322Email: () => rfc5322Email3, - sha1_base64: () => sha1_base643, - sha1_base64url: () => sha1_base64url3, - sha1_hex: () => sha1_hex3, - sha256_base64: () => sha256_base643, - sha256_base64url: () => sha256_base64url3, - sha256_hex: () => sha256_hex3, - sha384_base64: () => sha384_base643, - sha384_base64url: () => sha384_base64url3, - sha384_hex: () => sha384_hex3, - sha512_base64: () => sha512_base643, - sha512_base64url: () => sha512_base64url3, - sha512_hex: () => sha512_hex3, - string: () => string7, - time: () => time5, - ulid: () => ulid5, - undefined: () => _undefined7, - unicodeEmail: () => unicodeEmail3, - uppercase: () => uppercase3, - uuid: () => uuid8, - uuid4: () => uuid43, - uuid6: () => uuid63, - uuid7: () => uuid73, - xid: () => xid5 -}); -var cuid6 = /^[cC][^\s-]{8,}$/; -var cuid25 = /^[0-9a-z]+$/; -var ulid5 = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/; -var xid5 = /^[0-9a-vA-V]{20}$/; -var ksuid5 = /^[A-Za-z0-9]{27}$/; -var nanoid5 = /^[a-zA-Z0-9_-]{21}$/; -var duration5 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; -var extendedDuration3 = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/; -var guid5 = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/; -var uuid8 = (version22) => { - if (!version22) - return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/; - return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version22}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); -}; -var uuid43 = /* @__PURE__ */ uuid8(4); -var uuid63 = /* @__PURE__ */ uuid8(6); -var uuid73 = /* @__PURE__ */ uuid8(7); -var email5 = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/; -var html5Email3 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -var rfc5322Email3 = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; -var unicodeEmail3 = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u; -var idnEmail3 = unicodeEmail3; -var browserEmail3 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; -var _emoji5 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -function emoji5() { - return new RegExp(_emoji5, "u"); -} -var ipv45 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/; -var ipv65 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/; -var mac5 = (delimiter) => { - const escapedDelim = escapeRegex3(delimiter ?? ":"); - return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`); -}; -var cidrv45 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/; -var cidrv65 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/; -var base645 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/; -var base64url5 = /^[A-Za-z0-9_-]*$/; -var hostname5 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/; -var domain3 = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/; -var e1645 = /^\+[1-9]\d{6,14}$/; -var dateSource3 = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`; -var date9 = /* @__PURE__ */ new RegExp(`^${dateSource3}$`); -function timeSource3(args) { - const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`; - const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`; - return regex2; -} -function time5(args) { - return new RegExp(`^${timeSource3(args)}$`); -} -function datetime5(args) { - const time32 = timeSource3({ precision: args.precision }); - const opts = ["Z"]; - if (args.local) - opts.push(""); - if (args.offset) - opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`); - const timeRegex = `${time32}(?:${opts.join("|")})`; - return new RegExp(`^${dateSource3}T(?:${timeRegex})$`); -} -var string7 = (params) => { - const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`; - return new RegExp(`^${regex2}$`); -}; -var bigint7 = /^-?\d+n?$/; -var integer3 = /^-?\d+$/; -var number7 = /^-?\d+(?:\.\d+)?$/; -var boolean7 = /^(?:true|false)$/i; -var _null7 = /^null$/i; -var _undefined7 = /^undefined$/i; -var lowercase3 = /^[^A-Z]*$/; -var uppercase3 = /^[^a-z]*$/; -var hex5 = /^[0-9a-fA-F]*$/; -function fixedBase643(bodyLength, padding) { - return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`); -} -function fixedBase64url3(length) { - return new RegExp(`^[A-Za-z0-9_-]{${length}}$`); -} -var md5_hex3 = /^[0-9a-fA-F]{32}$/; -var md5_base643 = /* @__PURE__ */ fixedBase643(22, "=="); -var md5_base64url3 = /* @__PURE__ */ fixedBase64url3(22); -var sha1_hex3 = /^[0-9a-fA-F]{40}$/; -var sha1_base643 = /* @__PURE__ */ fixedBase643(27, "="); -var sha1_base64url3 = /* @__PURE__ */ fixedBase64url3(27); -var sha256_hex3 = /^[0-9a-fA-F]{64}$/; -var sha256_base643 = /* @__PURE__ */ fixedBase643(43, "="); -var sha256_base64url3 = /* @__PURE__ */ fixedBase64url3(43); -var sha384_hex3 = /^[0-9a-fA-F]{96}$/; -var sha384_base643 = /* @__PURE__ */ fixedBase643(64, ""); -var sha384_base64url3 = /* @__PURE__ */ fixedBase64url3(64); -var sha512_hex3 = /^[0-9a-fA-F]{128}$/; -var sha512_base643 = /* @__PURE__ */ fixedBase643(86, "=="); -var sha512_base64url3 = /* @__PURE__ */ fixedBase64url3(86); -var $ZodCheck3 = /* @__PURE__ */ $constructor3("$ZodCheck", (inst, def) => { - var _a22; - inst._zod ?? (inst._zod = {}); - inst._zod.def = def; - (_a22 = inst._zod).onattach ?? (_a22.onattach = []); -}); -var numericOriginMap3 = { - number: "number", - bigint: "bigint", - object: "date" -}; -var $ZodCheckLessThan3 = /* @__PURE__ */ $constructor3("$ZodCheckLessThan", (inst, def) => { - $ZodCheck3.init(inst, def); - const origin2 = numericOriginMap3[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; - if (def.value < curr) { - if (def.inclusive) - bag.maximum = def.value; - else - bag.exclusiveMaximum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value <= def.value : payload.value < def.value) { - return; - } - payload.issues.push({ - origin: origin2, - code: "too_big", - maximum: typeof def.value === "object" ? def.value.getTime() : def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckGreaterThan3 = /* @__PURE__ */ $constructor3("$ZodCheckGreaterThan", (inst, def) => { - $ZodCheck3.init(inst, def); - const origin2 = numericOriginMap3[typeof def.value]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; - if (def.value > curr) { - if (def.inclusive) - bag.minimum = def.value; - else - bag.exclusiveMinimum = def.value; - } - }); - inst._zod.check = (payload) => { - if (def.inclusive ? payload.value >= def.value : payload.value > def.value) { - return; - } - payload.issues.push({ - origin: origin2, - code: "too_small", - minimum: typeof def.value === "object" ? def.value.getTime() : def.value, - input: payload.value, - inclusive: def.inclusive, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMultipleOf3 = /* @__PURE__ */ $constructor3("$ZodCheckMultipleOf", (inst, def) => { - $ZodCheck3.init(inst, def); - inst._zod.onattach.push((inst2) => { - var _a22; - (_a22 = inst2._zod.bag).multipleOf ?? (_a22.multipleOf = def.value); - }); - inst._zod.check = (payload) => { - if (typeof payload.value !== typeof def.value) - throw new Error("Cannot mix number and bigint in multiple_of check."); - const isMultiple = typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder3(payload.value, def.value) === 0; - if (isMultiple) - return; - payload.issues.push({ - origin: typeof payload.value, - code: "not_multiple_of", - divisor: def.value, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckNumberFormat3 = /* @__PURE__ */ $constructor3("$ZodCheckNumberFormat", (inst, def) => { - $ZodCheck3.init(inst, def); - def.format = def.format || "float64"; - const isInt = def.format?.includes("int"); - const origin2 = isInt ? "int" : "number"; - const [minimum, maximum] = NUMBER_FORMAT_RANGES3[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - if (isInt) - bag.pattern = integer3; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (isInt) { - if (!Number.isInteger(input)) { - payload.issues.push({ - expected: origin2, - format: def.format, - code: "invalid_type", - continue: false, - input, - inst - }); - return; - } - if (!Number.isSafeInteger(input)) { - if (input > 0) { - payload.issues.push({ - input, - code: "too_big", - maximum: Number.MAX_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin: origin2, - inclusive: true, - continue: !def.abort - }); - } else { - payload.issues.push({ - input, - code: "too_small", - minimum: Number.MIN_SAFE_INTEGER, - note: "Integers must be within the safe integer range.", - inst, - origin: origin2, - inclusive: true, - continue: !def.abort - }); - } - return; - } - } - if (input < minimum) { - payload.issues.push({ - origin: "number", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "number", - input, - code: "too_big", - maximum, - inclusive: true, - inst, - continue: !def.abort - }); - } - }; -}); -var $ZodCheckBigIntFormat3 = /* @__PURE__ */ $constructor3("$ZodCheckBigIntFormat", (inst, def) => { - $ZodCheck3.init(inst, def); - const [minimum, maximum] = BIGINT_FORMAT_RANGES3[def.format]; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - bag.minimum = minimum; - bag.maximum = maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - if (input < minimum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_small", - minimum, - inclusive: true, - inst, - continue: !def.abort - }); - } - if (input > maximum) { - payload.issues.push({ - origin: "bigint", - input, - code: "too_big", - maximum, - inclusive: true, - inst, - continue: !def.abort - }); - } - }; -}); -var $ZodCheckMaxSize3 = /* @__PURE__ */ $constructor3("$ZodCheckMaxSize", (inst, def) => { - var _a22; - $ZodCheck3.init(inst, def); - (_a22 = inst._zod.def).when ?? (_a22.when = (payload) => { - const val = payload.value; - return !nullish5(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size <= def.maximum) - return; - payload.issues.push({ - origin: getSizableOrigin3(input), - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMinSize3 = /* @__PURE__ */ $constructor3("$ZodCheckMinSize", (inst, def) => { - var _a22; - $ZodCheck3.init(inst, def); - (_a22 = inst._zod.def).when ?? (_a22.when = (payload) => { - const val = payload.value; - return !nullish5(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size >= def.minimum) - return; - payload.issues.push({ - origin: getSizableOrigin3(input), - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckSizeEquals3 = /* @__PURE__ */ $constructor3("$ZodCheckSizeEquals", (inst, def) => { - var _a22; - $ZodCheck3.init(inst, def); - (_a22 = inst._zod.def).when ?? (_a22.when = (payload) => { - const val = payload.value; - return !nullish5(val) && val.size !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.size; - bag.maximum = def.size; - bag.size = def.size; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const size = input.size; - if (size === def.size) - return; - const tooBig = size > def.size; - payload.issues.push({ - origin: getSizableOrigin3(input), - ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMaxLength3 = /* @__PURE__ */ $constructor3("$ZodCheckMaxLength", (inst, def) => { - var _a22; - $ZodCheck3.init(inst, def); - (_a22 = inst._zod.def).when ?? (_a22.when = (payload) => { - const val = payload.value; - return !nullish5(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY; - if (def.maximum < curr) - inst2._zod.bag.maximum = def.maximum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length <= def.maximum) - return; - const origin2 = getLengthableOrigin3(input); - payload.issues.push({ - origin: origin2, - code: "too_big", - maximum: def.maximum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckMinLength3 = /* @__PURE__ */ $constructor3("$ZodCheckMinLength", (inst, def) => { - var _a22; - $ZodCheck3.init(inst, def); - (_a22 = inst._zod.def).when ?? (_a22.when = (payload) => { - const val = payload.value; - return !nullish5(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; - if (def.minimum > curr) - inst2._zod.bag.minimum = def.minimum; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length >= def.minimum) - return; - const origin2 = getLengthableOrigin3(input); - payload.issues.push({ - origin: origin2, - code: "too_small", - minimum: def.minimum, - inclusive: true, - input, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckLengthEquals3 = /* @__PURE__ */ $constructor3("$ZodCheckLengthEquals", (inst, def) => { - var _a22; - $ZodCheck3.init(inst, def); - (_a22 = inst._zod.def).when ?? (_a22.when = (payload) => { - const val = payload.value; - return !nullish5(val) && val.length !== void 0; - }); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.minimum = def.length; - bag.maximum = def.length; - bag.length = def.length; - }); - inst._zod.check = (payload) => { - const input = payload.value; - const length = input.length; - if (length === def.length) - return; - const origin2 = getLengthableOrigin3(input); - const tooBig = length > def.length; - payload.issues.push({ - origin: origin2, - ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }, - inclusive: true, - exact: true, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckStringFormat3 = /* @__PURE__ */ $constructor3("$ZodCheckStringFormat", (inst, def) => { - var _a22, _b; - $ZodCheck3.init(inst, def); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.format = def.format; - if (def.pattern) { - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(def.pattern); - } - }); - if (def.pattern) - (_a22 = inst._zod).check ?? (_a22.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 = () => { - }); -}); -var $ZodCheckRegex3 = /* @__PURE__ */ $constructor3("$ZodCheckRegex", (inst, def) => { - $ZodCheckStringFormat3.init(inst, def); - inst._zod.check = (payload) => { - def.pattern.lastIndex = 0; - if (def.pattern.test(payload.value)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "regex", - input: payload.value, - pattern: def.pattern.toString(), - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckLowerCase3 = /* @__PURE__ */ $constructor3("$ZodCheckLowerCase", (inst, def) => { - def.pattern ?? (def.pattern = lowercase3); - $ZodCheckStringFormat3.init(inst, def); -}); -var $ZodCheckUpperCase3 = /* @__PURE__ */ $constructor3("$ZodCheckUpperCase", (inst, def) => { - def.pattern ?? (def.pattern = uppercase3); - $ZodCheckStringFormat3.init(inst, def); -}); -var $ZodCheckIncludes3 = /* @__PURE__ */ $constructor3("$ZodCheckIncludes", (inst, def) => { - $ZodCheck3.init(inst, def); - const escapedRegex = escapeRegex3(def.includes); - const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex); - def.pattern = pattern; - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.includes(def.includes, def.position)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "includes", - includes: def.includes, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckStartsWith3 = /* @__PURE__ */ $constructor3("$ZodCheckStartsWith", (inst, def) => { - $ZodCheck3.init(inst, def); - const pattern = new RegExp(`^${escapeRegex3(def.prefix)}.*`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.startsWith(def.prefix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "starts_with", - prefix: def.prefix, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckEndsWith3 = /* @__PURE__ */ $constructor3("$ZodCheckEndsWith", (inst, def) => { - $ZodCheck3.init(inst, def); - const pattern = new RegExp(`.*${escapeRegex3(def.suffix)}$`); - def.pattern ?? (def.pattern = pattern); - inst._zod.onattach.push((inst2) => { - const bag = inst2._zod.bag; - bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set()); - bag.patterns.add(pattern); - }); - inst._zod.check = (payload) => { - if (payload.value.endsWith(def.suffix)) - return; - payload.issues.push({ - origin: "string", - code: "invalid_format", - format: "ends_with", - suffix: def.suffix, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -function handleCheckPropertyResult3(result, payload, property) { - if (result.issues.length) { - payload.issues.push(...prefixIssues3(property, result.issues)); - } -} -var $ZodCheckProperty3 = /* @__PURE__ */ $constructor3("$ZodCheckProperty", (inst, def) => { - $ZodCheck3.init(inst, def); - inst._zod.check = (payload) => { - const result = def.schema._zod.run({ - value: payload.value[def.property], - issues: [] - }, {}); - if (result instanceof Promise) { - return result.then((result2) => handleCheckPropertyResult3(result2, payload, def.property)); - } - handleCheckPropertyResult3(result, payload, def.property); - return; - }; -}); -var $ZodCheckMimeType3 = /* @__PURE__ */ $constructor3("$ZodCheckMimeType", (inst, def) => { - $ZodCheck3.init(inst, def); - const mimeSet = new Set(def.mime); - inst._zod.onattach.push((inst2) => { - inst2._zod.bag.mime = def.mime; - }); - inst._zod.check = (payload) => { - if (mimeSet.has(payload.value.type)) - return; - payload.issues.push({ - code: "invalid_value", - values: def.mime, - input: payload.value.type, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCheckOverwrite3 = /* @__PURE__ */ $constructor3("$ZodCheckOverwrite", (inst, def) => { - $ZodCheck3.init(inst, def); - inst._zod.check = (payload) => { - payload.value = def.tx(payload.value); - }; -}); -var Doc3 = class { - constructor(args = []) { - this.content = []; - this.indent = 0; - if (this) - this.args = args; - } - indented(fn) { - this.indent += 1; - fn(this); - this.indent -= 1; - } - write(arg) { - if (typeof arg === "function") { - arg(this, { execution: "sync" }); - arg(this, { execution: "async" }); - return; - } - const content = arg; - const lines = content.split("\n").filter((x) => x); - const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length)); - const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x); - for (const line of dedented) { - this.content.push(line); - } - } - compile() { - const F = Function; - const args = this?.args; - const content = this?.content ?? [``]; - const lines = [...content.map((x) => ` ${x}`)]; - return new F(...args, lines.join("\n")); - } -}; -var version3 = { - major: 4, - minor: 3, - patch: 6 -}; -var $ZodType3 = /* @__PURE__ */ $constructor3("$ZodType", (inst, def) => { - var _a22; - inst ?? (inst = {}); - inst._zod.def = def; - inst._zod.bag = inst._zod.bag || {}; - inst._zod.version = version3; - const checks = [...inst._zod.def.checks ?? []]; - if (inst._zod.traits.has("$ZodCheck")) { - checks.unshift(inst); - } - for (const ch of checks) { - for (const fn of ch._zod.onattach) { - fn(inst); - } - } - if (checks.length === 0) { - (_a22 = inst._zod).deferred ?? (_a22.deferred = []); - inst._zod.deferred?.push(() => { - inst._zod.run = inst._zod.parse; - }); - } else { - const runChecks = (payload, checks2, ctx) => { - let isAborted = aborted3(payload); - let asyncResult; - for (const ch of checks2) { - if (ch._zod.def.when) { - const shouldRun = ch._zod.def.when(payload); - if (!shouldRun) - continue; - } else if (isAborted) { - continue; - } - const currLen = payload.issues.length; - const _ = ch._zod.check(payload); - if (_ instanceof Promise && ctx?.async === false) { - throw new $ZodAsyncError3(); - } - if (asyncResult || _ instanceof Promise) { - asyncResult = (asyncResult ?? Promise.resolve()).then(async () => { - await _; - const nextLen = payload.issues.length; - if (nextLen === currLen) - return; - if (!isAborted) - isAborted = aborted3(payload, currLen); - }); - } else { - const nextLen = payload.issues.length; - if (nextLen === currLen) - continue; - if (!isAborted) - isAborted = aborted3(payload, currLen); - } - } - if (asyncResult) { - return asyncResult.then(() => { - return payload; - }); - } - return payload; - }; - const handleCanaryResult = (canary, payload, ctx) => { - if (aborted3(canary)) { - canary.aborted = true; - return canary; - } - const checkResult = runChecks(payload, checks, ctx); - if (checkResult instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError3(); - return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, 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((canary2) => { - return handleCanaryResult(canary2, payload, ctx); - }); - } - return handleCanaryResult(canary, payload, ctx); - } - const result = inst._zod.parse(payload, ctx); - if (result instanceof Promise) { - if (ctx.async === false) - throw new $ZodAsyncError3(); - return result.then((result2) => runChecks(result2, checks, ctx)); - } - return runChecks(result, checks, ctx); - }; - } - defineLazy3(inst, "~standard", () => ({ - validate: (value) => { - try { - const r = safeParse22(inst, value); - return r.success ? { value: r.data } : { issues: r.error?.issues }; - } catch (_) { - return safeParseAsync5(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues }); - } - }, - vendor: "zod", - version: 1 - })); -}); -var $ZodString3 = /* @__PURE__ */ $constructor3("$ZodString", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string7(inst._zod.bag); - inst._zod.parse = (payload, _) => { - if (def.coerce) - try { - payload.value = String(payload.value); - } catch (_2) { - } - if (typeof payload.value === "string") - return payload; - payload.issues.push({ - expected: "string", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; -}); -var $ZodStringFormat3 = /* @__PURE__ */ $constructor3("$ZodStringFormat", (inst, def) => { - $ZodCheckStringFormat3.init(inst, def); - $ZodString3.init(inst, def); -}); -var $ZodGUID3 = /* @__PURE__ */ $constructor3("$ZodGUID", (inst, def) => { - def.pattern ?? (def.pattern = guid5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodUUID3 = /* @__PURE__ */ $constructor3("$ZodUUID", (inst, def) => { - if (def.version) { - const versionMap = { - v1: 1, - v2: 2, - v3: 3, - v4: 4, - v5: 5, - v6: 6, - v7: 7, - v8: 8 - }; - const v = versionMap[def.version]; - if (v === void 0) - throw new Error(`Invalid UUID version: "${def.version}"`); - def.pattern ?? (def.pattern = uuid8(v)); - } else - def.pattern ?? (def.pattern = uuid8()); - $ZodStringFormat3.init(inst, def); -}); -var $ZodEmail3 = /* @__PURE__ */ $constructor3("$ZodEmail", (inst, def) => { - def.pattern ?? (def.pattern = email5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodURL3 = /* @__PURE__ */ $constructor3("$ZodURL", (inst, def) => { - $ZodStringFormat3.init(inst, def); - inst._zod.check = (payload) => { - try { - const trimmed = payload.value.trim(); - const url22 = new URL(trimmed); - if (def.hostname) { - def.hostname.lastIndex = 0; - if (!def.hostname.test(url22.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) { - def.protocol.lastIndex = 0; - if (!def.protocol.test(url22.protocol.endsWith(":") ? url22.protocol.slice(0, -1) : url22.protocol)) { - payload.issues.push({ - code: "invalid_format", - format: "url", - note: "Invalid protocol", - pattern: def.protocol.source, - input: payload.value, - inst, - continue: !def.abort - }); - } - } - if (def.normalize) { - payload.value = url22.href; - } else { - payload.value = trimmed; - } - return; - } catch (_) { - payload.issues.push({ - code: "invalid_format", - format: "url", - input: payload.value, - inst, - continue: !def.abort - }); - } - }; -}); -var $ZodEmoji3 = /* @__PURE__ */ $constructor3("$ZodEmoji", (inst, def) => { - def.pattern ?? (def.pattern = emoji5()); - $ZodStringFormat3.init(inst, def); -}); -var $ZodNanoID3 = /* @__PURE__ */ $constructor3("$ZodNanoID", (inst, def) => { - def.pattern ?? (def.pattern = nanoid5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodCUID4 = /* @__PURE__ */ $constructor3("$ZodCUID", (inst, def) => { - def.pattern ?? (def.pattern = cuid6); - $ZodStringFormat3.init(inst, def); -}); -var $ZodCUID23 = /* @__PURE__ */ $constructor3("$ZodCUID2", (inst, def) => { - def.pattern ?? (def.pattern = cuid25); - $ZodStringFormat3.init(inst, def); -}); -var $ZodULID3 = /* @__PURE__ */ $constructor3("$ZodULID", (inst, def) => { - def.pattern ?? (def.pattern = ulid5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodXID3 = /* @__PURE__ */ $constructor3("$ZodXID", (inst, def) => { - def.pattern ?? (def.pattern = xid5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodKSUID3 = /* @__PURE__ */ $constructor3("$ZodKSUID", (inst, def) => { - def.pattern ?? (def.pattern = ksuid5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodISODateTime3 = /* @__PURE__ */ $constructor3("$ZodISODateTime", (inst, def) => { - def.pattern ?? (def.pattern = datetime5(def)); - $ZodStringFormat3.init(inst, def); -}); -var $ZodISODate3 = /* @__PURE__ */ $constructor3("$ZodISODate", (inst, def) => { - def.pattern ?? (def.pattern = date9); - $ZodStringFormat3.init(inst, def); -}); -var $ZodISOTime3 = /* @__PURE__ */ $constructor3("$ZodISOTime", (inst, def) => { - def.pattern ?? (def.pattern = time5(def)); - $ZodStringFormat3.init(inst, def); -}); -var $ZodISODuration3 = /* @__PURE__ */ $constructor3("$ZodISODuration", (inst, def) => { - def.pattern ?? (def.pattern = duration5); - $ZodStringFormat3.init(inst, def); -}); -var $ZodIPv43 = /* @__PURE__ */ $constructor3("$ZodIPv4", (inst, def) => { - def.pattern ?? (def.pattern = ipv45); - $ZodStringFormat3.init(inst, def); - inst._zod.bag.format = `ipv4`; -}); -var $ZodIPv63 = /* @__PURE__ */ $constructor3("$ZodIPv6", (inst, def) => { - def.pattern ?? (def.pattern = ipv65); - $ZodStringFormat3.init(inst, def); - inst._zod.bag.format = `ipv6`; - inst._zod.check = (payload) => { - try { - new URL(`http://[${payload.value}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "ipv6", - input: payload.value, - inst, - continue: !def.abort - }); - } - }; -}); -var $ZodMAC3 = /* @__PURE__ */ $constructor3("$ZodMAC", (inst, def) => { - def.pattern ?? (def.pattern = mac5(def.delimiter)); - $ZodStringFormat3.init(inst, def); - inst._zod.bag.format = `mac`; -}); -var $ZodCIDRv43 = /* @__PURE__ */ $constructor3("$ZodCIDRv4", (inst, def) => { - def.pattern ?? (def.pattern = cidrv45); - $ZodStringFormat3.init(inst, def); -}); -var $ZodCIDRv63 = /* @__PURE__ */ $constructor3("$ZodCIDRv6", (inst, def) => { - def.pattern ?? (def.pattern = cidrv65); - $ZodStringFormat3.init(inst, def); - inst._zod.check = (payload) => { - const parts = payload.value.split("/"); - try { - if (parts.length !== 2) - throw new Error(); - const [address, prefix] = parts; - if (!prefix) - throw new Error(); - const prefixNum = Number(prefix); - if (`${prefixNum}` !== prefix) - throw new Error(); - if (prefixNum < 0 || prefixNum > 128) - throw new Error(); - new URL(`http://[${address}]`); - } catch { - payload.issues.push({ - code: "invalid_format", - format: "cidrv6", - input: payload.value, - inst, - continue: !def.abort - }); - } - }; -}); -function isValidBase643(data) { - if (data === "") - return true; - if (data.length % 4 !== 0) - return false; - try { - atob(data); - return true; - } catch { - return false; - } -} -var $ZodBase643 = /* @__PURE__ */ $constructor3("$ZodBase64", (inst, def) => { - def.pattern ?? (def.pattern = base645); - $ZodStringFormat3.init(inst, def); - inst._zod.bag.contentEncoding = "base64"; - inst._zod.check = (payload) => { - if (isValidBase643(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64", - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -function isValidBase64URL3(data) { - if (!base64url5.test(data)) - return false; - const base6432 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); - const padded = base6432.padEnd(Math.ceil(base6432.length / 4) * 4, "="); - return isValidBase643(padded); -} -var $ZodBase64URL3 = /* @__PURE__ */ $constructor3("$ZodBase64URL", (inst, def) => { - def.pattern ?? (def.pattern = base64url5); - $ZodStringFormat3.init(inst, def); - inst._zod.bag.contentEncoding = "base64url"; - inst._zod.check = (payload) => { - if (isValidBase64URL3(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: "base64url", - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodE1643 = /* @__PURE__ */ $constructor3("$ZodE164", (inst, def) => { - def.pattern ?? (def.pattern = e1645); - $ZodStringFormat3.init(inst, def); -}); -function isValidJWT3(token, algorithm = null) { - try { - const tokensParts = token.split("."); - if (tokensParts.length !== 3) - return false; - const [header] = tokensParts; - if (!header) - return false; - const parsedHeader = JSON.parse(atob(header)); - if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") - return false; - if (!parsedHeader.alg) - return false; - if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) - return false; - return true; - } catch { - return false; - } -} -var $ZodJWT3 = /* @__PURE__ */ $constructor3("$ZodJWT", (inst, def) => { - $ZodStringFormat3.init(inst, def); - inst._zod.check = (payload) => { - if (isValidJWT3(payload.value, def.alg)) - return; - payload.issues.push({ - code: "invalid_format", - format: "jwt", - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodCustomStringFormat3 = /* @__PURE__ */ $constructor3("$ZodCustomStringFormat", (inst, def) => { - $ZodStringFormat3.init(inst, def); - inst._zod.check = (payload) => { - if (def.fn(payload.value)) - return; - payload.issues.push({ - code: "invalid_format", - format: def.format, - input: payload.value, - inst, - continue: !def.abort - }); - }; -}); -var $ZodNumber3 = /* @__PURE__ */ $constructor3("$ZodNumber", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.pattern = inst._zod.bag.pattern ?? number7; - 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) ? "Infinity" : void 0 : void 0; - payload.issues.push({ - expected: "number", - code: "invalid_type", - input, - inst, - ...received ? { received } : {} - }); - return payload; - }; -}); -var $ZodNumberFormat3 = /* @__PURE__ */ $constructor3("$ZodNumberFormat", (inst, def) => { - $ZodCheckNumberFormat3.init(inst, def); - $ZodNumber3.init(inst, def); -}); -var $ZodBoolean3 = /* @__PURE__ */ $constructor3("$ZodBoolean", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.pattern = boolean7; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = Boolean(payload.value); - } catch (_) { - } - const input = payload.value; - if (typeof input === "boolean") - return payload; - payload.issues.push({ - expected: "boolean", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodBigInt3 = /* @__PURE__ */ $constructor3("$ZodBigInt", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.pattern = bigint7; - inst._zod.parse = (payload, _ctx) => { - if (def.coerce) - try { - payload.value = BigInt(payload.value); - } catch (_) { - } - if (typeof payload.value === "bigint") - return payload; - payload.issues.push({ - expected: "bigint", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; -}); -var $ZodBigIntFormat3 = /* @__PURE__ */ $constructor3("$ZodBigIntFormat", (inst, def) => { - $ZodCheckBigIntFormat3.init(inst, def); - $ZodBigInt3.init(inst, def); -}); -var $ZodSymbol3 = /* @__PURE__ */ $constructor3("$ZodSymbol", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "symbol") - return payload; - payload.issues.push({ - expected: "symbol", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodUndefined3 = /* @__PURE__ */ $constructor3("$ZodUndefined", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.pattern = _undefined7; - inst._zod.values = /* @__PURE__ */ new Set([void 0]); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "undefined", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodNull3 = /* @__PURE__ */ $constructor3("$ZodNull", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.pattern = _null7; - inst._zod.values = /* @__PURE__ */ new Set([null]); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input === null) - return payload; - payload.issues.push({ - expected: "null", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodAny3 = /* @__PURE__ */ $constructor3("$ZodAny", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload) => payload; -}); -var $ZodUnknown3 = /* @__PURE__ */ $constructor3("$ZodUnknown", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload) => payload; -}); -var $ZodNever3 = /* @__PURE__ */ $constructor3("$ZodNever", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - payload.issues.push({ - expected: "never", - code: "invalid_type", - input: payload.value, - inst - }); - return payload; - }; -}); -var $ZodVoid3 = /* @__PURE__ */ $constructor3("$ZodVoid", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (typeof input === "undefined") - return payload; - payload.issues.push({ - expected: "void", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodDate3 = /* @__PURE__ */ $constructor3("$ZodDate", (inst, def) => { - $ZodType3.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 isDate3 = input instanceof Date; - const isValidDate = isDate3 && !Number.isNaN(input.getTime()); - if (isValidDate) - return payload; - payload.issues.push({ - expected: "date", - code: "invalid_type", - input, - ...isDate3 ? { received: "Invalid Date" } : {}, - inst - }); - return payload; - }; -}); -function handleArrayResult3(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues3(index, result.issues)); - } - final.value[index] = result.value; -} -var $ZodArray3 = /* @__PURE__ */ $constructor3("$ZodArray", (inst, def) => { - $ZodType3.init(inst, def); - 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 = Array(input.length); - const proms = []; - 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((result2) => handleArrayResult3(result2, payload, i))); - } else { - handleArrayResult3(result, payload, i); - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; -}); -function handlePropertyResult3(result, final, key, input, isOptionalOut) { - if (result.issues.length) { - if (isOptionalOut && !(key in input)) { - return; - } - final.issues.push(...prefixIssues3(key, result.issues)); - } - if (result.value === void 0) { - if (key in input) { - final.value[key] = void 0; - } - } else { - final.value[key] = result.value; - } -} -function normalizeDef3(def) { - const keys = Object.keys(def.shape); - for (const k of keys) { - if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) { - throw new Error(`Invalid element at key "${k}": expected a Zod schema`); - } - } - const okeys = optionalKeys3(def.shape); - return { - ...def, - keys, - keySet: new Set(keys), - numKeys: keys.length, - optionalKeys: new Set(okeys) - }; -} -function handleCatchall3(proms, input, payload, ctx, def, inst) { - const unrecognized = []; - const keySet = def.keySet; - const _catchall = def.catchall._zod; - const t = _catchall.def.type; - const isOptionalOut = _catchall.optout === "optional"; - for (const key in input) { - if (keySet.has(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((r2) => handlePropertyResult3(r2, payload, key, input, isOptionalOut))); - } else { - handlePropertyResult3(r, payload, key, input, isOptionalOut); - } - } - if (unrecognized.length) { - payload.issues.push({ - code: "unrecognized_keys", - keys: unrecognized, - input, - inst - }); - } - if (!proms.length) - return payload; - return Promise.all(proms).then(() => { - return payload; - }); -} -var $ZodObject3 = /* @__PURE__ */ $constructor3("$ZodObject", (inst, def) => { - $ZodType3.init(inst, def); - const desc = Object.getOwnPropertyDescriptor(def, "shape"); - if (!desc?.get) { - const sh = def.shape; - Object.defineProperty(def, "shape", { - get: () => { - const newSh = { ...sh }; - Object.defineProperty(def, "shape", { - value: newSh - }); - return newSh; - } - }); - } - const _normalized = cached3(() => normalizeDef3(def)); - defineLazy3(inst._zod, "propValues", () => { - const shape = def.shape; - const propValues = {}; - for (const key in shape) { - const field = shape[key]._zod; - if (field.values) { - propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set()); - for (const v of field.values) - propValues[key].add(v); - } - } - return propValues; - }); - const isObject22 = isObject4; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject22(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst - }); - return payload; - } - payload.value = {}; - const proms = []; - const shape = value.shape; - for (const key of value.keys) { - const el = shape[key]; - const isOptionalOut = el._zod.optout === "optional"; - const r = el._zod.run({ value: input[key], issues: [] }, ctx); - if (r instanceof Promise) { - proms.push(r.then((r2) => handlePropertyResult3(r2, payload, key, input, isOptionalOut))); - } else { - handlePropertyResult3(r, payload, key, input, isOptionalOut); - } - } - if (!catchall) { - return proms.length ? Promise.all(proms).then(() => payload) : payload; - } - return handleCatchall3(proms, input, payload, ctx, _normalized.value, inst); - }; -}); -var $ZodObjectJIT3 = /* @__PURE__ */ $constructor3("$ZodObjectJIT", (inst, def) => { - $ZodObject3.init(inst, def); - const superParse = inst._zod.parse; - const _normalized = cached3(() => normalizeDef3(def)); - const generateFastpass = (shape) => { - const doc = new Doc3(["shape", "payload", "ctx"]); - const normalized = _normalized.value; - const parseStr = (key) => { - const k = esc3(key); - return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`; - }; - doc.write(`const input = payload.value;`); - const ids = /* @__PURE__ */ Object.create(null); - let counter = 0; - for (const key of normalized.keys) { - ids[key] = `key_${counter++}`; - } - doc.write(`const newResult = {};`); - for (const key of normalized.keys) { - const id = ids[key]; - const k = esc3(key); - const schema = shape[key]; - const isOptionalOut = schema?._zod?.optout === "optional"; - doc.write(`const ${id} = ${parseStr(key)};`); - if (isOptionalOut) { - doc.write(` - if (${id}.issues.length) { - if (${k} in input) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); - } - } - - if (${id}.value === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - newResult[${k}] = ${id}.value; - } - - `); - } else { - doc.write(` - if (${id}.issues.length) { - payload.issues = payload.issues.concat(${id}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${k}, ...iss.path] : [${k}] - }))); - } - - if (${id}.value === undefined) { - if (${k} in input) { - newResult[${k}] = undefined; - } - } else { - newResult[${k}] = ${id}.value; - } - - `); - } - } - doc.write(`payload.value = newResult;`); - doc.write(`return payload;`); - const fn = doc.compile(); - return (payload, ctx) => fn(shape, payload, ctx); - }; - let fastpass; - const isObject22 = isObject4; - const jit = !globalConfig3.jitless; - const allowsEval22 = allowsEval3; - const fastEnabled = jit && allowsEval22.value; - const catchall = def.catchall; - let value; - inst._zod.parse = (payload, ctx) => { - value ?? (value = _normalized.value); - const input = payload.value; - if (!isObject22(input)) { - payload.issues.push({ - expected: "object", - code: "invalid_type", - input, - inst - }); - return payload; - } - if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) { - if (!fastpass) - fastpass = generateFastpass(def.shape); - payload = fastpass(payload, ctx); - if (!catchall) - return payload; - return handleCatchall3([], input, payload, ctx, value, inst); - } - return superParse(payload, ctx); - }; -}); -function handleUnionResults3(results, final, inst, ctx) { - for (const result of results) { - if (result.issues.length === 0) { - final.value = result.value; - return final; - } - } - const nonaborted = results.filter((r) => !aborted3(r)); - if (nonaborted.length === 1) { - final.value = nonaborted[0].value; - return nonaborted[0]; - } - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) - }); - return final; -} -var $ZodUnion3 = /* @__PURE__ */ $constructor3("$ZodUnion", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0); - defineLazy3(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0); - defineLazy3(inst._zod, "values", () => { - if (def.options.every((o) => o._zod.values)) { - return new Set(def.options.flatMap((option) => Array.from(option._zod.values))); - } - return void 0; - }); - defineLazy3(inst._zod, "pattern", () => { - if (def.options.every((o) => o._zod.pattern)) { - const patterns = def.options.map((o) => o._zod.pattern); - return new RegExp(`^(${patterns.map((p) => cleanRegex3(p.source)).join("|")})$`); - } - return void 0; - }); - const single = def.options.length === 1; - const first = def.options[0]._zod.run; - inst._zod.parse = (payload, ctx) => { - if (single) { - return first(payload, ctx); - } - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - if (result.issues.length === 0) - return result; - results.push(result); - } - } - if (!async) - return handleUnionResults3(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleUnionResults3(results2, payload, inst, ctx); - }); - }; -}); -function handleExclusiveUnionResults3(results, final, inst, ctx) { - const successes = results.filter((r) => r.issues.length === 0); - if (successes.length === 1) { - final.value = successes[0].value; - return final; - } - if (successes.length === 0) { - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: results.map((result) => result.issues.map((iss) => finalizeIssue3(iss, ctx, config3()))) - }); - } else { - final.issues.push({ - code: "invalid_union", - input: final.value, - inst, - errors: [], - inclusive: false - }); - } - return final; -} -var $ZodXor3 = /* @__PURE__ */ $constructor3("$ZodXor", (inst, def) => { - $ZodUnion3.init(inst, def); - def.inclusive = false; - const single = def.options.length === 1; - const first = def.options[0]._zod.run; - inst._zod.parse = (payload, ctx) => { - if (single) { - return first(payload, ctx); - } - let async = false; - const results = []; - for (const option of def.options) { - const result = option._zod.run({ - value: payload.value, - issues: [] - }, ctx); - if (result instanceof Promise) { - results.push(result); - async = true; - } else { - results.push(result); - } - } - if (!async) - return handleExclusiveUnionResults3(results, payload, inst, ctx); - return Promise.all(results).then((results2) => { - return handleExclusiveUnionResults3(results2, payload, inst, ctx); - }); - }; -}); -var $ZodDiscriminatedUnion3 = /* @__PURE__ */ $constructor3("$ZodDiscriminatedUnion", (inst, def) => { - def.inclusive = false; - $ZodUnion3.init(inst, def); - const _super = inst._zod.parse; - defineLazy3(inst._zod, "propValues", () => { - const propValues = {}; - for (const option of def.options) { - const pv = option._zod.propValues; - if (!pv || Object.keys(pv).length === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`); - for (const [k, v] of Object.entries(pv)) { - if (!propValues[k]) - propValues[k] = /* @__PURE__ */ new Set(); - for (const val of v) { - propValues[k].add(val); - } - } - } - return propValues; - }); - const disc = cached3(() => { - const opts = def.options; - const map22 = /* @__PURE__ */ new Map(); - for (const o of opts) { - const values = o._zod.propValues?.[def.discriminator]; - if (!values || values.size === 0) - throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`); - for (const v of values) { - if (map22.has(v)) { - throw new Error(`Duplicate discriminator value "${String(v)}"`); - } - map22.set(v, o); - } - } - return map22; - }); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isObject4(input)) { - payload.issues.push({ - code: "invalid_type", - expected: "object", - input, - inst - }); - return payload; - } - const opt = disc.value.get(input?.[def.discriminator]); - if (opt) { - return opt._zod.run(payload, ctx); - } - if (def.unionFallback) { - return _super(payload, ctx); - } - payload.issues.push({ - code: "invalid_union", - errors: [], - note: "No matching discriminator", - discriminator: def.discriminator, - input, - path: [def.discriminator], - inst - }); - return payload; - }; -}); -var $ZodIntersection3 = /* @__PURE__ */ $constructor3("$ZodIntersection", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - const left = def.left._zod.run({ value: input, issues: [] }, ctx); - const right = def.right._zod.run({ value: input, issues: [] }, ctx); - const async = left instanceof Promise || right instanceof Promise; - if (async) { - return Promise.all([left, right]).then(([left2, right2]) => { - return handleIntersectionResults3(payload, left2, right2); - }); - } - return handleIntersectionResults3(payload, left, right); - }; -}); -function mergeValues3(a, b) { - if (a === b) { - return { valid: true, data: a }; - } - if (a instanceof Date && b instanceof Date && +a === +b) { - return { valid: true, data: a }; - } - if (isPlainObject32(a) && isPlainObject32(b)) { - const bKeys = Object.keys(b); - const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1); - const newObj = { ...a, ...b }; - for (const key of sharedKeys) { - const sharedValue = mergeValues3(a[key], b[key]); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [key, ...sharedValue.mergeErrorPath] - }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) { - return { valid: false, mergeErrorPath: [] }; - } - const newArray = []; - for (let index = 0; index < a.length; index++) { - const itemA = a[index]; - const itemB = b[index]; - const sharedValue = mergeValues3(itemA, itemB); - if (!sharedValue.valid) { - return { - valid: false, - mergeErrorPath: [index, ...sharedValue.mergeErrorPath] - }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } - return { valid: false, mergeErrorPath: [] }; -} -function handleIntersectionResults3(result, left, right) { - const unrecKeys = /* @__PURE__ */ new Map(); - let unrecIssue; - for (const iss of left.issues) { - if (iss.code === "unrecognized_keys") { - unrecIssue ?? (unrecIssue = iss); - for (const k of iss.keys) { - if (!unrecKeys.has(k)) - unrecKeys.set(k, {}); - unrecKeys.get(k).l = true; - } - } else { - result.issues.push(iss); - } - } - for (const iss of right.issues) { - if (iss.code === "unrecognized_keys") { - for (const k of iss.keys) { - if (!unrecKeys.has(k)) - unrecKeys.set(k, {}); - unrecKeys.get(k).r = true; - } - } else { - result.issues.push(iss); - } - } - const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k); - if (bothKeys.length && unrecIssue) { - result.issues.push({ ...unrecIssue, keys: bothKeys }); - } - if (aborted3(result)) - return result; - const merged = mergeValues3(left.value, right.value); - if (!merged.valid) { - throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`); - } - result.value = merged.data; - return result; -} -var $ZodTuple3 = /* @__PURE__ */ $constructor3("$ZodTuple", (inst, def) => { - $ZodType3.init(inst, def); - const items = def.items; - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!Array.isArray(input)) { - payload.issues.push({ - input, - inst, - expected: "tuple", - code: "invalid_type" - }); - return payload; - } - payload.value = []; - const proms = []; - const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional"); - const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex; - if (!def.rest) { - const tooBig = input.length > items.length; - const tooSmall = input.length < optStart - 1; - if (tooBig || tooSmall) { - payload.issues.push({ - ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length }, - input, - inst, - origin: "array" - }); - return payload; - } - } - let i = -1; - for (const item of items) { - i++; - if (i >= input.length) { - if (i >= optStart) - continue; - } - const result = item._zod.run({ - value: input[i], - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleTupleResult3(result2, payload, i))); - } else { - handleTupleResult3(result, payload, i); - } - } - if (def.rest) { - const rest = input.slice(items.length); - for (const el of rest) { - i++; - const result = def.rest._zod.run({ - value: el, - issues: [] - }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleTupleResult3(result2, payload, i))); - } else { - handleTupleResult3(result, payload, i); - } - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleTupleResult3(result, final, index) { - if (result.issues.length) { - final.issues.push(...prefixIssues3(index, result.issues)); - } - final.value[index] = result.value; -} -var $ZodRecord3 = /* @__PURE__ */ $constructor3("$ZodRecord", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!isPlainObject32(input)) { - payload.issues.push({ - expected: "record", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - const values = def.keyType._zod.values; - if (values) { - payload.value = {}; - const recordKeys = /* @__PURE__ */ new Set(); - for (const key of values) { - if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") { - recordKeys.add(typeof key === "number" ? key.toString() : key); - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues3(key, result2.issues)); - } - payload.value[key] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues3(key, result.issues)); - } - payload.value[key] = result.value; - } - } - } - let unrecognized; - for (const key in input) { - if (!recordKeys.has(key)) { - unrecognized = unrecognized ?? []; - unrecognized.push(key); - } - } - if (unrecognized && unrecognized.length > 0) { - payload.issues.push({ - code: "unrecognized_keys", - input, - inst, - keys: unrecognized - }); - } - } else { - payload.value = {}; - for (const key of Reflect.ownKeys(input)) { - if (key === "__proto__") - continue; - let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - if (keyResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - const checkNumericKey = typeof key === "string" && number7.test(key) && keyResult.issues.length; - if (checkNumericKey) { - const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx); - if (retryResult instanceof Promise) { - throw new Error("Async schemas not supported in object keys currently"); - } - if (retryResult.issues.length === 0) { - keyResult = retryResult; - } - } - if (keyResult.issues.length) { - if (def.mode === "loose") { - payload.value[key] = input[key]; - } else { - payload.issues.push({ - code: "invalid_key", - origin: "record", - issues: keyResult.issues.map((iss) => finalizeIssue3(iss, ctx, config3())), - input: key, - path: [key], - inst - }); - } - continue; - } - const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => { - if (result2.issues.length) { - payload.issues.push(...prefixIssues3(key, result2.issues)); - } - payload.value[keyResult.value] = result2.value; - })); - } else { - if (result.issues.length) { - payload.issues.push(...prefixIssues3(key, result.issues)); - } - payload.value[keyResult.value] = result.value; - } - } - } - if (proms.length) { - return Promise.all(proms).then(() => payload); - } - return payload; - }; -}); -var $ZodMap3 = /* @__PURE__ */ $constructor3("$ZodMap", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Map)) { - payload.issues.push({ - expected: "map", - code: "invalid_type", - input, - inst - }); - return payload; - } - const proms = []; - payload.value = /* @__PURE__ */ new Map(); - for (const [key, value] of input) { - const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx); - const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx); - if (keyResult instanceof Promise || valueResult instanceof Promise) { - proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => { - handleMapResult3(keyResult2, valueResult2, payload, key, input, inst, ctx); - })); - } else { - handleMapResult3(keyResult, valueResult, payload, key, input, inst, ctx); - } - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleMapResult3(keyResult, valueResult, final, key, input, inst, ctx) { - if (keyResult.issues.length) { - if (propertyKeyTypes3.has(typeof key)) { - final.issues.push(...prefixIssues3(key, keyResult.issues)); - } else { - final.issues.push({ - code: "invalid_key", - origin: "map", - input, - inst, - issues: keyResult.issues.map((iss) => finalizeIssue3(iss, ctx, config3())) - }); - } - } - if (valueResult.issues.length) { - if (propertyKeyTypes3.has(typeof key)) { - final.issues.push(...prefixIssues3(key, valueResult.issues)); - } else { - final.issues.push({ - origin: "map", - code: "invalid_element", - input, - inst, - key, - issues: valueResult.issues.map((iss) => finalizeIssue3(iss, ctx, config3())) - }); - } - } - final.value.set(keyResult.value, valueResult.value); -} -var $ZodSet3 = /* @__PURE__ */ $constructor3("$ZodSet", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - const input = payload.value; - if (!(input instanceof Set)) { - payload.issues.push({ - input, - inst, - expected: "set", - code: "invalid_type" - }); - return payload; - } - const proms = []; - payload.value = /* @__PURE__ */ new Set(); - for (const item of input) { - const result = def.valueType._zod.run({ value: item, issues: [] }, ctx); - if (result instanceof Promise) { - proms.push(result.then((result2) => handleSetResult3(result2, payload))); - } else - handleSetResult3(result, payload); - } - if (proms.length) - return Promise.all(proms).then(() => payload); - return payload; - }; -}); -function handleSetResult3(result, final) { - if (result.issues.length) { - final.issues.push(...result.issues); - } - final.value.add(result.value); -} -var $ZodEnum3 = /* @__PURE__ */ $constructor3("$ZodEnum", (inst, def) => { - $ZodType3.init(inst, def); - const values = getEnumValues3(def.entries); - const valuesSet = new Set(values); - inst._zod.values = valuesSet; - inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes3.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex3(o) : o.toString()).join("|")})$`); - 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; - }; -}); -var $ZodLiteral3 = /* @__PURE__ */ $constructor3("$ZodLiteral", (inst, def) => { - $ZodType3.init(inst, def); - if (def.values.length === 0) { - throw new Error("Cannot create literal schema with no valid values"); - } - const values = new Set(def.values); - inst._zod.values = values; - inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex3(o) : o ? escapeRegex3(o.toString()) : String(o)).join("|")})$`); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (values.has(input)) { - return payload; - } - payload.issues.push({ - code: "invalid_value", - values: def.values, - input, - inst - }); - return payload; - }; -}); -var $ZodFile3 = /* @__PURE__ */ $constructor3("$ZodFile", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - const input = payload.value; - if (input instanceof File) - return payload; - payload.issues.push({ - expected: "file", - code: "invalid_type", - input, - inst - }); - return payload; - }; -}); -var $ZodTransform3 = /* @__PURE__ */ $constructor3("$ZodTransform", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - throw new $ZodEncodeError3(inst.constructor.name); - } - const _out = def.transform(payload.value, payload); - if (ctx.async) { - const output = _out instanceof Promise ? _out : Promise.resolve(_out); - return output.then((output2) => { - payload.value = output2; - return payload; - }); - } - if (_out instanceof Promise) { - throw new $ZodAsyncError3(); - } - payload.value = _out; - return payload; - }; -}); -function handleOptionalResult3(result, input) { - if (result.issues.length && input === void 0) { - return { issues: [], value: void 0 }; - } - return result; -} -var $ZodOptional3 = /* @__PURE__ */ $constructor3("$ZodOptional", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.optin = "optional"; - inst._zod.optout = "optional"; - defineLazy3(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0; - }); - defineLazy3(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex3(pattern.source)})?$`) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - if (def.innerType._zod.optin === "optional") { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) - return result.then((r) => handleOptionalResult3(r, payload.value)); - return handleOptionalResult3(result, payload.value); - } - if (payload.value === void 0) { - return payload; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodExactOptional3 = /* @__PURE__ */ $constructor3("$ZodExactOptional", (inst, def) => { - $ZodOptional3.init(inst, def); - defineLazy3(inst._zod, "values", () => def.innerType._zod.values); - defineLazy3(inst._zod, "pattern", () => def.innerType._zod.pattern); - inst._zod.parse = (payload, ctx) => { - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodNullable3 = /* @__PURE__ */ $constructor3("$ZodNullable", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy3(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy3(inst._zod, "pattern", () => { - const pattern = def.innerType._zod.pattern; - return pattern ? new RegExp(`^(${cleanRegex3(pattern.source)}|null)$`) : void 0; - }); - defineLazy3(inst._zod, "values", () => { - return def.innerType._zod.values ? /* @__PURE__ */ new Set([...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); - }; -}); -var $ZodDefault3 = /* @__PURE__ */ $constructor3("$ZodDefault", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.optin = "optional"; - defineLazy3(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - payload.value = def.defaultValue; - return payload; - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleDefaultResult3(result2, def)); - } - return handleDefaultResult3(result, def); - }; -}); -function handleDefaultResult3(payload, def) { - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return payload; -} -var $ZodPrefault3 = /* @__PURE__ */ $constructor3("$ZodPrefault", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.optin = "optional"; - defineLazy3(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - if (payload.value === void 0) { - payload.value = def.defaultValue; - } - return def.innerType._zod.run(payload, ctx); - }; -}); -var $ZodNonOptional3 = /* @__PURE__ */ $constructor3("$ZodNonOptional", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "values", () => { - const v = def.innerType._zod.values; - return v ? new Set([...v].filter((x) => x !== void 0)) : void 0; - }); - inst._zod.parse = (payload, ctx) => { - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => handleNonOptionalResult3(result2, inst)); - } - return handleNonOptionalResult3(result, inst); - }; -}); -function handleNonOptionalResult3(payload, inst) { - if (!payload.issues.length && payload.value === void 0) { - payload.issues.push({ - code: "invalid_type", - expected: "nonoptional", - input: payload.value, - inst - }); - } - return payload; -} -var $ZodSuccess3 = /* @__PURE__ */ $constructor3("$ZodSuccess", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - throw new $ZodEncodeError3("ZodSuccess"); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.issues.length === 0; - return payload; - }); - } - payload.value = result.issues.length === 0; - return payload; - }; -}); -var $ZodCatch3 = /* @__PURE__ */ $constructor3("$ZodCatch", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "optin", () => def.innerType._zod.optin); - defineLazy3(inst._zod, "optout", () => def.innerType._zod.optout); - defineLazy3(inst._zod, "values", () => def.innerType._zod.values); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then((result2) => { - payload.value = result2.value; - if (result2.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result2.issues.map((iss) => finalizeIssue3(iss, ctx, config3())) - }, - input: payload.value - }); - payload.issues = []; - } - return payload; - }); - } - payload.value = result.value; - if (result.issues.length) { - payload.value = def.catchValue({ - ...payload, - error: { - issues: result.issues.map((iss) => finalizeIssue3(iss, ctx, config3())) - }, - input: payload.value - }); - payload.issues = []; - } - return payload; - }; -}); -var $ZodNaN3 = /* @__PURE__ */ $constructor3("$ZodNaN", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - expected: "nan", - code: "invalid_type" - }); - return payload; - } - return payload; - }; -}); -var $ZodPipe3 = /* @__PURE__ */ $constructor3("$ZodPipe", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "values", () => def.in._zod.values); - defineLazy3(inst._zod, "optin", () => def.in._zod.optin); - defineLazy3(inst._zod, "optout", () => def.out._zod.optout); - defineLazy3(inst._zod, "propValues", () => def.in._zod.propValues); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - const right = def.out._zod.run(payload, ctx); - if (right instanceof Promise) { - return right.then((right2) => handlePipeResult3(right2, def.in, ctx)); - } - return handlePipeResult3(right, def.in, ctx); - } - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handlePipeResult3(left2, def.out, ctx)); - } - return handlePipeResult3(left, def.out, ctx); - }; -}); -function handlePipeResult3(left, next, ctx) { - if (left.issues.length) { - left.aborted = true; - return left; - } - return next._zod.run({ value: left.value, issues: left.issues }, ctx); -} -var $ZodCodec3 = /* @__PURE__ */ $constructor3("$ZodCodec", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "values", () => def.in._zod.values); - defineLazy3(inst._zod, "optin", () => def.in._zod.optin); - defineLazy3(inst._zod, "optout", () => def.out._zod.optout); - defineLazy3(inst._zod, "propValues", () => def.in._zod.propValues); - inst._zod.parse = (payload, ctx) => { - const direction = ctx.direction || "forward"; - if (direction === "forward") { - const left = def.in._zod.run(payload, ctx); - if (left instanceof Promise) { - return left.then((left2) => handleCodecAResult3(left2, def, ctx)); - } - return handleCodecAResult3(left, def, ctx); - } else { - const right = def.out._zod.run(payload, ctx); - if (right instanceof Promise) { - return right.then((right2) => handleCodecAResult3(right2, def, ctx)); - } - return handleCodecAResult3(right, def, ctx); - } - }; -}); -function handleCodecAResult3(result, def, ctx) { - if (result.issues.length) { - result.aborted = true; - return result; - } - const direction = ctx.direction || "forward"; - if (direction === "forward") { - const transformed = def.transform(result.value, result); - if (transformed instanceof Promise) { - return transformed.then((value) => handleCodecTxResult3(result, value, def.out, ctx)); - } - return handleCodecTxResult3(result, transformed, def.out, ctx); - } else { - const transformed = def.reverseTransform(result.value, result); - if (transformed instanceof Promise) { - return transformed.then((value) => handleCodecTxResult3(result, value, def.in, ctx)); - } - return handleCodecTxResult3(result, transformed, def.in, ctx); - } -} -function handleCodecTxResult3(left, value, nextSchema, ctx) { - if (left.issues.length) { - left.aborted = true; - return left; - } - return nextSchema._zod.run({ value, issues: left.issues }, ctx); -} -var $ZodReadonly3 = /* @__PURE__ */ $constructor3("$ZodReadonly", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "propValues", () => def.innerType._zod.propValues); - defineLazy3(inst._zod, "values", () => def.innerType._zod.values); - defineLazy3(inst._zod, "optin", () => def.innerType?._zod?.optin); - defineLazy3(inst._zod, "optout", () => def.innerType?._zod?.optout); - inst._zod.parse = (payload, ctx) => { - if (ctx.direction === "backward") { - return def.innerType._zod.run(payload, ctx); - } - const result = def.innerType._zod.run(payload, ctx); - if (result instanceof Promise) { - return result.then(handleReadonlyResult3); - } - return handleReadonlyResult3(result); - }; -}); -function handleReadonlyResult3(payload) { - payload.value = Object.freeze(payload.value); - return payload; -} -var $ZodTemplateLiteral3 = /* @__PURE__ */ $constructor3("$ZodTemplateLiteral", (inst, def) => { - $ZodType3.init(inst, def); - const regexParts = []; - for (const part of def.parts) { - if (typeof part === "object" && part !== null) { - if (!part._zod.pattern) { - throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`); - } - const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern; - if (!source) - throw new Error(`Invalid template literal part: ${part._zod.traits}`); - const start = source.startsWith("^") ? 1 : 0; - const end = source.endsWith("$") ? source.length - 1 : source.length; - regexParts.push(source.slice(start, end)); - } else if (part === null || primitiveTypes3.has(typeof part)) { - regexParts.push(escapeRegex3(`${part}`)); - } else { - throw new Error(`Invalid template literal part: ${part}`); - } - } - inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`); - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "string") { - payload.issues.push({ - input: payload.value, - inst, - expected: "string", - code: "invalid_type" - }); - return payload; - } - inst._zod.pattern.lastIndex = 0; - if (!inst._zod.pattern.test(payload.value)) { - payload.issues.push({ - input: payload.value, - inst, - code: "invalid_format", - format: def.format ?? "template_literal", - pattern: inst._zod.pattern.source - }); - return payload; - } - return payload; - }; -}); -var $ZodFunction3 = /* @__PURE__ */ $constructor3("$ZodFunction", (inst, def) => { - $ZodType3.init(inst, def); - inst._def = def; - inst._zod.def = def; - inst.implement = (func) => { - if (typeof func !== "function") { - throw new Error("implement() must be called with a function"); - } - return function(...args) { - const parsedArgs = inst._def.input ? parse22(inst._def.input, args) : args; - const result = Reflect.apply(func, this, parsedArgs); - if (inst._def.output) { - return parse22(inst._def.output, result); - } - return result; - }; - }; - inst.implementAsync = (func) => { - if (typeof func !== "function") { - throw new Error("implementAsync() must be called with a function"); - } - return async function(...args) { - const parsedArgs = inst._def.input ? await parseAsync5(inst._def.input, args) : args; - const result = await Reflect.apply(func, this, parsedArgs); - if (inst._def.output) { - return await parseAsync5(inst._def.output, result); - } - return result; - }; - }; - inst._zod.parse = (payload, _ctx) => { - if (typeof payload.value !== "function") { - payload.issues.push({ - code: "invalid_type", - expected: "function", - input: payload.value, - inst - }); - return payload; - } - const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === "promise"; - if (hasPromiseOutput) { - payload.value = inst.implementAsync(payload.value); - } else { - payload.value = inst.implement(payload.value); - } - return payload; - }; - inst.input = (...args) => { - const F = inst.constructor; - if (Array.isArray(args[0])) { - return new F({ - type: "function", - input: new $ZodTuple3({ - type: "tuple", - items: args[0], - rest: args[1] - }), - output: inst._def.output - }); - } - return new F({ - type: "function", - input: args[0], - output: inst._def.output - }); - }; - inst.output = (output) => { - const F = inst.constructor; - return new F({ - type: "function", - input: inst._def.input, - output - }); - }; - return inst; -}); -var $ZodPromise3 = /* @__PURE__ */ $constructor3("$ZodPromise", (inst, def) => { - $ZodType3.init(inst, def); - inst._zod.parse = (payload, ctx) => { - return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx)); - }; -}); -var $ZodLazy3 = /* @__PURE__ */ $constructor3("$ZodLazy", (inst, def) => { - $ZodType3.init(inst, def); - defineLazy3(inst._zod, "innerType", () => def.getter()); - defineLazy3(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern); - defineLazy3(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues); - defineLazy3(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0); - defineLazy3(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0); - inst._zod.parse = (payload, ctx) => { - const inner = inst._zod.innerType; - return inner._zod.run(payload, ctx); - }; -}); -var $ZodCustom3 = /* @__PURE__ */ $constructor3("$ZodCustom", (inst, def) => { - $ZodCheck3.init(inst, def); - $ZodType3.init(inst, def); - inst._zod.parse = (payload, _) => { - return payload; - }; - inst._zod.check = (payload) => { - const input = payload.value; - const r = def.fn(input); - if (r instanceof Promise) { - return r.then((r2) => handleRefineResult3(r2, payload, input, inst)); - } - handleRefineResult3(r, payload, input, inst); - return; - }; -}); -function handleRefineResult3(result, payload, input, inst) { - if (!result) { - const _iss = { - code: "custom", - input, - inst, - // incorporates params.error into issue reporting - path: [...inst._zod.def.path ?? []], - // incorporates params.error into issue reporting - continue: !inst._zod.def.abort - // params: inst._zod.def.params, - }; - if (inst._zod.def.params) - _iss.params = inst._zod.def.params; - payload.issues.push(issue4(_iss)); - } -} -var locales_exports3 = {}; -__export2(locales_exports3, { - ar: () => ar_default3, - az: () => az_default3, - be: () => be_default3, - bg: () => bg_default3, - ca: () => ca_default3, - cs: () => cs_default3, - da: () => da_default3, - de: () => de_default3, - en: () => en_default3, - eo: () => eo_default3, - es: () => es_default3, - fa: () => fa_default3, - fi: () => fi_default3, - fr: () => fr_default3, - frCA: () => fr_CA_default3, - he: () => he_default3, - hu: () => hu_default3, - hy: () => hy_default3, - id: () => id_default3, - is: () => is_default3, - it: () => it_default3, - ja: () => ja_default3, - ka: () => ka_default3, - kh: () => kh_default3, - km: () => km_default3, - ko: () => ko_default3, - lt: () => lt_default3, - mk: () => mk_default3, - ms: () => ms_default3, - nl: () => nl_default3, - no: () => no_default3, - ota: () => ota_default3, - pl: () => pl_default3, - ps: () => ps_default3, - pt: () => pt_default3, - ru: () => ru_default3, - sl: () => sl_default3, - sv: () => sv_default3, - ta: () => ta_default3, - th: () => th_default3, - tr: () => tr_default3, - ua: () => ua_default3, - uk: () => uk_default3, - ur: () => ur_default3, - uz: () => uz_default3, - vi: () => vi_default3, - yo: () => yo_default3, - zhCN: () => zh_CN_default3, - zhTW: () => zh_TW_default3 -}); -var error99 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - file: { unit: "\u0628\u0627\u064A\u062A", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, - set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0645\u062F\u062E\u0644", - email: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A", - url: "\u0631\u0627\u0628\u0637", - emoji: "\u0625\u064A\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - date: "\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - time: "\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - duration: "\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO", - ipv4: "\u0639\u0646\u0648\u0627\u0646 IPv4", - ipv6: "\u0639\u0646\u0648\u0627\u0646 IPv6", - cidrv4: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4", - cidrv6: "\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6", - base64: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded", - base64url: "\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded", - json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON", - e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164", - jwt: "JWT", - template_literal: "\u0645\u062F\u062E\u0644" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${issue22.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; - } - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${stringifyPrimitive3(issue22.values[0])}`; - return `\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return ` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue22.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue22.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"}`; - return `\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${issue22.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue22.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue22.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue22.prefix}"`; - if (_issue.format === "ends_with") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; - } - case "not_multiple_of": - return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${issue22.divisor}`; - case "unrecognized_keys": - return `\u0645\u0639\u0631\u0641${issue22.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue22.keys.length > 1 ? "\u0629" : ""}: ${joinValues3(issue22.keys, "\u060C ")}`; - case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue22.origin}`; - case "invalid_union": - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; - case "invalid_element": - return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue22.origin}`; - default: - return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; - } - }; -}; -function ar_default3() { - return { - localeError: error99() - }; -} -var error210 = () => { - const Sizable = { - string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "element", verb: "olmal\u0131d\u0131r" }, - set: { unit: "element", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "email address", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datetime", - date: "ISO date", - time: "ISO time", - duration: "ISO duration", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded string", - base64url: "base64url-encoded string", - json_string: "JSON string", - e164: "E.164 number", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${issue22.expected}, daxil olan ${received}`; - } - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${expected}, daxil olan ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive3(issue22.values[0])}`; - return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue22.origin ?? "d\u0259y\u0259r"} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "element"}`; - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue22.origin ?? "d\u0259y\u0259r"} ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue22.origin} ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; - if (_issue.format === "ends_with") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.suffix}" il\u0259 bitm\u0259lidir`; - if (_issue.format === "includes") - return `Yanl\u0131\u015F m\u0259tn: "${_issue.includes}" daxil olmal\u0131d\u0131r`; - if (_issue.format === "regex") - return `Yanl\u0131\u015F m\u0259tn: ${_issue.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`; - return `Yanl\u0131\u015F ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue22.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; - case "unrecognized_keys": - return `Tan\u0131nmayan a\xE7ar${issue22.keys.length > 1 ? "lar" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `${issue22.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; - case "invalid_union": - return "Yanl\u0131\u015F d\u0259y\u0259r"; - case "invalid_element": - return `${issue22.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; - default: - return `Yanl\u0131\u015F d\u0259y\u0259r`; - } - }; -}; -function az_default3() { - return { - localeError: error210() - }; -} -function getBelarusianPlural3(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; - } - if (lastDigit === 1) { - return one; - } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; - } - return many; -} -var error310 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0456\u043C\u0432\u0430\u043B", - few: "\u0441\u0456\u043C\u0432\u0430\u043B\u044B", - many: "\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u044B", - many: "\u0431\u0430\u0439\u0442\u0430\u045E" - }, - verb: "\u043C\u0435\u0446\u044C" - } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0443\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0430\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0447\u0430\u0441", - duration: "ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0430\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0430\u0441", - cidrv4: "IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D", - base64: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64", - base64url: "\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url", - json_string: "JSON \u0440\u0430\u0434\u043E\u043A", - e164: "\u043D\u0443\u043C\u0430\u0440 E.164", - jwt: "JWT", - template_literal: "\u0443\u0432\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u043B\u0456\u043A", - array: "\u043C\u0430\u0441\u0456\u045E" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${issue22.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; - } - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${stringifyPrimitive3(issue22.values[0])}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - const maxValue = Number(issue22.maximum); - const unit = getBelarusianPlural3(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue22.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue22.maximum.toString()} ${unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue22.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - const minValue = Number(issue22.minimum); - const unit = getBelarusianPlural3(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue22.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue22.minimum.toString()} ${unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue22.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue22.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue22.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue22.origin}`; - case "invalid_union": - return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"; - case "invalid_element": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue22.origin}`; - default: - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; - } - }; -}; -function be_default3() { - return { - localeError: error310() - }; -} -var error410 = () => { - const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0445\u043E\u0434", - email: "\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0436\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", - base64url: "base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437", - json_string: "JSON \u043D\u0438\u0437", - e164: "E.164 \u043D\u043E\u043C\u0435\u0440", - jwt: "JWT", - template_literal: "\u0432\u0445\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0438\u0432" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${issue22.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; - } - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${stringifyPrimitive3(issue22.values[0])}`; - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue22.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`; - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue22.origin ?? "\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue22.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${issue22.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${_issue.pattern}`; - let invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D"; - if (_issue.format === "emoji") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "datetime") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "date") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; - if (_issue.format === "time") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"; - if (_issue.format === "duration") - invalid_adj = "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"; - return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${issue22.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${issue22.keys.length > 1 ? "\u0438" : ""} \u043A\u043B\u044E\u0447${issue22.keys.length > 1 ? "\u043E\u0432\u0435" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${issue22.origin}`; - case "invalid_union": - return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"; - case "invalid_element": - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${issue22.origin}`; - default: - return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434`; - } - }; -}; -function bg_default3() { - return { - localeError: error410() - }; -} -var error510 = () => { - const Sizable = { - string: { unit: "car\xE0cters", verb: "contenir" }, - file: { unit: "bytes", verb: "contenir" }, - array: { unit: "elements", verb: "contenir" }, - set: { unit: "elements", verb: "contenir" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "entrada", - email: "adre\xE7a electr\xF2nica", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "durada ISO", - ipv4: "adre\xE7a IPv4", - ipv6: "adre\xE7a IPv6", - cidrv4: "rang IPv4", - cidrv6: "rang IPv6", - base64: "cadena codificada en base64", - base64url: "cadena codificada en base64url", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Tipus inv\xE0lid: s'esperava instanceof ${issue22.expected}, s'ha rebut ${received}`; - } - return `Tipus inv\xE0lid: s'esperava ${expected}, s'ha rebut ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive3(issue22.values[0])}`; - return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues3(issue22.values, " o ")}`; - case "too_big": { - const adj = issue22.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Massa gran: s'esperava que ${issue22.origin ?? "el valor"} contingu\xE9s ${adj} ${issue22.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Massa gran: s'esperava que ${issue22.origin ?? "el valor"} fos ${adj} ${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Massa petit: s'esperava que ${issue22.origin} contingu\xE9s ${adj} ${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Massa petit: s'esperava que ${issue22.origin} fos ${adj} ${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Format inv\xE0lid: ha d'acabar amb "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Format inv\xE0lid: ha d'incloure "${_issue.includes}"`; - if (_issue.format === "regex") - return `Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${_issue.pattern}`; - return `Format inv\xE0lid per a ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue22.divisor}`; - case "unrecognized_keys": - return `Clau${issue22.keys.length > 1 ? "s" : ""} no reconeguda${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Clau inv\xE0lida a ${issue22.origin}`; - case "invalid_union": - return "Entrada inv\xE0lida"; - // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general - case "invalid_element": - return `Element inv\xE0lid a ${issue22.origin}`; - default: - return `Entrada inv\xE0lida`; - } - }; -}; -function ca_default3() { - return { - localeError: error510() - }; -} -var error610 = () => { - const Sizable = { - string: { unit: "znak\u016F", verb: "m\xEDt" }, - file: { unit: "bajt\u016F", verb: "m\xEDt" }, - array: { unit: "prvk\u016F", verb: "m\xEDt" }, - set: { unit: "prvk\u016F", verb: "m\xEDt" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "regul\xE1rn\xED v\xFDraz", - email: "e-mailov\xE1 adresa", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "datum a \u010Das ve form\xE1tu ISO", - date: "datum ve form\xE1tu ISO", - time: "\u010Das ve form\xE1tu ISO", - duration: "doba trv\xE1n\xED ISO", - ipv4: "IPv4 adresa", - ipv6: "IPv6 adresa", - cidrv4: "rozsah IPv4", - cidrv6: "rozsah IPv6", - base64: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64", - base64url: "\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url", - json_string: "\u0159et\u011Bzec ve form\xE1tu JSON", - e164: "\u010D\xEDslo E.164", - jwt: "JWT", - template_literal: "vstup" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u010D\xEDslo", - string: "\u0159et\u011Bzec", - function: "funkce", - array: "pole" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${issue22.expected}, obdr\u017Eeno ${received}`; - } - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${expected}, obdr\u017Eeno ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive3(issue22.values[0])}`; - return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue22.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; - } - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue22.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue22.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue22.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; - } - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue22.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${_issue.pattern}`; - return `Neplatn\xFD form\xE1t ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue22.divisor}`; - case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue22.origin}`; - case "invalid_union": - return "Neplatn\xFD vstup"; - case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue22.origin}`; - default: - return `Neplatn\xFD vstup`; - } - }; -}; -function cs_default3() { - return { - localeError: error610() - }; -} -var error710 = () => { - const Sizable = { - string: { unit: "tegn", verb: "havde" }, - file: { unit: "bytes", verb: "havde" }, - array: { unit: "elementer", verb: "indeholdt" }, - set: { unit: "elementer", verb: "indeholdt" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "e-mailadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkesl\xE6t", - date: "ISO-dato", - time: "ISO-klokkesl\xE6t", - duration: "ISO-varighed", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodet streng", - base64url: "base64url-kodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - string: "streng", - number: "tal", - boolean: "boolean", - array: "liste", - object: "objekt", - set: "s\xE6t", - file: "fil" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Ugyldigt input: forventede instanceof ${issue22.expected}, fik ${received}`; - } - return `Ugyldigt input: forventede ${expected}, fik ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Ugyldig v\xE6rdi: forventede ${stringifyPrimitive3(issue22.values[0])}`; - return `Ugyldigt valg: forventede en af f\xF8lgende ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - if (sizing) - return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue22.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - if (sizing) { - return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue22.minimum.toString()} ${sizing.unit}`; - } - return `For lille: forventede ${origin2} havde ${adj} ${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Ugyldig streng: skal starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: skal ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ugyldig streng: skal indeholde "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ugyldig streng: skal matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Ugyldigt tal: skal v\xE6re deleligt med ${issue22.divisor}`; - case "unrecognized_keys": - return `${issue22.keys.length > 1 ? "Ukendte n\xF8gler" : "Ukendt n\xF8gle"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8gle i ${issue22.origin}`; - case "invalid_union": - return "Ugyldigt input: matcher ingen af de tilladte typer"; - case "invalid_element": - return `Ugyldig v\xE6rdi i ${issue22.origin}`; - default: - return `Ugyldigt input`; - } - }; -}; -function da_default3() { - return { - localeError: error710() - }; -} -var error810 = () => { - const Sizable = { - string: { unit: "Zeichen", verb: "zu haben" }, - file: { unit: "Bytes", verb: "zu haben" }, - array: { unit: "Elemente", verb: "zu haben" }, - set: { unit: "Elemente", verb: "zu haben" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "Eingabe", - email: "E-Mail-Adresse", - url: "URL", - emoji: "Emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-Datum und -Uhrzeit", - date: "ISO-Datum", - time: "ISO-Uhrzeit", - duration: "ISO-Dauer", - ipv4: "IPv4-Adresse", - ipv6: "IPv6-Adresse", - cidrv4: "IPv4-Bereich", - cidrv6: "IPv6-Bereich", - base64: "Base64-codierter String", - base64url: "Base64-URL-codierter String", - json_string: "JSON-String", - e164: "E.164-Nummer", - jwt: "JWT", - template_literal: "Eingabe" - }; - const TypeDictionary = { - nan: "NaN", - number: "Zahl", - array: "Array" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Ung\xFCltige Eingabe: erwartet instanceof ${issue22.expected}, erhalten ${received}`; - } - return `Ung\xFCltige Eingabe: erwartet ${expected}, erhalten ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive3(issue22.values[0])}`; - return `Ung\xFCltige Option: erwartet eine von ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Zu gro\xDF: erwartet, dass ${issue22.origin ?? "Wert"} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; - return `Zu gro\xDF: erwartet, dass ${issue22.origin ?? "Wert"} ${adj}${issue22.maximum.toString()} ist`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Zu klein: erwartet, dass ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit} hat`; - } - return `Zu klein: erwartet, dass ${issue22.origin} ${adj}${issue22.minimum.toString()} ist`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; - if (_issue.format === "ends_with") - return `Ung\xFCltiger String: muss mit "${_issue.suffix}" enden`; - if (_issue.format === "includes") - return `Ung\xFCltiger String: muss "${_issue.includes}" enthalten`; - if (_issue.format === "regex") - return `Ung\xFCltiger String: muss dem Muster ${_issue.pattern} entsprechen`; - return `Ung\xFCltig: ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue22.divisor} sein`; - case "unrecognized_keys": - return `${issue22.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue22.origin}`; - case "invalid_union": - return "Ung\xFCltige Eingabe"; - case "invalid_element": - return `Ung\xFCltiger Wert in ${issue22.origin}`; - default: - return `Ung\xFCltige Eingabe`; - } - }; -}; -function de_default3() { - return { - localeError: error810() - }; -} -var error910 = () => { - const Sizable = { - string: { unit: "characters", verb: "to have" }, - file: { unit: "bytes", verb: "to have" }, - array: { unit: "items", verb: "to have" }, - set: { unit: "items", verb: "to have" }, - map: { unit: "entries", verb: "to have" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "email address", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datetime", - date: "ISO date", - time: "ISO time", - duration: "ISO duration", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - mac: "MAC address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded string", - base64url: "base64url-encoded string", - json_string: "JSON string", - e164: "E.164 number", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - // Compatibility: "nan" -> "NaN" for display - nan: "NaN" - // All other type names omitted - they fall back to raw values via ?? operator - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - return `Invalid input: expected ${expected}, received ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive3(issue22.values[0])}`; - return `Invalid option: expected one of ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Too big: expected ${issue22.origin ?? "value"} to have ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue22.origin ?? "value"} to be ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Too small: expected ${issue22.origin} to have ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Too small: expected ${issue22.origin} to be ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Invalid string: must start with "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Invalid string: must end with "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Invalid string: must include "${_issue.includes}"`; - if (_issue.format === "regex") - return `Invalid string: must match pattern ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue22.divisor}`; - case "unrecognized_keys": - return `Unrecognized key${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Invalid key in ${issue22.origin}`; - case "invalid_union": - return "Invalid input"; - case "invalid_element": - return `Invalid value in ${issue22.origin}`; - default: - return `Invalid input`; - } - }; -}; -function en_default3() { - return { - localeError: error910() - }; -} -var error102 = () => { +// node_modules/zod/v4/locales/uk.js +var error92 = () => { const Sizable = { - string: { unit: "karaktrojn", verb: "havi" }, - file: { unit: "bajtojn", verb: "havi" }, - array: { unit: "elementojn", verb: "havi" }, - set: { unit: "elementojn", verb: "havi" } + string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, + set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "enigo", - email: "retadreso", + regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", + email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", url: "URL", - emoji: "emo\u011Dio", + emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -76836,351 +66297,221 @@ var error102 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO-datotempo", - date: "ISO-dato", - time: "ISO-tempo", - duration: "ISO-da\u016Dro", - ipv4: "IPv4-adreso", - ipv6: "IPv6-adreso", - cidrv4: "IPv4-rango", - cidrv6: "IPv6-rango", - base64: "64-ume kodita karaktraro", - base64url: "URL-64-ume kodita karaktraro", - json_string: "JSON-karaktraro", - e164: "E.164-nombro", + datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", + date: "\u0434\u0430\u0442\u0430 ISO", + time: "\u0447\u0430\u0441 ISO", + duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", + ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", + ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", + cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", + cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", + base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", + base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", + json_string: "\u0440\u044F\u0434\u043E\u043A JSON", + e164: "\u043D\u043E\u043C\u0435\u0440 E.164", jwt: "JWT", - template_literal: "enigo" + template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" }; const TypeDictionary = { nan: "NaN", - number: "nombro", - array: "tabelo", - null: "senvalora" + number: "\u0447\u0438\u0441\u043B\u043E", + array: "\u043C\u0430\u0441\u0438\u0432" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Nevalida enigo: atendi\u011Dis instanceof ${issue22.expected}, ricevi\u011Dis ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue4.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; } - return `Nevalida enigo: atendi\u011Dis ${expected}, ricevi\u011Dis ${received}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; } case "invalid_value": - if (issue22.values.length === 1) - return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive3(issue22.values[0])}`; - return `Nevalida opcio: atendi\u011Dis unu el ${joinValues3(issue22.values, "|")}`; + if (issue4.values.length === 1) + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive2(issue4.values[0])}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues2(issue4.values, "|")}`; case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `Tro granda: atendi\u011Dis ke ${issue22.origin ?? "valoro"} havu ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementojn"}`; - return `Tro granda: atendi\u011Dis ke ${issue22.origin ?? "valoro"} havu ${adj}${issue22.maximum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue22.origin} havu ${adj}${issue22.minimum.toString()} ${sizing.unit}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - return `Tro malgranda: atendi\u011Dis ke ${issue22.origin} estu ${adj}${issue22.minimum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue4.origin} \u0431\u0443\u0434\u0435 ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue22; + const _issue = issue4; if (_issue.format === "starts_with") - return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; if (_issue.format === "ends_with") - return `Nevalida karaktraro: devas fini\u011Di per "${_issue.suffix}"`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; if (_issue.format === "includes") - return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; if (_issue.format === "regex") - return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; - return `Nevalida ${FormatDictionary[_issue.format] ?? issue22.format}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue22.divisor}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue4.divisor}`; case "unrecognized_keys": - return `Nekonata${issue22.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue22.keys.length > 1 ? "j" : ""}: ${joinValues3(issue22.keys, ", ")}`; + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue4.keys.length > 1 ? "\u0456" : ""}: ${joinValues2(issue4.keys, ", ")}`; case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue22.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue4.origin}`; case "invalid_union": - return "Nevalida enigo"; + return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; case "invalid_element": - return `Nevalida valoro en ${issue22.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue4.origin}`; default: - return `Nevalida enigo`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; } }; }; -function eo_default3() { +function uk_default2() { return { - localeError: error102() + localeError: error92() }; } -var error112 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "tener" }, - file: { unit: "bytes", verb: "tener" }, - array: { unit: "elementos", verb: "tener" }, - set: { unit: "elementos", verb: "tener" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "entrada", - email: "direcci\xF3n de correo electr\xF3nico", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "fecha y hora ISO", - date: "fecha ISO", - time: "hora ISO", - duration: "duraci\xF3n ISO", - ipv4: "direcci\xF3n IPv4", - ipv6: "direcci\xF3n IPv6", - cidrv4: "rango IPv4", - cidrv6: "rango IPv6", - base64: "cadena codificada en base64", - base64url: "URL codificada en base64", - json_string: "cadena JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN", - string: "texto", - number: "n\xFAmero", - boolean: "booleano", - array: "arreglo", - object: "objeto", - set: "conjunto", - file: "archivo", - date: "fecha", - bigint: "n\xFAmero grande", - symbol: "s\xEDmbolo", - undefined: "indefinido", - null: "nulo", - function: "funci\xF3n", - map: "mapa", - record: "registro", - tuple: "tupla", - enum: "enumeraci\xF3n", - union: "uni\xF3n", - literal: "literal", - promise: "promesa", - void: "vac\xEDo", - never: "nunca", - unknown: "desconocido", - any: "cualquiera" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Entrada inv\xE1lida: se esperaba instanceof ${issue22.expected}, recibido ${received}`; - } - return `Entrada inv\xE1lida: se esperaba ${expected}, recibido ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive3(issue22.values[0])}`; - return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - if (sizing) - return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - if (sizing) { - return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Cadena inv\xE1lida: debe terminar en "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Cadena inv\xE1lida: debe incluir "${_issue.includes}"`; - if (_issue.format === "regex") - return `Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${_issue.pattern}`; - return `Inv\xE1lido ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue22.divisor}`; - case "unrecognized_keys": - return `Llave${issue22.keys.length > 1 ? "s" : ""} desconocida${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Llave inv\xE1lida en ${TypeDictionary[issue22.origin] ?? issue22.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido en ${TypeDictionary[issue22.origin] ?? issue22.origin}`; - default: - return `Entrada inv\xE1lida`; - } - }; -}; -function es_default3() { - return { - localeError: error112() - }; + +// node_modules/zod/v4/locales/ua.js +function ua_default2() { + return uk_default2(); } -var error122 = () => { + +// node_modules/zod/v4/locales/ur.js +var error93 = () => { const Sizable = { - string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, - set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" } + string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, + file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, + array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, + set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "\u0648\u0631\u0648\u062F\u06CC", - email: "\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644", - url: "URL", + regex: "\u0627\u0646 \u067E\u0679", + email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", + url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - date: "\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648", - time: "\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - duration: "\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648", - ipv4: "IPv4 \u0622\u062F\u0631\u0633", - ipv6: "IPv6 \u0622\u062F\u0631\u0633", - cidrv4: "IPv4 \u062F\u0627\u0645\u0646\u0647", - cidrv6: "IPv6 \u062F\u0627\u0645\u0646\u0647", - base64: "base64-encoded \u0631\u0634\u062A\u0647", - base64url: "base64url-encoded \u0631\u0634\u062A\u0647", - json_string: "JSON \u0631\u0634\u062A\u0647", - e164: "E.164 \u0639\u062F\u062F", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u06CC" + uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", + uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", + nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", + guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", + ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", + xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", + ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", + datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", + date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", + time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", + duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", + ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", + ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", + cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", + cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", + base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", + json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", + e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", + jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", + template_literal: "\u0627\u0646 \u067E\u0679" }; const TypeDictionary = { nan: "NaN", - number: "\u0639\u062F\u062F", - array: "\u0622\u0631\u0627\u06CC\u0647" + number: "\u0646\u0645\u0628\u0631", + array: "\u0622\u0631\u06D2", + null: "\u0646\u0644" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${issue22.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue4.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; } - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${received} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; } case "invalid_value": - if (issue22.values.length === 1) { - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${stringifyPrimitive3(issue22.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; - } - return `\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${joinValues3(issue22.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; + if (issue4.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive2(issue4.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues2(issue4.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue22.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; - } - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue22.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue22.maximum.toString()} \u0628\u0627\u0634\u062F`; + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue4.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue4.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue4.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue22.origin} \u0628\u0627\u06CC\u062F ${adj}${issue22.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue4.origin} \u06A9\u06D2 ${adj}${issue4.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; } - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue22.origin} \u0628\u0627\u06CC\u062F ${adj}${issue22.minimum.toString()} \u0628\u0627\u0634\u062F`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue4.origin} \u06A9\u0627 ${adj}${issue4.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "invalid_format": { - const _issue = issue22; + const _issue = issue4; if (_issue.format === "starts_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`; - } - if (_issue.format === "ends_with") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${_issue.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`; - } - if (_issue.format === "includes") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${_issue.includes}" \u0628\u0627\u0634\u062F`; - } - if (_issue.format === "regex") { - return `\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${_issue.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`; + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; } - return `${FormatDictionary[_issue.format] ?? issue22.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + if (_issue.format === "ends_with") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "includes") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + if (_issue.format === "regex") + return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue22.divisor} \u0628\u0627\u0634\u062F`; + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue4.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue22.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues3(issue22.keys, ", ")}`; + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue4.keys.length > 1 ? "\u0632" : ""}: ${joinValues2(issue4.keys, "\u060C ")}`; case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue22.origin}`; + return `${issue4.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; case "invalid_union": - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; case "invalid_element": - return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue22.origin}`; + return `${issue4.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; default: - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; } }; }; -function fa_default3() { +function ur_default2() { return { - localeError: error122() + localeError: error93() }; } -var error132 = () => { + +// node_modules/zod/v4/locales/uz.js +var error94 = () => { const Sizable = { - string: { unit: "merkki\xE4", subject: "merkkijonon" }, - file: { unit: "tavua", subject: "tiedoston" }, - array: { unit: "alkiota", subject: "listan" }, - set: { unit: "alkiota", subject: "joukon" }, - number: { unit: "", subject: "luvun" }, - bigint: { unit: "", subject: "suuren kokonaisluvun" }, - int: { unit: "", subject: "kokonaisluvun" }, - date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" } + string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, + file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, + array: { unit: "element", verb: "bo\u2018lishi kerak" }, + set: { unit: "element", verb: "bo\u2018lishi kerak" }, + map: { unit: "yozuv", verb: "bo\u2018lishi kerak" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "s\xE4\xE4nn\xF6llinen lauseke", - email: "s\xE4hk\xF6postiosoite", - url: "URL-osoite", + regex: "kirish", + email: "elektron pochta manzili", + url: "URL", emoji: "emoji", uuid: "UUID", uuidv4: "UUIDv4", @@ -77192,101 +66523,104 @@ var error132 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO-aikaleima", - date: "ISO-p\xE4iv\xE4m\xE4\xE4r\xE4", - time: "ISO-aika", - duration: "ISO-kesto", - ipv4: "IPv4-osoite", - ipv6: "IPv6-osoite", - cidrv4: "IPv4-alue", - cidrv6: "IPv6-alue", - base64: "base64-koodattu merkkijono", - base64url: "base64url-koodattu merkkijono", - json_string: "JSON-merkkijono", - e164: "E.164-luku", + datetime: "ISO sana va vaqti", + date: "ISO sana", + time: "ISO vaqt", + duration: "ISO davomiylik", + ipv4: "IPv4 manzil", + ipv6: "IPv6 manzil", + mac: "MAC manzil", + cidrv4: "IPv4 diapazon", + cidrv6: "IPv6 diapazon", + base64: "base64 kodlangan satr", + base64url: "base64url kodlangan satr", + json_string: "JSON satr", + e164: "E.164 raqam", jwt: "JWT", - template_literal: "templaattimerkkijono" + template_literal: "kirish" }; const TypeDictionary = { - nan: "NaN" + nan: "NaN", + number: "raqam", + array: "massiv" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Virheellinen tyyppi: odotettiin instanceof ${issue22.expected}, oli ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue4.expected}, qabul qilingan ${received}`; } - return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`; + return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; } case "invalid_value": - if (issue22.values.length === 1) - return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive3(issue22.values[0])}`; - return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues3(issue22.values, "|")}`; + if (issue4.values.length === 1) + return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive2(issue4.values[0])}`; + return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues2(issue4.values, "|")}`; case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue22.maximum.toString()} ${sizing.unit}`.trim(); - } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue22.maximum.toString()}`; + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `Juda katta: kutilgan ${issue4.origin ?? "qiymat"} ${adj}${issue4.maximum.toString()} ${sizing.unit} ${sizing.verb}`; + return `Juda katta: kutilgan ${issue4.origin ?? "qiymat"} ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue22.minimum.toString()} ${sizing.unit}`.trim(); + return `Juda kichik: kutilgan ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit} ${sizing.verb}`; } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue22.minimum.toString()}`; + return `Juda kichik: kutilgan ${issue4.origin} ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue22; + const _issue = issue4; if (_issue.format === "starts_with") - return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; + return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; if (_issue.format === "ends_with") - return `Virheellinen sy\xF6te: t\xE4ytyy loppua "${_issue.suffix}"`; + return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; if (_issue.format === "includes") - return `Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${_issue.includes}"`; - if (_issue.format === "regex") { - return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; - } - return `Virheellinen ${FormatDictionary[_issue.format] ?? issue22.format}`; + return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; + if (_issue.format === "regex") + return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; + return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue22.divisor} monikerta`; + return `Noto\u2018g\u2018ri raqam: ${issue4.divisor} ning karralisi bo\u2018lishi kerak`; case "unrecognized_keys": - return `${issue22.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues3(issue22.keys, ", ")}`; + return `Noma\u2019lum kalit${issue4.keys.length > 1 ? "lar" : ""}: ${joinValues2(issue4.keys, ", ")}`; case "invalid_key": - return "Virheellinen avain tietueessa"; + return `${issue4.origin} dagi kalit noto\u2018g\u2018ri`; case "invalid_union": - return "Virheellinen unioni"; + return "Noto\u2018g\u2018ri kirish"; case "invalid_element": - return "Virheellinen arvo joukossa"; + return `${issue4.origin} da noto\u2018g\u2018ri qiymat`; default: - return `Virheellinen sy\xF6te`; + return `Noto\u2018g\u2018ri kirish`; } }; }; -function fi_default3() { +function uz_default2() { return { - localeError: error132() + localeError: error94() }; } -var error142 = () => { + +// node_modules/zod/v4/locales/vi.js +var error95 = () => { const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } + string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, + file: { unit: "byte", verb: "c\xF3" }, + array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, + set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "entr\xE9e", - email: "adresse e-mail", + regex: "\u0111\u1EA7u v\xE0o", + email: "\u0111\u1ECBa ch\u1EC9 email", url: "URL", emoji: "emoji", uuid: "UUID", @@ -77299,103 +66633,105 @@ var error142 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "date et heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", + datetime: "ng\xE0y gi\u1EDD ISO", + date: "ng\xE0y ISO", + time: "gi\u1EDD ISO", + duration: "kho\u1EA3ng th\u1EDDi gian ISO", + ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", + ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", + cidrv4: "d\u1EA3i IPv4", + cidrv6: "d\u1EA3i IPv6", + base64: "chu\u1ED7i m\xE3 h\xF3a base64", + base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", + json_string: "chu\u1ED7i JSON", + e164: "s\u1ED1 E.164", jwt: "JWT", - template_literal: "entr\xE9e" + template_literal: "\u0111\u1EA7u v\xE0o" }; const TypeDictionary = { nan: "NaN", - number: "nombre", - array: "tableau" + number: "s\u1ED1", + array: "m\u1EA3ng" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Entr\xE9e invalide : instanceof ${issue22.expected} attendu, ${received} re\xE7u`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue4.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; } - return `Entr\xE9e invalide : ${expected} attendu, ${received} re\xE7u`; + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; } case "invalid_value": - if (issue22.values.length === 1) - return `Entr\xE9e invalide : ${stringifyPrimitive3(issue22.values[0])} attendu`; - return `Option invalide : une valeur parmi ${joinValues3(issue22.values, "|")} attendue`; + if (issue4.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive2(issue4.values[0])}`; + return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues2(issue4.values, "|")}`; case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `Trop grand : ${issue22.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; - return `Trop grand : ${issue22.origin ?? "valeur"} doit \xEAtre ${adj}${issue22.maximum.toString()}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue4.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue4.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `Trop petit : ${issue22.origin} doit ${sizing.verb} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : ${issue22.origin} doit \xEAtre ${adj}${issue22.minimum.toString()}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue4.origin} ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue22; + const _issue = issue4; if (_issue.format === "starts_with") - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; if (_issue.format === "includes") - return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; if (_issue.format === "regex") - return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} invalide`; + return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; + return `${FormatDictionary[_issue.format] ?? issue4.format} kh\xF4ng h\u1EE3p l\u1EC7`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue22.divisor}`; + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue4.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue22.keys.length > 1 ? "s" : ""} non reconnue${issue22.keys.length > 1 ? "s" : ""} : ${joinValues3(issue22.keys, ", ")}`; + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues2(issue4.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue22.origin}`; + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue4.origin}`; case "invalid_union": - return "Entr\xE9e invalide"; + return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; case "invalid_element": - return `Valeur invalide dans ${issue22.origin}`; + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue4.origin}`; default: - return `Entr\xE9e invalide`; + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; } }; }; -function fr_default3() { +function vi_default2() { return { - localeError: error142() + localeError: error95() }; } -var error152 = () => { + +// node_modules/zod/v4/locales/zh-CN.js +var error96 = () => { const Sizable = { - string: { unit: "caract\xE8res", verb: "avoir" }, - file: { unit: "octets", verb: "avoir" }, - array: { unit: "\xE9l\xE9ments", verb: "avoir" }, - set: { unit: "\xE9l\xE9ments", verb: "avoir" } + string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, + file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, + array: { unit: "\u9879", verb: "\u5305\u542B" }, + set: { unit: "\u9879", verb: "\u5305\u542B" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "entr\xE9e", - email: "adresse courriel", + regex: "\u8F93\u5165", + email: "\u7535\u5B50\u90AE\u4EF6", url: "URL", - emoji: "emoji", + emoji: "\u8868\u60C5\u7B26\u53F7", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -77406,293 +66742,104 @@ var error152 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "date-heure ISO", - date: "date ISO", - time: "heure ISO", - duration: "dur\xE9e ISO", - ipv4: "adresse IPv4", - ipv6: "adresse IPv6", - cidrv4: "plage IPv4", - cidrv6: "plage IPv6", - base64: "cha\xEEne encod\xE9e en base64", - base64url: "cha\xEEne encod\xE9e en base64url", - json_string: "cha\xEEne JSON", - e164: "num\xE9ro E.164", + datetime: "ISO\u65E5\u671F\u65F6\u95F4", + date: "ISO\u65E5\u671F", + time: "ISO\u65F6\u95F4", + duration: "ISO\u65F6\u957F", + ipv4: "IPv4\u5730\u5740", + ipv6: "IPv6\u5730\u5740", + cidrv4: "IPv4\u7F51\u6BB5", + cidrv6: "IPv6\u7F51\u6BB5", + base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", + base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", + json_string: "JSON\u5B57\u7B26\u4E32", + e164: "E.164\u53F7\u7801", jwt: "JWT", - template_literal: "entr\xE9e" + template_literal: "\u8F93\u5165" }; const TypeDictionary = { - nan: "NaN" + nan: "NaN", + number: "\u6570\u5B57", + array: "\u6570\u7EC4", + null: "\u7A7A\u503C(null)" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Entr\xE9e invalide : attendu instanceof ${issue22.expected}, re\xE7u ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue4.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; } - return `Entr\xE9e invalide : attendu ${expected}, re\xE7u ${received}`; + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; } case "invalid_value": - if (issue22.values.length === 1) - return `Entr\xE9e invalide : attendu ${stringifyPrimitive3(issue22.values[0])}`; - return `Option invalide : attendu l'une des valeurs suivantes ${joinValues3(issue22.values, "|")}`; + if (issue4.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive2(issue4.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues2(issue4.values, "|")}`; case "too_big": { - const adj = issue22.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `Trop grand : attendu que ${issue22.origin ?? "la valeur"} ait ${adj}${issue22.maximum.toString()} ${sizing.unit}`; - return `Trop grand : attendu que ${issue22.origin ?? "la valeur"} soit ${adj}${issue22.maximum.toString()}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue4.origin ?? "\u503C"} ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue4.origin ?? "\u503C"} ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue22.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `Trop petit : attendu que ${issue22.origin} ait ${adj}${issue22.minimum.toString()} ${sizing.unit}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue4.origin} ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : attendu que ${issue22.origin} soit ${adj}${issue22.minimum.toString()}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue4.origin} ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; - } + const _issue = issue4; + if (_issue.format === "starts_with") + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; if (_issue.format === "ends_with") - return `Cha\xEEne invalide : doit se terminer par "${_issue.suffix}"`; + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; if (_issue.format === "includes") - return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; if (_issue.format === "regex") - return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} invalide`; + return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; + return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue22.divisor}`; + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue4.divisor} \u7684\u500D\u6570`; case "unrecognized_keys": - return `Cl\xE9${issue22.keys.length > 1 ? "s" : ""} non reconnue${issue22.keys.length > 1 ? "s" : ""} : ${joinValues3(issue22.keys, ", ")}`; + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues2(issue4.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue22.origin}`; + return `${issue4.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; case "invalid_union": - return "Entr\xE9e invalide"; + return "\u65E0\u6548\u8F93\u5165"; case "invalid_element": - return `Valeur invalide dans ${issue22.origin}`; - default: - return `Entr\xE9e invalide`; - } - }; -}; -function fr_CA_default3() { - return { - localeError: error152() - }; -} -var error162 = () => { - const TypeNames = { - string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" }, - number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" }, - boolean: { label: "\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9", gender: "m" }, - bigint: { label: "BigInt", gender: "m" }, - date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA", gender: "m" }, - array: { label: "\u05DE\u05E2\u05E8\u05DA", gender: "m" }, - object: { label: "\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8", gender: "m" }, - null: { label: "\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)", gender: "m" }, - undefined: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)", gender: "m" }, - symbol: { label: "\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)", gender: "m" }, - function: { label: "\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4", gender: "f" }, - map: { label: "\u05DE\u05E4\u05D4 (Map)", gender: "f" }, - set: { label: "\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)", gender: "f" }, - file: { label: "\u05E7\u05D5\u05D1\u05E5", gender: "m" }, - promise: { label: "Promise", gender: "m" }, - NaN: { label: "NaN", gender: "m" }, - unknown: { label: "\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2", gender: "m" }, - value: { label: "\u05E2\u05E8\u05DA", gender: "m" } - }; - const Sizable = { - string: { unit: "\u05EA\u05D5\u05D5\u05D9\u05DD", shortLabel: "\u05E7\u05E6\u05E8", longLabel: "\u05D0\u05E8\u05D5\u05DA" }, - file: { unit: "\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - array: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - set: { unit: "\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }, - number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" } - // no unit - }; - const typeEntry = (t) => t ? TypeNames[t] : void 0; - const typeLabel = (t) => { - const e = typeEntry(t); - if (e) - return e.label; - return t ?? TypeNames.unknown.label; - }; - const withDefinite = (t) => `\u05D4${typeLabel(t)}`; - const verbFor = (t) => { - const e = typeEntry(t); - const gender = e?.gender ?? "m"; - return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"; - }; - const getSizing = (origin2) => { - if (!origin2) - return null; - return Sizable[origin2] ?? null; - }; - const FormatDictionary = { - regex: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - email: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC", gender: "f" }, - url: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA", gender: "f" }, - emoji: { label: "\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9", gender: "m" }, - uuid: { label: "UUID", gender: "m" }, - nanoid: { label: "nanoid", gender: "m" }, - guid: { label: "GUID", gender: "m" }, - cuid: { label: "cuid", gender: "m" }, - cuid2: { label: "cuid2", gender: "m" }, - ulid: { label: "ULID", gender: "m" }, - xid: { label: "XID", gender: "m" }, - ksuid: { label: "KSUID", gender: "m" }, - datetime: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO", gender: "m" }, - date: { label: "\u05EA\u05D0\u05E8\u05D9\u05DA ISO", gender: "m" }, - time: { label: "\u05D6\u05DE\u05DF ISO", gender: "m" }, - duration: { label: "\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO", gender: "m" }, - ipv4: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv4", gender: "f" }, - ipv6: { label: "\u05DB\u05EA\u05D5\u05D1\u05EA IPv6", gender: "f" }, - cidrv4: { label: "\u05D8\u05D5\u05D5\u05D7 IPv4", gender: "m" }, - cidrv6: { label: "\u05D8\u05D5\u05D5\u05D7 IPv6", gender: "m" }, - base64: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64", gender: "f" }, - base64url: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA", gender: "f" }, - json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" }, - e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" }, - jwt: { label: "JWT", gender: "m" }, - ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - includes: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - lowercase: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - starts_with: { label: "\u05E7\u05DC\u05D8", gender: "m" }, - uppercase: { label: "\u05E7\u05DC\u05D8", gender: "m" } - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expectedKey = issue22.expected; - const expected = TypeDictionary[expectedKey ?? ""] ?? typeLabel(expectedKey); - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${issue22.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; - } - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${received}`; - } - case "invalid_value": { - if (issue22.values.length === 1) { - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${stringifyPrimitive3(issue22.values[0])}`; - } - const stringified = issue22.values.map((v) => stringifyPrimitive3(v)); - if (issue22.values.length === 2) { - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${stringified[0]} \u05D0\u05D5 ${stringified[1]}`; - } - const lastValue = stringified[stringified.length - 1]; - const restValues = stringified.slice(0, -1).join(", "); - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${restValues} \u05D0\u05D5 ${lastValue}`; - } - case "too_big": { - const sizing = getSizing(issue22.origin); - const subject = withDefinite(issue22.origin ?? "value"); - if (issue22.origin === "string") { - return `${sizing?.longLabel ?? "\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue22.maximum.toString()} ${sizing?.unit ?? ""} ${issue22.inclusive ? "\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA" : "\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim(); - } - if (issue22.origin === "number") { - const comparison = issue22.inclusive ? `\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue22.maximum}` : `\u05E7\u05D8\u05DF \u05DE-${issue22.maximum}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; - } - if (issue22.origin === "array" || issue22.origin === "set") { - const verb = issue22.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; - const comparison = issue22.inclusive ? `${issue22.maximum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA` : `\u05E4\u05D7\u05D5\u05EA \u05DE-${issue22.maximum} ${sizing?.unit ?? ""}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); - } - const adj = issue22.inclusive ? "<=" : "<"; - const be = verbFor(issue22.origin ?? "value"); - if (sizing?.unit) { - return `${sizing.longLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue22.maximum.toString()} ${sizing.unit}`; - } - return `${sizing?.longLabel ?? "\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const sizing = getSizing(issue22.origin); - const subject = withDefinite(issue22.origin ?? "value"); - if (issue22.origin === "string") { - return `${sizing?.shortLabel ?? "\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${issue22.minimum.toString()} ${sizing?.unit ?? ""} ${issue22.inclusive ? "\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8" : "\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim(); - } - if (issue22.origin === "number") { - const comparison = issue22.inclusive ? `\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${issue22.minimum}` : `\u05D2\u05D3\u05D5\u05DC \u05DE-${issue22.minimum}`; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${comparison}`; - } - if (issue22.origin === "array" || issue22.origin === "set") { - const verb = issue22.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA"; - if (issue22.minimum === 1 && issue22.inclusive) { - const singularPhrase = issue22.origin === "set" ? "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3" : "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3"; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${singularPhrase}`; - } - const comparison = issue22.inclusive ? `${issue22.minimum} ${sizing?.unit ?? ""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8` : `\u05D9\u05D5\u05EA\u05E8 \u05DE-${issue22.minimum} ${sizing?.unit ?? ""}`; - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${subject} ${verb} \u05DC\u05D4\u05DB\u05D9\u05DC ${comparison}`.trim(); - } - const adj = issue22.inclusive ? ">=" : ">"; - const be = verbFor(issue22.origin ?? "value"); - if (sizing?.unit) { - return `${sizing.shortLabel} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `${sizing?.shortLabel ?? "\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${subject} ${be} ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; - const nounEntry = FormatDictionary[_issue.format]; - const noun = nounEntry?.label ?? _issue.format; - const gender = nounEntry?.gender ?? "m"; - const adjective = gender === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF"; - return `${noun} \u05DC\u05D0 ${adjective}`; - } - case "not_multiple_of": - return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${issue22.divisor}`; - case "unrecognized_keys": - return `\u05DE\u05E4\u05EA\u05D7${issue22.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue22.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": { - return `\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8`; - } - case "invalid_union": - return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; - case "invalid_element": { - const place = withDefinite(issue22.origin ?? "array"); - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${place}`; - } + return `${issue4.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; default: - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + return `\u65E0\u6548\u8F93\u5165`; } }; }; -function he_default3() { +function zh_CN_default2() { return { - localeError: error162() + localeError: error96() }; } -var error172 = () => { + +// node_modules/zod/v4/locales/zh-TW.js +var error97 = () => { const Sizable = { - string: { unit: "karakter", verb: "legyen" }, - file: { unit: "byte", verb: "legyen" }, - array: { unit: "elem", verb: "legyen" }, - set: { unit: "elem", verb: "legyen" } + string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, + file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, + array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, + set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } const FormatDictionary = { - regex: "bemenet", - email: "email c\xEDm", + regex: "\u8F38\u5165", + email: "\u90F5\u4EF6\u5730\u5740", url: "URL", emoji: "emoji", uuid: "UUID", @@ -77705,137 +66852,104 @@ var error172 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO id\u0151b\xE9lyeg", - date: "ISO d\xE1tum", - time: "ISO id\u0151", - duration: "ISO id\u0151intervallum", - ipv4: "IPv4 c\xEDm", - ipv6: "IPv6 c\xEDm", - cidrv4: "IPv4 tartom\xE1ny", - cidrv6: "IPv6 tartom\xE1ny", - base64: "base64-k\xF3dolt string", - base64url: "base64url-k\xF3dolt string", - json_string: "JSON string", - e164: "E.164 sz\xE1m", + datetime: "ISO \u65E5\u671F\u6642\u9593", + date: "ISO \u65E5\u671F", + time: "ISO \u6642\u9593", + duration: "ISO \u671F\u9593", + ipv4: "IPv4 \u4F4D\u5740", + ipv6: "IPv6 \u4F4D\u5740", + cidrv4: "IPv4 \u7BC4\u570D", + cidrv6: "IPv6 \u7BC4\u570D", + base64: "base64 \u7DE8\u78BC\u5B57\u4E32", + base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", + json_string: "JSON \u5B57\u4E32", + e164: "E.164 \u6578\u503C", jwt: "JWT", - template_literal: "bemenet" + template_literal: "\u8F38\u5165" }; const TypeDictionary = { - nan: "NaN", - number: "sz\xE1m", - array: "t\xF6mb" + nan: "NaN" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue22.expected}, a kapott \xE9rt\xE9k ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue4.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; } - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`; + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; } case "invalid_value": - if (issue22.values.length === 1) - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive3(issue22.values[0])}`; - return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues3(issue22.values, "|")}`; + if (issue4.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive2(issue4.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues2(issue4.values, "|")}`; case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); if (sizing) - return `T\xFAl nagy: ${issue22.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elem"}`; - return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue22.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue22.maximum.toString()}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue4.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue4.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue4.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue4.maximum.toString()}`; } case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); if (sizing) { - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue22.origin} m\xE9rete t\xFAl kicsi ${adj}${issue22.minimum.toString()} ${sizing.unit}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue4.origin} \u61C9\u70BA ${adj}${issue4.minimum.toString()} ${sizing.unit}`; } - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue22.origin} t\xFAl kicsi ${adj}${issue22.minimum.toString()}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue4.origin} \u61C9\u70BA ${adj}${issue4.minimum.toString()}`; } case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; + const _issue = issue4; + if (_issue.format === "starts_with") { + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; + } if (_issue.format === "ends_with") - return `\xC9rv\xE9nytelen string: "${_issue.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`; + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; if (_issue.format === "includes") - return `\xC9rv\xE9nytelen string: "${_issue.includes}" \xE9rt\xE9ket kell tartalmaznia`; + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; if (_issue.format === "regex") - return `\xC9rv\xE9nytelen string: ${_issue.pattern} mint\xE1nak kell megfelelnie`; - return `\xC9rv\xE9nytelen ${FormatDictionary[_issue.format] ?? issue22.format}`; + return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; + return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue22.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue4.divisor} \u7684\u500D\u6578`; case "unrecognized_keys": - return `Ismeretlen kulcs${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue4.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues2(issue4.keys, "\u3001")}`; case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue22.origin}`; + return `${issue4.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; case "invalid_union": - return "\xC9rv\xE9nytelen bemenet"; + return "\u7121\u6548\u7684\u8F38\u5165\u503C"; case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue22.origin}`; + return `${issue4.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; default: - return `\xC9rv\xE9nytelen bemenet`; + return `\u7121\u6548\u7684\u8F38\u5165\u503C`; } }; }; -function hu_default3() { +function zh_TW_default2() { return { - localeError: error172() + localeError: error97() }; } -function getArmenianPlural3(count, one, many) { - return Math.abs(count) === 1 ? one : many; -} -function withDefiniteArticle3(word) { - if (!word) - return ""; - const vowels = ["\u0561", "\u0565", "\u0568", "\u056B", "\u0578", "\u0578\u0582", "\u0585"]; - const lastChar = word[word.length - 1]; - return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568"); -} -var error182 = () => { + +// node_modules/zod/v4/locales/yo.js +var error98 = () => { const Sizable = { - string: { - unit: { - one: "\u0576\u0577\u0561\u0576", - many: "\u0576\u0577\u0561\u0576\u0576\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - file: { - unit: { - one: "\u0562\u0561\u0575\u0569", - many: "\u0562\u0561\u0575\u0569\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - array: { - unit: { - one: "\u057F\u0561\u0580\u0580", - many: "\u057F\u0561\u0580\u0580\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - }, - set: { - unit: { - one: "\u057F\u0561\u0580\u0580", - many: "\u057F\u0561\u0580\u0580\u0565\u0580" - }, - verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C" - } + string: { unit: "\xE0mi", verb: "n\xED" }, + file: { unit: "bytes", verb: "n\xED" }, + array: { unit: "nkan", verb: "n\xED" }, + set: { unit: "nkan", verb: "n\xED" } }; function getSizing(origin2) { return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "\u0574\u0578\u0582\u057F\u0584", - email: "\u0567\u056C. \u0570\u0561\u057D\u0581\u0565", + const FormatDictionary = { + regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", + email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", url: "URL", - emoji: "\u0567\u0574\u0578\u057B\u056B", + emoji: "emoji", uuid: "UUID", uuidv4: "UUIDv4", uuidv6: "UUIDv6", @@ -77846,7379 +66960,8618 @@ var error182 = () => { ulid: "ULID", xid: "XID", ksuid: "KSUID", - datetime: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574", - date: "ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E", - time: "ISO \u056A\u0561\u0574", - duration: "ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576", - ipv4: "IPv4 \u0570\u0561\u057D\u0581\u0565", - ipv6: "IPv6 \u0570\u0561\u057D\u0581\u0565", - cidrv4: "IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", - cidrv6: "IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584", - base64: "base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", - base64url: "base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572", - json_string: "JSON \u057F\u0578\u0572", - e164: "E.164 \u0570\u0561\u0574\u0561\u0580", + datetime: "\xE0k\xF3k\xF2 ISO", + date: "\u1ECDj\u1ECD\u0301 ISO", + time: "\xE0k\xF3k\xF2 ISO", + duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", + ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", + ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", + cidrv4: "\xE0gb\xE8gb\xE8 IPv4", + cidrv6: "\xE0gb\xE8gb\xE8 IPv6", + base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", + base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", + json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", + e164: "n\u1ECD\u0301mb\xE0 E.164", jwt: "JWT", - template_literal: "\u0574\u0578\u0582\u057F\u0584" + template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" }; const TypeDictionary = { nan: "NaN", - number: "\u0569\u056B\u057E", - array: "\u0566\u0561\u0576\u0563\u057E\u0561\u056E" + number: "n\u1ECD\u0301mb\xE0", + array: "akop\u1ECD" }; - return (issue22) => { - switch (issue22.code) { + return (issue4) => { + switch (issue4.code) { case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); + const expected = TypeDictionary[issue4.expected] ?? issue4.expected; + const receivedType = parsedType2(issue4.input); const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${issue22.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + if (/^[A-Z]/.test(issue4.expected)) { + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue4.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; } - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${received}`; + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; } case "invalid_value": - if (issue22.values.length === 1) - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${stringifyPrimitive3(issue22.values[1])}`; - return `\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${joinValues3(issue22.values, "|")}`; + if (issue4.values.length === 1) + return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive2(issue4.values[0])}`; + return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues2(issue4.values, "|")}`; case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - const maxValue = Number(issue22.maximum); - const unit = getArmenianPlural3(maxValue, sizing.unit.one, sizing.unit.many); - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle3(issue22.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue22.maximum.toString()} ${unit}`; - } - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle3(issue22.origin ?? "\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${adj}${issue22.maximum.toString()}`; + const adj = issue4.inclusive ? "<=" : "<"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue4.origin ?? "iye"} ${sizing.verb} ${adj}${issue4.maximum} ${sizing.unit}`; + return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue4.maximum}`; } case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - const minValue = Number(issue22.minimum); - const unit = getArmenianPlural3(minValue, sizing.unit.one, sizing.unit.many); - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle3(issue22.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${adj}${issue22.minimum.toString()} ${unit}`; - } - return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${withDefiniteArticle3(issue22.origin)} \u056C\u056B\u0576\u056B ${adj}${issue22.minimum.toString()}`; + const adj = issue4.inclusive ? ">=" : ">"; + const sizing = getSizing(issue4.origin); + if (sizing) + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue4.origin} ${sizing.verb} ${adj}${issue4.minimum} ${sizing.unit}`; + return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue4.minimum}`; } case "invalid_format": { - const _issue = issue22; + const _issue = issue4; if (_issue.format === "starts_with") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${_issue.prefix}"-\u0578\u057E`; + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; if (_issue.format === "ends_with") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${_issue.suffix}"-\u0578\u057E`; + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; if (_issue.format === "includes") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${_issue.includes}"`; + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; if (_issue.format === "regex") - return `\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${_issue.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`; - return `\u054D\u056D\u0561\u056C ${FormatDictionary[_issue.format] ?? issue22.format}`; + return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; + return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue4.format}`; } case "not_multiple_of": - return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${issue22.divisor}-\u056B`; + return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue4.divisor}`; case "unrecognized_keys": - return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${issue22.keys.length > 1 ? "\u0576\u0565\u0580" : ""}. ${joinValues3(issue22.keys, ", ")}`; + return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues2(issue4.keys, ", ")}`; case "invalid_key": - return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${withDefiniteArticle3(issue22.origin)}-\u0578\u0582\u0574`; + return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue4.origin}`; case "invalid_union": - return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"; + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; case "invalid_element": - return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${withDefiniteArticle3(issue22.origin)}-\u0578\u0582\u0574`; + return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue4.origin}`; default: - return `\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574`; + return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; } }; }; -function hy_default3() { +function yo_default2() { return { - localeError: error182() + localeError: error98() }; } -var error192 = () => { - const Sizable = { - string: { unit: "karakter", verb: "memiliki" }, - file: { unit: "byte", verb: "memiliki" }, - array: { unit: "item", verb: "memiliki" }, - set: { unit: "item", verb: "memiliki" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "alamat email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tanggal dan waktu format ISO", - date: "tanggal format ISO", - time: "jam format ISO", - duration: "durasi format ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "rentang alamat IPv4", - cidrv6: "rentang alamat IPv6", - base64: "string dengan enkode base64", - base64url: "string dengan enkode base64url", - json_string: "string JSON", - e164: "angka E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Input tidak valid: diharapkan instanceof ${issue22.expected}, diterima ${received}`; - } - return `Input tidak valid: diharapkan ${expected}, diterima ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Input tidak valid: diharapkan ${stringifyPrimitive3(issue22.values[0])}`; - return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Terlalu besar: diharapkan ${issue22.origin ?? "value"} memiliki ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: diharapkan ${issue22.origin ?? "value"} menjadi ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Terlalu kecil: diharapkan ${issue22.origin} memiliki ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: diharapkan ${issue22.origin} menjadi ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak valid: harus berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - return `String tidak valid: harus menyertakan "${_issue.includes}"`; - if (_issue.format === "regex") - return `String tidak valid: harus sesuai pola ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} tidak valid`; - } - case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue22.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali ${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak valid di ${issue22.origin}`; - case "invalid_union": - return "Input tidak valid"; - case "invalid_element": - return `Nilai tidak valid di ${issue22.origin}`; - default: - return `Input tidak valid`; - } - }; -}; -function id_default3() { - return { - localeError: error192() - }; + +// node_modules/zod/v4/core/registries.js +var _a3; +var $output2 = /* @__PURE__ */ Symbol("ZodOutput"); +var $input2 = /* @__PURE__ */ Symbol("ZodInput"); +var $ZodRegistry2 = class { + constructor() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + } + add(schema, ..._meta) { + const meta5 = _meta[0]; + this._map.set(schema, meta5); + if (meta5 && typeof meta5 === "object" && "id" in meta5) { + this._idmap.set(meta5.id, schema); + } + return this; + } + clear() { + this._map = /* @__PURE__ */ new WeakMap(); + this._idmap = /* @__PURE__ */ new Map(); + return this; + } + remove(schema) { + const meta5 = this._map.get(schema); + if (meta5 && typeof meta5 === "object" && "id" in meta5) { + this._idmap.delete(meta5.id); + } + this._map.delete(schema); + return this; + } + get(schema) { + const p = schema._zod.parent; + if (p) { + const pm = { ...this.get(p) ?? {} }; + delete pm.id; + const f = { ...pm, ...this._map.get(schema) }; + return Object.keys(f).length ? f : void 0; + } + return this._map.get(schema); + } + has(schema) { + return this._map.has(schema); + } +}; +function registry2() { + return new $ZodRegistry2(); +} +(_a3 = globalThis).__zod_globalRegistry ?? (_a3.__zod_globalRegistry = registry2()); +var globalRegistry2 = globalThis.__zod_globalRegistry; + +// node_modules/zod/v4/core/api.js +// @__NO_SIDE_EFFECTS__ +function _string2(Class3, params) { + return new Class3({ + type: "string", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedString2(Class3, params) { + return new Class3({ + type: "string", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _email2(Class3, params) { + return new Class3({ + type: "string", + format: "email", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _guid2(Class3, params) { + return new Class3({ + type: "string", + format: "guid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuid2(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuidv42(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v4", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuidv62(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v6", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uuidv72(Class3, params) { + return new Class3({ + type: "string", + format: "uuid", + check: "string_format", + abort: false, + version: "v7", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _url2(Class3, params) { + return new Class3({ + type: "string", + format: "url", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _emoji4(Class3, params) { + return new Class3({ + type: "string", + format: "emoji", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _nanoid2(Class3, params) { + return new Class3({ + type: "string", + format: "nanoid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cuid3(Class3, params) { + return new Class3({ + type: "string", + format: "cuid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cuid22(Class3, params) { + return new Class3({ + type: "string", + format: "cuid2", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ulid2(Class3, params) { + return new Class3({ + type: "string", + format: "ulid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _xid2(Class3, params) { + return new Class3({ + type: "string", + format: "xid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ksuid2(Class3, params) { + return new Class3({ + type: "string", + format: "ksuid", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ipv42(Class3, params) { + return new Class3({ + type: "string", + format: "ipv4", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _ipv62(Class3, params) { + return new Class3({ + type: "string", + format: "ipv6", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _mac2(Class3, params) { + return new Class3({ + type: "string", + format: "mac", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cidrv42(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv4", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _cidrv62(Class3, params) { + return new Class3({ + type: "string", + format: "cidrv6", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _base642(Class3, params) { + return new Class3({ + type: "string", + format: "base64", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _base64url2(Class3, params) { + return new Class3({ + type: "string", + format: "base64url", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _e1642(Class3, params) { + return new Class3({ + type: "string", + format: "e164", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _jwt2(Class3, params) { + return new Class3({ + type: "string", + format: "jwt", + check: "string_format", + abort: false, + ...normalizeParams2(params) + }); +} +var TimePrecision2 = { + Any: null, + Minute: -1, + Second: 0, + Millisecond: 3, + Microsecond: 6 +}; +// @__NO_SIDE_EFFECTS__ +function _isoDateTime2(Class3, params) { + return new Class3({ + type: "string", + format: "datetime", + check: "string_format", + offset: false, + local: false, + precision: null, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoDate2(Class3, params) { + return new Class3({ + type: "string", + format: "date", + check: "string_format", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoTime2(Class3, params) { + return new Class3({ + type: "string", + format: "time", + check: "string_format", + precision: null, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _isoDuration2(Class3, params) { + return new Class3({ + type: "string", + format: "duration", + check: "string_format", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _number2(Class3, params) { + return new Class3({ + type: "number", + checks: [], + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedNumber2(Class3, params) { + return new Class3({ + type: "number", + coerce: true, + checks: [], + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _int2(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "safeint", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _float322(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "float32", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _float642(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "float64", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _int322(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "int32", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uint322(Class3, params) { + return new Class3({ + type: "number", + check: "number_format", + abort: false, + format: "uint32", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _boolean2(Class3, params) { + return new Class3({ + type: "boolean", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedBoolean2(Class3, params) { + return new Class3({ + type: "boolean", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _bigint2(Class3, params) { + return new Class3({ + type: "bigint", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedBigint2(Class3, params) { + return new Class3({ + type: "bigint", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _int642(Class3, params) { + return new Class3({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "int64", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uint642(Class3, params) { + return new Class3({ + type: "bigint", + check: "bigint_format", + abort: false, + format: "uint64", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _symbol2(Class3, params) { + return new Class3({ + type: "symbol", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _undefined5(Class3, params) { + return new Class3({ + type: "undefined", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _null5(Class3, params) { + return new Class3({ + type: "null", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _any2(Class3) { + return new Class3({ + type: "any" + }); +} +// @__NO_SIDE_EFFECTS__ +function _unknown2(Class3) { + return new Class3({ + type: "unknown" + }); +} +// @__NO_SIDE_EFFECTS__ +function _never2(Class3, params) { + return new Class3({ + type: "never", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _void3(Class3, params) { + return new Class3({ + type: "void", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _date2(Class3, params) { + return new Class3({ + type: "date", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _coercedDate2(Class3, params) { + return new Class3({ + type: "date", + coerce: true, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _nan2(Class3, params) { + return new Class3({ + type: "nan", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _lt2(value, params) { + return new $ZodCheckLessThan2({ + check: "less_than", + ...normalizeParams2(params), + value, + inclusive: false + }); +} +// @__NO_SIDE_EFFECTS__ +function _lte2(value, params) { + return new $ZodCheckLessThan2({ + check: "less_than", + ...normalizeParams2(params), + value, + inclusive: true + }); +} +// @__NO_SIDE_EFFECTS__ +function _gt2(value, params) { + return new $ZodCheckGreaterThan2({ + check: "greater_than", + ...normalizeParams2(params), + value, + inclusive: false + }); +} +// @__NO_SIDE_EFFECTS__ +function _gte2(value, params) { + return new $ZodCheckGreaterThan2({ + check: "greater_than", + ...normalizeParams2(params), + value, + inclusive: true + }); +} +// @__NO_SIDE_EFFECTS__ +function _positive2(params) { + return /* @__PURE__ */ _gt2(0, params); } -var error202 = () => { - const Sizable = { - string: { unit: "stafi", verb: "a\xF0 hafa" }, - file: { unit: "b\xE6ti", verb: "a\xF0 hafa" }, - array: { unit: "hluti", verb: "a\xF0 hafa" }, - set: { unit: "hluti", verb: "a\xF0 hafa" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "gildi", - email: "netfang", - url: "vefsl\xF3\xF0", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dagsetning og t\xEDmi", - date: "ISO dagsetning", - time: "ISO t\xEDmi", - duration: "ISO t\xEDmalengd", - ipv4: "IPv4 address", - ipv6: "IPv6 address", - cidrv4: "IPv4 range", - cidrv6: "IPv6 range", - base64: "base64-encoded strengur", - base64url: "base64url-encoded strengur", - json_string: "JSON strengur", - e164: "E.164 t\xF6lugildi", - jwt: "JWT", - template_literal: "gildi" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\xFAmer", - array: "fylki" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera instanceof ${issue22.expected}`; - } - return `Rangt gildi: \xDE\xFA sl\xF3st inn ${received} \xFEar sem \xE1 a\xF0 vera ${expected}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Rangt gildi: gert r\xE1\xF0 fyrir ${stringifyPrimitive3(issue22.values[0])}`; - return `\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue22.origin ?? "gildi"} hafi ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "hluti"}`; - return `Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${issue22.origin ?? "gildi"} s\xE9 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue22.origin} hafi ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${issue22.origin} s\xE9 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${_issue.includes}"`; - if (_issue.format === "regex") - return `\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${_issue.pattern}`; - return `Rangt ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${issue22.divisor}`; - case "unrecognized_keys": - return `\xD3\xFEekkt ${issue22.keys.length > 1 ? "ir lyklar" : "ur lykill"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Rangur lykill \xED ${issue22.origin}`; - case "invalid_union": - return "Rangt gildi"; - case "invalid_element": - return `Rangt gildi \xED ${issue22.origin}`; - default: - return `Rangt gildi`; - } - }; -}; -function is_default3() { - return { - localeError: error202() - }; +// @__NO_SIDE_EFFECTS__ +function _negative2(params) { + return /* @__PURE__ */ _lt2(0, params); } -var error212 = () => { - const Sizable = { - string: { unit: "caratteri", verb: "avere" }, - file: { unit: "byte", verb: "avere" }, - array: { unit: "elementi", verb: "avere" }, - set: { unit: "elementi", verb: "avere" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "indirizzo email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e ora ISO", - date: "data ISO", - time: "ora ISO", - duration: "durata ISO", - ipv4: "indirizzo IPv4", - ipv6: "indirizzo IPv6", - cidrv4: "intervallo IPv4", - cidrv6: "intervallo IPv6", - base64: "stringa codificata in base64", - base64url: "URL codificata in base64", - json_string: "stringa JSON", - e164: "numero E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "numero", - array: "vettore" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Input non valido: atteso instanceof ${issue22.expected}, ricevuto ${received}`; - } - return `Input non valido: atteso ${expected}, ricevuto ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Input non valido: atteso ${stringifyPrimitive3(issue22.values[0])}`; - return `Opzione non valida: atteso uno tra ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Troppo grande: ${issue22.origin ?? "valore"} deve avere ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementi"}`; - return `Troppo grande: ${issue22.origin ?? "valore"} deve essere ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Troppo piccolo: ${issue22.origin} deve avere ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Troppo piccolo: ${issue22.origin} deve essere ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Stringa non valida: deve terminare con "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Stringa non valida: deve includere "${_issue.includes}"`; - if (_issue.format === "regex") - return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue22.divisor}`; - case "unrecognized_keys": - return `Chiav${issue22.keys.length > 1 ? "i" : "e"} non riconosciut${issue22.keys.length > 1 ? "e" : "a"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Chiave non valida in ${issue22.origin}`; - case "invalid_union": - return "Input non valido"; - case "invalid_element": - return `Valore non valido in ${issue22.origin}`; - default: - return `Input non valido`; - } - }; -}; -function it_default3() { - return { - localeError: error212() - }; +// @__NO_SIDE_EFFECTS__ +function _nonpositive2(params) { + return /* @__PURE__ */ _lte2(0, params); } -var error222 = () => { - const Sizable = { - string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, - file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" }, - array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }, - set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u5165\u529B\u5024", - email: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9", - url: "URL", - emoji: "\u7D75\u6587\u5B57", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u6642", - date: "ISO\u65E5\u4ED8", - time: "ISO\u6642\u523B", - duration: "ISO\u671F\u9593", - ipv4: "IPv4\u30A2\u30C9\u30EC\u30B9", - ipv6: "IPv6\u30A2\u30C9\u30EC\u30B9", - cidrv4: "IPv4\u7BC4\u56F2", - cidrv6: "IPv6\u7BC4\u56F2", - base64: "base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - base64url: "base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217", - json_string: "JSON\u6587\u5B57\u5217", - e164: "E.164\u756A\u53F7", - jwt: "JWT", - template_literal: "\u5165\u529B\u5024" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u6570\u5024", - array: "\u914D\u5217" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u7121\u52B9\u306A\u5165\u529B: instanceof ${issue22.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; - } - return `\u7121\u52B9\u306A\u5165\u529B: ${expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${received}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive3(issue22.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; - return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues3(issue22.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - case "too_big": { - const adj = issue22.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue22.origin ?? "\u5024"}\u306F${issue22.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue22.origin ?? "\u5024"}\u306F${issue22.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - } - case "too_small": { - const adj = issue22.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue22.origin}\u306F${issue22.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue22.origin}\u306F${issue22.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "ends_with") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "includes") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: "${_issue.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - if (_issue.format === "regex") - return `\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${_issue.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u7121\u52B9\u306A${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u7121\u52B9\u306A\u6570\u5024: ${issue22.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - case "unrecognized_keys": - return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue22.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues3(issue22.keys, "\u3001")}`; - case "invalid_key": - return `${issue22.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; - case "invalid_union": - return "\u7121\u52B9\u306A\u5165\u529B"; - case "invalid_element": - return `${issue22.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; - default: - return `\u7121\u52B9\u306A\u5165\u529B`; - } - }; -}; -function ja_default3() { - return { - localeError: error222() - }; +// @__NO_SIDE_EFFECTS__ +function _nonnegative2(params) { + return /* @__PURE__ */ _gte2(0, params); } -var error232 = () => { - const Sizable = { - string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }, - set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0", - email: "\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - url: "URL", - emoji: "\u10D4\u10DB\u10DD\u10EF\u10D8", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD", - date: "\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8", - time: "\u10D3\u10E0\u10DD", - duration: "\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0", - ipv4: "IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8", - cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", - cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8", - base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8", - jwt: "JWT", - template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8", - string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8", - boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8", - function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0", - array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${issue22.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; - } - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${stringifyPrimitive3(issue22.values[0])}`; - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${joinValues3(issue22.values, "|")}-\u10D3\u10D0\u10DC`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue22.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${sizing.verb} ${adj}${issue22.maximum.toString()} ${sizing.unit}`; - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue22.origin ?? "\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue22.origin} ${sizing.verb} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${issue22.origin} \u10D8\u10E7\u10DD\u10E1 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`; - } - if (_issue.format === "ends_with") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`; - if (_issue.format === "includes") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`; - if (_issue.format === "regex") - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`; - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${issue22.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`; - case "unrecognized_keys": - return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${issue22.keys.length > 1 ? "\u10D4\u10D1\u10D8" : "\u10D8"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${issue22.origin}-\u10E8\u10D8`; - case "invalid_union": - return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"; - case "invalid_element": - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${issue22.origin}-\u10E8\u10D8`; - default: - return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0`; - } - }; -}; -function ka_default3() { - return { - localeError: error232() - }; +// @__NO_SIDE_EFFECTS__ +function _multipleOf2(value, params) { + return new $ZodCheckMultipleOf2({ + check: "multiple_of", + ...normalizeParams2(params), + value + }); +} +// @__NO_SIDE_EFFECTS__ +function _maxSize2(maximum, params) { + return new $ZodCheckMaxSize2({ + check: "max_size", + ...normalizeParams2(params), + maximum + }); +} +// @__NO_SIDE_EFFECTS__ +function _minSize2(minimum, params) { + return new $ZodCheckMinSize2({ + check: "min_size", + ...normalizeParams2(params), + minimum + }); +} +// @__NO_SIDE_EFFECTS__ +function _size2(size, params) { + return new $ZodCheckSizeEquals2({ + check: "size_equals", + ...normalizeParams2(params), + size + }); +} +// @__NO_SIDE_EFFECTS__ +function _maxLength2(maximum, params) { + const ch = new $ZodCheckMaxLength2({ + check: "max_length", + ...normalizeParams2(params), + maximum + }); + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _minLength2(minimum, params) { + return new $ZodCheckMinLength2({ + check: "min_length", + ...normalizeParams2(params), + minimum + }); +} +// @__NO_SIDE_EFFECTS__ +function _length2(length, params) { + return new $ZodCheckLengthEquals2({ + check: "length_equals", + ...normalizeParams2(params), + length + }); +} +// @__NO_SIDE_EFFECTS__ +function _regex2(pattern, params) { + return new $ZodCheckRegex2({ + check: "string_format", + format: "regex", + ...normalizeParams2(params), + pattern + }); +} +// @__NO_SIDE_EFFECTS__ +function _lowercase2(params) { + return new $ZodCheckLowerCase2({ + check: "string_format", + format: "lowercase", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _uppercase2(params) { + return new $ZodCheckUpperCase2({ + check: "string_format", + format: "uppercase", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _includes2(includes, params) { + return new $ZodCheckIncludes2({ + check: "string_format", + format: "includes", + ...normalizeParams2(params), + includes + }); +} +// @__NO_SIDE_EFFECTS__ +function _startsWith2(prefix, params) { + return new $ZodCheckStartsWith2({ + check: "string_format", + format: "starts_with", + ...normalizeParams2(params), + prefix + }); } -var error242 = () => { - const Sizable = { - string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, - set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B", - email: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B", - url: "URL", - emoji: "\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO", - date: "\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO", - time: "\u1798\u17C9\u17C4\u1784 ISO", - duration: "\u179A\u1799\u17C8\u1796\u17C1\u179B ISO", - ipv4: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - ipv6: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - cidrv4: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4", - cidrv6: "\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6", - base64: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64", - base64url: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url", - json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON", - e164: "\u179B\u17C1\u1781 E.164", - jwt: "JWT", - template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u179B\u17C1\u1781", - array: "\u17A2\u17B6\u179A\u17C1 (Array)", - null: "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${issue22.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; - } - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${stringifyPrimitive3(issue22.values[0])}`; - return `\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue22.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue22.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue22.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue22.origin} ${adj} ${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue22.origin} ${adj} ${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${_issue.pattern}`; - return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${issue22.divisor}`; - case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue22.origin}`; - case "invalid_union": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - case "invalid_element": - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue22.origin}`; - default: - return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; - } - }; -}; -function km_default3() { - return { - localeError: error242() - }; +// @__NO_SIDE_EFFECTS__ +function _endsWith2(suffix, params) { + return new $ZodCheckEndsWith2({ + check: "string_format", + format: "ends_with", + ...normalizeParams2(params), + suffix + }); } -function kh_default3() { - return km_default3(); +// @__NO_SIDE_EFFECTS__ +function _property2(property, schema, params) { + return new $ZodCheckProperty2({ + check: "property", + property, + schema, + ...normalizeParams2(params) + }); } -var error252 = () => { - const Sizable = { - string: { unit: "\uBB38\uC790", verb: "to have" }, - file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" }, - array: { unit: "\uAC1C", verb: "to have" }, - set: { unit: "\uAC1C", verb: "to have" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\uC785\uB825", - email: "\uC774\uBA54\uC77C \uC8FC\uC18C", - url: "URL", - emoji: "\uC774\uBAA8\uC9C0", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \uB0A0\uC9DC\uC2DC\uAC04", - date: "ISO \uB0A0\uC9DC", - time: "ISO \uC2DC\uAC04", - duration: "ISO \uAE30\uAC04", - ipv4: "IPv4 \uC8FC\uC18C", - ipv6: "IPv6 \uC8FC\uC18C", - cidrv4: "IPv4 \uBC94\uC704", - cidrv6: "IPv6 \uBC94\uC704", - base64: "base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - base64url: "base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4", - json_string: "JSON \uBB38\uC790\uC5F4", - e164: "E.164 \uBC88\uD638", - jwt: "JWT", - template_literal: "\uC785\uB825" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${issue22.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; - } - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${received}\uC785\uB2C8\uB2E4`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive3(issue22.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues3(issue22.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "too_big": { - const adj = issue22.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; - const suffix = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue22.origin); - const unit = sizing?.unit ?? "\uC694\uC18C"; - if (sizing) - return `${issue22.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue22.maximum.toString()}${unit} ${adj}${suffix}`; - return `${issue22.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue22.maximum.toString()} ${adj}${suffix}`; - } - case "too_small": { - const adj = issue22.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; - const suffix = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue22.origin); - const unit = sizing?.unit ?? "\uC694\uC18C"; - if (sizing) { - return `${issue22.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue22.minimum.toString()}${unit} ${adj}${suffix}`; - } - return `${issue22.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue22.minimum.toString()} ${adj}${suffix}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; - } - if (_issue.format === "ends_with") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "includes") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`; - if (_issue.format === "regex") - return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${_issue.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue22.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; - case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue22.origin}`; - case "invalid_union": - return `\uC798\uBABB\uB41C \uC785\uB825`; - case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue22.origin}`; - default: - return `\uC798\uBABB\uB41C \uC785\uB825`; - } - }; -}; -function ko_default3() { - return { - localeError: error252() - }; +// @__NO_SIDE_EFFECTS__ +function _mime2(types, params) { + return new $ZodCheckMimeType2({ + check: "mime_type", + mime: types, + ...normalizeParams2(params) + }); } -var capitalizeFirstCharacter3 = (text) => { - return text.charAt(0).toUpperCase() + text.slice(1); -}; -function getUnitTypeFromNumber3(number42) { - const abs = Math.abs(number42); - const last = abs % 10; - const last2 = abs % 100; - if (last2 >= 11 && last2 <= 19 || last === 0) - return "many"; - if (last === 1) - return "one"; - return "few"; +// @__NO_SIDE_EFFECTS__ +function _overwrite2(tx) { + return new $ZodCheckOverwrite2({ + check: "overwrite", + tx + }); } -var error262 = () => { - const Sizable = { - string: { - unit: { - one: "simbolis", - few: "simboliai", - many: "simboli\u0173" - }, - verb: { - smaller: { - inclusive: "turi b\u016Bti ne ilgesn\u0117 kaip", - notInclusive: "turi b\u016Bti trumpesn\u0117 kaip" - }, - bigger: { - inclusive: "turi b\u016Bti ne trumpesn\u0117 kaip", - notInclusive: "turi b\u016Bti ilgesn\u0117 kaip" - } - } - }, - file: { - unit: { - one: "baitas", - few: "baitai", - many: "bait\u0173" - }, - verb: { - smaller: { - inclusive: "turi b\u016Bti ne didesnis kaip", - notInclusive: "turi b\u016Bti ma\u017Eesnis kaip" - }, - bigger: { - inclusive: "turi b\u016Bti ne ma\u017Eesnis kaip", - notInclusive: "turi b\u016Bti didesnis kaip" - } - } - }, - array: { - unit: { - one: "element\u0105", - few: "elementus", - many: "element\u0173" - }, - verb: { - smaller: { - inclusive: "turi tur\u0117ti ne daugiau kaip", - notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" - }, - bigger: { - inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", - notInclusive: "turi tur\u0117ti daugiau kaip" - } - } - }, - set: { - unit: { - one: "element\u0105", - few: "elementus", - many: "element\u0173" - }, - verb: { - smaller: { - inclusive: "turi tur\u0117ti ne daugiau kaip", - notInclusive: "turi tur\u0117ti ma\u017Eiau kaip" - }, - bigger: { - inclusive: "turi tur\u0117ti ne ma\u017Eiau kaip", - notInclusive: "turi tur\u0117ti daugiau kaip" - } - } - } - }; - function getSizing(origin2, unitType, inclusive, targetShouldBe) { - const result = Sizable[origin2] ?? null; - if (result === null) - return result; - return { - unit: result.unit[unitType], - verb: result.verb[targetShouldBe][inclusive ? "inclusive" : "notInclusive"] - }; - } - const FormatDictionary = { - regex: "\u012Fvestis", - email: "el. pa\u0161to adresas", - url: "URL", - emoji: "jaustukas", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO data ir laikas", - date: "ISO data", - time: "ISO laikas", - duration: "ISO trukm\u0117", - ipv4: "IPv4 adresas", - ipv6: "IPv6 adresas", - cidrv4: "IPv4 tinklo prefiksas (CIDR)", - cidrv6: "IPv6 tinklo prefiksas (CIDR)", - base64: "base64 u\u017Ekoduota eilut\u0117", - base64url: "base64url u\u017Ekoduota eilut\u0117", - json_string: "JSON eilut\u0117", - e164: "E.164 numeris", - jwt: "JWT", - template_literal: "\u012Fvestis" - }; - const TypeDictionary = { - nan: "NaN", - number: "skai\u010Dius", - bigint: "sveikasis skai\u010Dius", - string: "eilut\u0117", - boolean: "login\u0117 reik\u0161m\u0117", - undefined: "neapibr\u0117\u017Eta reik\u0161m\u0117", - function: "funkcija", - symbol: "simbolis", - array: "masyvas", - object: "objektas", - null: "nulin\u0117 reik\u0161m\u0117" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Gautas tipas ${received}, o tik\u0117tasi - instanceof ${issue22.expected}`; - } - return `Gautas tipas ${received}, o tik\u0117tasi - ${expected}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Privalo b\u016Bti ${stringifyPrimitive3(issue22.values[0])}`; - return `Privalo b\u016Bti vienas i\u0161 ${joinValues3(issue22.values, "|")} pasirinkim\u0173`; - case "too_big": { - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - const sizing = getSizing(issue22.origin, getUnitTypeFromNumber3(Number(issue22.maximum)), issue22.inclusive ?? false, "smaller"); - if (sizing?.verb) - return `${capitalizeFirstCharacter3(origin2 ?? issue22.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue22.maximum.toString()} ${sizing.unit ?? "element\u0173"}`; - const adj = issue22.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip"; - return `${capitalizeFirstCharacter3(origin2 ?? issue22.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue22.maximum.toString()} ${sizing?.unit}`; - } - case "too_small": { - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - const sizing = getSizing(issue22.origin, getUnitTypeFromNumber3(Number(issue22.minimum)), issue22.inclusive ?? false, "bigger"); - if (sizing?.verb) - return `${capitalizeFirstCharacter3(origin2 ?? issue22.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue22.minimum.toString()} ${sizing.unit ?? "element\u0173"}`; - const adj = issue22.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip"; - return `${capitalizeFirstCharacter3(origin2 ?? issue22.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue22.minimum.toString()} ${sizing?.unit}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Eilut\u0117 privalo prasid\u0117ti "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Eilut\u0117 privalo pasibaigti "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Eilut\u0117 privalo \u012Ftraukti "${_issue.includes}"`; - if (_issue.format === "regex") - return `Eilut\u0117 privalo atitikti ${_issue.pattern}`; - return `Neteisingas ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Skai\u010Dius privalo b\u016Bti ${issue22.divisor} kartotinis.`; - case "unrecognized_keys": - return `Neatpa\u017Eint${issue22.keys.length > 1 ? "i" : "as"} rakt${issue22.keys.length > 1 ? "ai" : "as"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return "Rastas klaidingas raktas"; - case "invalid_union": - return "Klaidinga \u012Fvestis"; - case "invalid_element": { - const origin2 = TypeDictionary[issue22.origin] ?? issue22.origin; - return `${capitalizeFirstCharacter3(origin2 ?? issue22.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`; - } - default: - return "Klaidinga \u012Fvestis"; - } - }; -}; -function lt_default3() { - return { - localeError: error262() - }; +// @__NO_SIDE_EFFECTS__ +function _normalize2(form) { + return /* @__PURE__ */ _overwrite2((input) => input.normalize(form)); } -var error272 = () => { - const Sizable = { - string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, - set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u043D\u0435\u0441", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430", - url: "URL", - emoji: "\u0435\u043C\u043E\u045F\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435", - date: "ISO \u0434\u0430\u0442\u0443\u043C", - time: "ISO \u0432\u0440\u0435\u043C\u0435", - duration: "ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441\u0430", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441\u0430", - cidrv4: "IPv4 \u043E\u043F\u0441\u0435\u0433", - cidrv6: "IPv6 \u043E\u043F\u0441\u0435\u0433", - base64: "base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - base64url: "base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430", - json_string: "JSON \u043D\u0438\u0437\u0430", - e164: "E.164 \u0431\u0440\u043E\u0458", - jwt: "JWT", - template_literal: "\u0432\u043D\u0435\u0441" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0431\u0440\u043E\u0458", - array: "\u043D\u0438\u0437\u0430" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${issue22.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; - } - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive3(issue22.values[0])}`; - return `\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue22.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`; - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue22.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue22.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue22.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${_issue.pattern}`; - return `Invalid ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${issue22.divisor}`; - case "unrecognized_keys": - return `${issue22.keys.length > 1 ? "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438" : "\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue22.origin}`; - case "invalid_union": - return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"; - case "invalid_element": - return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue22.origin}`; - default: - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; - } - }; -}; -function mk_default3() { - return { - localeError: error272() - }; +// @__NO_SIDE_EFFECTS__ +function _trim2() { + return /* @__PURE__ */ _overwrite2((input) => input.trim()); +} +// @__NO_SIDE_EFFECTS__ +function _toLowerCase2() { + return /* @__PURE__ */ _overwrite2((input) => input.toLowerCase()); +} +// @__NO_SIDE_EFFECTS__ +function _toUpperCase2() { + return /* @__PURE__ */ _overwrite2((input) => input.toUpperCase()); +} +// @__NO_SIDE_EFFECTS__ +function _slugify2() { + return /* @__PURE__ */ _overwrite2((input) => slugify2(input)); +} +// @__NO_SIDE_EFFECTS__ +function _array2(Class3, element, params) { + return new Class3({ + type: "array", + element, + // get element() { + // return element; + // }, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _union2(Class3, options, params) { + return new Class3({ + type: "union", + options, + ...normalizeParams2(params) + }); +} +function _xor2(Class3, options, params) { + return new Class3({ + type: "union", + options, + inclusive: false, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _discriminatedUnion2(Class3, discriminator, options, params) { + return new Class3({ + type: "union", + options, + discriminator, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _intersection2(Class3, left, right) { + return new Class3({ + type: "intersection", + left, + right + }); +} +// @__NO_SIDE_EFFECTS__ +function _tuple2(Class3, items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType2; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new Class3({ + type: "tuple", + items, + rest, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _record2(Class3, keyType, valueType, params) { + return new Class3({ + type: "record", + keyType, + valueType, + ...normalizeParams2(params) + }); } -var error282 = () => { - const Sizable = { - string: { unit: "aksara", verb: "mempunyai" }, - file: { unit: "bait", verb: "mempunyai" }, - array: { unit: "elemen", verb: "mempunyai" }, - set: { unit: "elemen", verb: "mempunyai" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "alamat e-mel", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "tarikh masa ISO", - date: "tarikh ISO", - time: "masa ISO", - duration: "tempoh ISO", - ipv4: "alamat IPv4", - ipv6: "alamat IPv6", - cidrv4: "julat IPv4", - cidrv6: "julat IPv6", - base64: "string dikodkan base64", - base64url: "string dikodkan base64url", - json_string: "string JSON", - e164: "nombor E.164", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "nombor" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Input tidak sah: dijangka instanceof ${issue22.expected}, diterima ${received}`; - } - return `Input tidak sah: dijangka ${expected}, diterima ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Input tidak sah: dijangka ${stringifyPrimitive3(issue22.values[0])}`; - return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Terlalu besar: dijangka ${issue22.origin ?? "nilai"} ${sizing.verb} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: dijangka ${issue22.origin ?? "nilai"} adalah ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Terlalu kecil: dijangka ${issue22.origin} ${sizing.verb} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Terlalu kecil: dijangka ${issue22.origin} adalah ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`; - if (_issue.format === "includes") - return `String tidak sah: mesti mengandungi "${_issue.includes}"`; - if (_issue.format === "regex") - return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} tidak sah`; - } - case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue22.divisor}`; - case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Kunci tidak sah dalam ${issue22.origin}`; - case "invalid_union": - return "Input tidak sah"; - case "invalid_element": - return `Nilai tidak sah dalam ${issue22.origin}`; - default: - return `Input tidak sah`; - } - }; -}; -function ms_default3() { - return { - localeError: error282() - }; +// @__NO_SIDE_EFFECTS__ +function _map2(Class3, keyType, valueType, params) { + return new Class3({ + type: "map", + keyType, + valueType, + ...normalizeParams2(params) + }); } -var error292 = () => { - const Sizable = { - string: { unit: "tekens", verb: "heeft" }, - file: { unit: "bytes", verb: "heeft" }, - array: { unit: "elementen", verb: "heeft" }, - set: { unit: "elementen", verb: "heeft" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "invoer", - email: "emailadres", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum en tijd", - date: "ISO datum", - time: "ISO tijd", - duration: "ISO duur", - ipv4: "IPv4-adres", - ipv6: "IPv6-adres", - cidrv4: "IPv4-bereik", - cidrv6: "IPv6-bereik", - base64: "base64-gecodeerde tekst", - base64url: "base64 URL-gecodeerde tekst", - json_string: "JSON string", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "invoer" - }; - const TypeDictionary = { - nan: "NaN", - number: "getal" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Ongeldige invoer: verwacht instanceof ${issue22.expected}, ontving ${received}`; - } - return `Ongeldige invoer: verwacht ${expected}, ontving ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Ongeldige invoer: verwacht ${stringifyPrimitive3(issue22.values[0])}`; - return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - const longName = issue22.origin === "date" ? "laat" : issue22.origin === "string" ? "lang" : "groot"; - if (sizing) - return `Te ${longName}: verwacht dat ${issue22.origin ?? "waarde"} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementen"} ${sizing.verb}`; - return `Te ${longName}: verwacht dat ${issue22.origin ?? "waarde"} ${adj}${issue22.maximum.toString()} is`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - const shortName = issue22.origin === "date" ? "vroeg" : issue22.origin === "string" ? "kort" : "klein"; - if (sizing) { - return `Te ${shortName}: verwacht dat ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit} ${sizing.verb}`; - } - return `Te ${shortName}: verwacht dat ${issue22.origin} ${adj}${issue22.minimum.toString()} is`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; - } - if (_issue.format === "ends_with") - return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`; - if (_issue.format === "includes") - return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; - if (_issue.format === "regex") - return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; - return `Ongeldig: ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue22.divisor} zijn`; - case "unrecognized_keys": - return `Onbekende key${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Ongeldige key in ${issue22.origin}`; - case "invalid_union": - return "Ongeldige invoer"; - case "invalid_element": - return `Ongeldige waarde in ${issue22.origin}`; - default: - return `Ongeldige invoer`; - } - }; -}; -function nl_default3() { - return { - localeError: error292() - }; +// @__NO_SIDE_EFFECTS__ +function _set2(Class3, valueType, params) { + return new Class3({ + type: "set", + valueType, + ...normalizeParams2(params) + }); } -var error302 = () => { - const Sizable = { - string: { unit: "tegn", verb: "\xE5 ha" }, - file: { unit: "bytes", verb: "\xE5 ha" }, - array: { unit: "elementer", verb: "\xE5 inneholde" }, - set: { unit: "elementer", verb: "\xE5 inneholde" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "input", - email: "e-postadresse", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO dato- og klokkeslett", - date: "ISO-dato", - time: "ISO-klokkeslett", - duration: "ISO-varighet", - ipv4: "IPv4-omr\xE5de", - ipv6: "IPv6-omr\xE5de", - cidrv4: "IPv4-spekter", - cidrv6: "IPv6-spekter", - base64: "base64-enkodet streng", - base64url: "base64url-enkodet streng", - json_string: "JSON-streng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "tall", - array: "liste" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Ugyldig input: forventet instanceof ${issue22.expected}, fikk ${received}`; - } - return `Ugyldig input: forventet ${expected}, fikk ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Ugyldig verdi: forventet ${stringifyPrimitive3(issue22.values[0])}`; - return `Ugyldig valg: forventet en av ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `For stor(t): forventet ${issue22.origin ?? "value"} til \xE5 ha ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor(t): forventet ${issue22.origin ?? "value"} til \xE5 ha ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `For lite(n): forventet ${issue22.origin} til \xE5 ha ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `For lite(n): forventet ${issue22.origin} til \xE5 ha ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Ugyldig streng: m\xE5 ende med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue22.divisor}`; - case "unrecognized_keys": - return `${issue22.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue22.origin}`; - case "invalid_union": - return "Ugyldig input"; - case "invalid_element": - return `Ugyldig verdi i ${issue22.origin}`; - default: - return `Ugyldig input`; - } - }; -}; -function no_default3() { - return { - localeError: error302() - }; +// @__NO_SIDE_EFFECTS__ +function _enum3(Class3, values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new Class3({ + type: "enum", + entries, + ...normalizeParams2(params) + }); } -var error312 = () => { - const Sizable = { - string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, - file: { unit: "bayt", verb: "olmal\u0131d\u0131r" }, - array: { unit: "unsur", verb: "olmal\u0131d\u0131r" }, - set: { unit: "unsur", verb: "olmal\u0131d\u0131r" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "giren", - email: "epostag\xE2h", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO heng\xE2m\u0131", - date: "ISO tarihi", - time: "ISO zaman\u0131", - duration: "ISO m\xFCddeti", - ipv4: "IPv4 ni\u015F\xE2n\u0131", - ipv6: "IPv6 ni\u015F\xE2n\u0131", - cidrv4: "IPv4 menzili", - cidrv6: "IPv6 menzili", - base64: "base64-\u015Fifreli metin", - base64url: "base64url-\u015Fifreli metin", - json_string: "JSON metin", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "giren" - }; - const TypeDictionary = { - nan: "NaN", - number: "numara", - array: "saf", - null: "gayb" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `F\xE2sit giren: umulan instanceof ${issue22.expected}, al\u0131nan ${received}`; - } - return `F\xE2sit giren: umulan ${expected}, al\u0131nan ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `F\xE2sit giren: umulan ${stringifyPrimitive3(issue22.values[0])}`; - return `F\xE2sit tercih: m\xFBteberler ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Fazla b\xFCy\xFCk: ${issue22.origin ?? "value"}, ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; - return `Fazla b\xFCy\xFCk: ${issue22.origin ?? "value"}, ${adj}${issue22.maximum.toString()} olmal\u0131yd\u0131.`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Fazla k\xFC\xE7\xFCk: ${issue22.origin}, ${adj}${issue22.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; - } - return `Fazla k\xFC\xE7\xFCk: ${issue22.origin}, ${adj}${issue22.minimum.toString()} olmal\u0131yd\u0131.`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; - if (_issue.format === "ends_with") - return `F\xE2sit metin: "${_issue.suffix}" ile bitmeli.`; - if (_issue.format === "includes") - return `F\xE2sit metin: "${_issue.includes}" ihtiv\xE2 etmeli.`; - if (_issue.format === "regex") - return `F\xE2sit metin: ${_issue.pattern} nak\u015F\u0131na uymal\u0131.`; - return `F\xE2sit ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue22.divisor} kat\u0131 olmal\u0131yd\u0131.`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `${issue22.origin} i\xE7in tan\u0131nmayan anahtar var.`; - case "invalid_union": - return "Giren tan\u0131namad\u0131."; - case "invalid_element": - return `${issue22.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; - default: - return `K\u0131ymet tan\u0131namad\u0131.`; +// @__NO_SIDE_EFFECTS__ +function _nativeEnum2(Class3, entries, params) { + return new Class3({ + type: "enum", + entries, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _literal2(Class3, value, params) { + return new Class3({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _file2(Class3, params) { + return new Class3({ + type: "file", + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _transform2(Class3, fn) { + return new Class3({ + type: "transform", + transform: fn + }); +} +// @__NO_SIDE_EFFECTS__ +function _optional2(Class3, innerType) { + return new Class3({ + type: "optional", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _nullable2(Class3, innerType) { + return new Class3({ + type: "nullable", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _default3(Class3, innerType, defaultValue) { + return new Class3({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : shallowClone2(defaultValue); } - }; -}; -function ota_default3() { - return { - localeError: error312() - }; + }); } -var error322 = () => { - const Sizable = { - string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" }, - array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, - set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0648\u0631\u0648\u062F\u064A", - email: "\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u064A", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A", - date: "\u0646\u06D0\u067C\u0647", - time: "\u0648\u062E\u062A", - duration: "\u0645\u0648\u062F\u0647", - ipv4: "\u062F IPv4 \u067E\u062A\u0647", - ipv6: "\u062F IPv6 \u067E\u062A\u0647", - cidrv4: "\u062F IPv4 \u0633\u0627\u062D\u0647", - cidrv6: "\u062F IPv6 \u0633\u0627\u062D\u0647", - base64: "base64-encoded \u0645\u062A\u0646", - base64url: "base64url-encoded \u0645\u062A\u0646", - json_string: "JSON \u0645\u062A\u0646", - e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647", - jwt: "JWT", - template_literal: "\u0648\u0631\u0648\u062F\u064A" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0639\u062F\u062F", - array: "\u0627\u0631\u06D0" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${issue22.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; - } - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${received} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; - } - case "invalid_value": - if (issue22.values.length === 1) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive3(issue22.values[0])} \u0648\u0627\u06CC`; - } - return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues3(issue22.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue22.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; - } - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue22.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue22.maximum.toString()} \u0648\u064A`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue22.origin} \u0628\u0627\u06CC\u062F ${adj}${issue22.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; - } - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue22.origin} \u0628\u0627\u06CC\u062F ${adj}${issue22.minimum.toString()} \u0648\u064A`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`; - } - if (_issue.format === "ends_with") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${_issue.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`; - } - if (_issue.format === "includes") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${_issue.includes}" \u0648\u0644\u0631\u064A`; - } - if (_issue.format === "regex") { - return `\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${_issue.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`; - } - return `${FormatDictionary[_issue.format] ?? issue22.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; +// @__NO_SIDE_EFFECTS__ +function _nonoptional2(Class3, innerType, params) { + return new Class3({ + type: "nonoptional", + innerType, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _success2(Class3, innerType) { + return new Class3({ + type: "success", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _catch3(Class3, innerType, catchValue) { + return new Class3({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue + }); +} +// @__NO_SIDE_EFFECTS__ +function _pipe2(Class3, in_, out) { + return new Class3({ + type: "pipe", + in: in_, + out + }); +} +// @__NO_SIDE_EFFECTS__ +function _readonly2(Class3, innerType) { + return new Class3({ + type: "readonly", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _templateLiteral2(Class3, parts, params) { + return new Class3({ + type: "template_literal", + parts, + ...normalizeParams2(params) + }); +} +// @__NO_SIDE_EFFECTS__ +function _lazy2(Class3, getter) { + return new Class3({ + type: "lazy", + getter + }); +} +// @__NO_SIDE_EFFECTS__ +function _promise2(Class3, innerType) { + return new Class3({ + type: "promise", + innerType + }); +} +// @__NO_SIDE_EFFECTS__ +function _custom2(Class3, fn, _params) { + const norm = normalizeParams2(_params); + norm.abort ?? (norm.abort = true); + const schema = new Class3({ + type: "custom", + check: "custom", + fn, + ...norm + }); + return schema; +} +// @__NO_SIDE_EFFECTS__ +function _refine2(Class3, fn, _params) { + const schema = new Class3({ + type: "custom", + check: "custom", + fn, + ...normalizeParams2(_params) + }); + return schema; +} +// @__NO_SIDE_EFFECTS__ +function _superRefine2(fn, params) { + const ch = /* @__PURE__ */ _check2((payload) => { + payload.addIssue = (issue4) => { + if (typeof issue4 === "string") { + payload.issues.push(issue3(issue4, payload.value, ch._zod.def)); + } else { + const _issue = issue4; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = ch); + _issue.continue ?? (_issue.continue = !ch._zod.def.abort); + payload.issues.push(issue3(_issue)); } - case "not_multiple_of": - return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue22.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; - case "unrecognized_keys": - return `\u0646\u0627\u0633\u0645 ${issue22.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue22.origin} \u06A9\u06D0`; - case "invalid_union": - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; - case "invalid_element": - return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue22.origin} \u06A9\u06D0`; - default: - return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; + }; + return fn(payload.value, payload); + }, params); + return ch; +} +// @__NO_SIDE_EFFECTS__ +function _check2(fn, params) { + const ch = new $ZodCheck2({ + check: "custom", + ...normalizeParams2(params) + }); + ch._zod.check = fn; + return ch; +} +// @__NO_SIDE_EFFECTS__ +function describe3(description) { + const ch = new $ZodCheck2({ check: "describe" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry2.get(inst) ?? {}; + globalRegistry2.add(inst, { ...existing, description }); } + ]; + ch._zod.check = () => { }; -}; -function ps_default3() { - return { - localeError: error322() - }; + return ch; } -var error332 = () => { - const Sizable = { - string: { unit: "znak\xF3w", verb: "mie\u0107" }, - file: { unit: "bajt\xF3w", verb: "mie\u0107" }, - array: { unit: "element\xF3w", verb: "mie\u0107" }, - set: { unit: "element\xF3w", verb: "mie\u0107" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "wyra\u017Cenie", - email: "adres email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data i godzina w formacie ISO", - date: "data w formacie ISO", - time: "godzina w formacie ISO", - duration: "czas trwania ISO", - ipv4: "adres IPv4", - ipv6: "adres IPv6", - cidrv4: "zakres IPv4", - cidrv6: "zakres IPv6", - base64: "ci\u0105g znak\xF3w zakodowany w formacie base64", - base64url: "ci\u0105g znak\xF3w zakodowany w formacie base64url", - json_string: "ci\u0105g znak\xF3w w formacie JSON", - e164: "liczba E.164", - jwt: "JWT", - template_literal: "wej\u015Bcie" - }; - const TypeDictionary = { - nan: "NaN", - number: "liczba", - array: "tablica" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${issue22.expected}, otrzymano ${received}`; - } - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${expected}, otrzymano ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive3(issue22.values[0])}`; - return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue22.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; - } - return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue22.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue22.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue22.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; - } - return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue22.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${_issue.includes}"`; - if (_issue.format === "regex") - return `Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${_issue.pattern}`; - return `Nieprawid\u0142ow(y/a/e) ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue22.divisor}`; - case "unrecognized_keys": - return `Nierozpoznane klucze${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue22.origin}`; - case "invalid_union": - return "Nieprawid\u0142owe dane wej\u015Bciowe"; - case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue22.origin}`; - default: - return `Nieprawid\u0142owe dane wej\u015Bciowe`; +// @__NO_SIDE_EFFECTS__ +function meta3(metadata) { + const ch = new $ZodCheck2({ check: "meta" }); + ch._zod.onattach = [ + (inst) => { + const existing = globalRegistry2.get(inst) ?? {}; + globalRegistry2.add(inst, { ...existing, ...metadata }); } + ]; + ch._zod.check = () => { }; -}; -function pl_default3() { - return { - localeError: error332() - }; + return ch; } -var error342 = () => { - const Sizable = { - string: { unit: "caracteres", verb: "ter" }, - file: { unit: "bytes", verb: "ter" }, - array: { unit: "itens", verb: "ter" }, - set: { unit: "itens", verb: "ter" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +// @__NO_SIDE_EFFECTS__ +function _stringbool2(Classes, _params) { + const params = normalizeParams2(_params); + let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; + let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; + if (params.case !== "sensitive") { + truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); + falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); } - const FormatDictionary = { - regex: "padr\xE3o", - email: "endere\xE7o de e-mail", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "data e hora ISO", - date: "data ISO", - time: "hora ISO", - duration: "dura\xE7\xE3o ISO", - ipv4: "endere\xE7o IPv4", - ipv6: "endere\xE7o IPv6", - cidrv4: "faixa de IPv4", - cidrv6: "faixa de IPv6", - base64: "texto codificado em base64", - base64url: "URL codificada em base64", - json_string: "texto JSON", - e164: "n\xFAmero E.164", - jwt: "JWT", - template_literal: "entrada" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\xFAmero", - null: "nulo" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Tipo inv\xE1lido: esperado instanceof ${issue22.expected}, recebido ${received}`; - } - return `Tipo inv\xE1lido: esperado ${expected}, recebido ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Entrada inv\xE1lida: esperado ${stringifyPrimitive3(issue22.values[0])}`; - return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Muito grande: esperado que ${issue22.origin ?? "valor"} tivesse ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Muito grande: esperado que ${issue22.origin ?? "valor"} fosse ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Muito pequeno: esperado que ${issue22.origin} tivesse ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Muito pequeno: esperado que ${issue22.origin} fosse ${adj}${issue22.minimum.toString()}`; + const truthySet = new Set(truthyArray); + const falsySet = new Set(falsyArray); + const _Codec = Classes.Codec ?? $ZodCodec2; + const _Boolean = Classes.Boolean ?? $ZodBoolean2; + const _String = Classes.String ?? $ZodString2; + const stringSchema = new _String({ type: "string", error: params.error }); + const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); + const codec3 = new _Codec({ + type: "pipe", + in: stringSchema, + out: booleanSchema, + transform: ((input, payload) => { + let data = input; + if (params.case !== "sensitive") + data = data.toLowerCase(); + if (truthySet.has(data)) { + return true; + } else if (falsySet.has(data)) { + return false; + } else { + payload.issues.push({ + code: "invalid_value", + expected: "stringbool", + values: [...truthySet, ...falsySet], + input: payload.value, + inst: codec3, + continue: false + }); + return {}; } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Texto inv\xE1lido: deve terminar com "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; - if (_issue.format === "regex") - return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} inv\xE1lido`; + }), + reverseTransform: ((input, _payload) => { + if (input === true) { + return truthyArray[0] || "true"; + } else { + return falsyArray[0] || "false"; } - case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue22.divisor}`; - case "unrecognized_keys": - return `Chave${issue22.keys.length > 1 ? "s" : ""} desconhecida${issue22.keys.length > 1 ? "s" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Chave inv\xE1lida em ${issue22.origin}`; - case "invalid_union": - return "Entrada inv\xE1lida"; - case "invalid_element": - return `Valor inv\xE1lido em ${issue22.origin}`; - default: - return `Campo inv\xE1lido`; - } + }), + error: params.error + }); + return codec3; +} +// @__NO_SIDE_EFFECTS__ +function _stringFormat2(Class3, format2, fnOrRegex, _params = {}) { + const params = normalizeParams2(_params); + const def = { + ...normalizeParams2(_params), + check: "string_format", + type: "string", + format: format2, + fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), + ...params }; -}; -function pt_default3() { + if (fnOrRegex instanceof RegExp) { + def.pattern = fnOrRegex; + } + const inst = new Class3(def); + return inst; +} + +// node_modules/zod/v4/core/to-json-schema.js +function initializeContext2(params) { + let target = params?.target ?? "draft-2020-12"; + if (target === "draft-4") + target = "draft-04"; + if (target === "draft-7") + target = "draft-07"; return { - localeError: error342() + processors: params.processors ?? {}, + metadataRegistry: params?.metadata ?? globalRegistry2, + target, + unrepresentable: params?.unrepresentable ?? "throw", + override: params?.override ?? (() => { + }), + io: params?.io ?? "output", + counter: 0, + seen: /* @__PURE__ */ new Map(), + cycles: params?.cycles ?? "ref", + reused: params?.reused ?? "inline", + external: params?.external ?? void 0 }; } -function getRussianPlural3(count, one, few, many) { - const absCount = Math.abs(count); - const lastDigit = absCount % 10; - const lastTwoDigits = absCount % 100; - if (lastTwoDigits >= 11 && lastTwoDigits <= 19) { - return many; +function process3(schema, ctx, _params = { path: [], schemaPath: [] }) { + var _a4; + const def = schema._zod.def; + const seen = ctx.seen.get(schema); + if (seen) { + seen.count++; + const isCycle = _params.schemaPath.includes(schema); + if (isCycle) { + seen.cycle = _params.path; + } + return seen.schema; } - if (lastDigit === 1) { - return one; + const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; + ctx.seen.set(schema, result); + const overrideSchema = schema._zod.toJSONSchema?.(); + if (overrideSchema) { + result.schema = overrideSchema; + } else { + const params = { + ..._params, + schemaPath: [..._params.schemaPath, schema], + path: _params.path + }; + if (schema._zod.processJSONSchema) { + schema._zod.processJSONSchema(ctx, result.schema, params); + } else { + const _json = result.schema; + const processor = ctx.processors[def.type]; + if (!processor) { + throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); + } + processor(schema, ctx, _json, params); + } + const parent = schema._zod.parent; + if (parent) { + if (!result.ref) + result.ref = parent; + process3(parent, ctx, params); + ctx.seen.get(parent).isParent = true; + } } - if (lastDigit >= 2 && lastDigit <= 4) { - return few; + const meta5 = ctx.metadataRegistry.get(schema); + if (meta5) + Object.assign(result.schema, meta5); + if (ctx.io === "input" && isTransforming2(schema)) { + delete result.schema.examples; + delete result.schema.default; } - return many; + if (ctx.io === "input" && "_prefault" in result.schema) + (_a4 = result.schema).default ?? (_a4.default = result.schema._prefault); + delete result.schema._prefault; + const _result = ctx.seen.get(schema); + return _result.schema; } -var error352 = () => { - const Sizable = { - string: { - unit: { - one: "\u0441\u0438\u043C\u0432\u043E\u043B", - few: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", - many: "\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - file: { - unit: { - one: "\u0431\u0430\u0439\u0442", - few: "\u0431\u0430\u0439\u0442\u0430", - many: "\u0431\u0430\u0439\u0442" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - array: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - }, - set: { - unit: { - one: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442", - few: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", - many: "\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432" - }, - verb: "\u0438\u043C\u0435\u0442\u044C" - } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u0432\u0432\u043E\u0434", - email: "email \u0430\u0434\u0440\u0435\u0441", - url: "URL", - emoji: "\u044D\u043C\u043E\u0434\u0437\u0438", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F", - date: "ISO \u0434\u0430\u0442\u0430", - time: "ISO \u0432\u0440\u0435\u043C\u044F", - duration: "ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C", - ipv4: "IPv4 \u0430\u0434\u0440\u0435\u0441", - ipv6: "IPv6 \u0430\u0434\u0440\u0435\u0441", - cidrv4: "IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - cidrv6: "IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D", - base64: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64", - base64url: "\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url", - json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0432\u043E\u0434" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0441\u0438\u0432" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${issue22.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; - } - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${stringifyPrimitive3(issue22.values[0])}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - const maxValue = Number(issue22.maximum); - const unit = getRussianPlural3(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue22.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue22.maximum.toString()} ${unit}`; - } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue22.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - const minValue = Number(issue22.minimum); - const unit = getRussianPlural3(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many); - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue22.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue22.minimum.toString()} ${unit}`; - } - return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${issue22.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${FormatDictionary[_issue.format] ?? issue22.format}`; +function extractDefs2(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const idToSchema = /* @__PURE__ */ new Map(); + for (const entry of ctx.seen.entries()) { + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + const existing = idToSchema.get(id); + if (existing && existing !== entry[0]) { + throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); } - case "not_multiple_of": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${issue22.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue22.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue22.keys.length > 1 ? "\u0438" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue22.origin}`; - case "invalid_union": - return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"; - case "invalid_element": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue22.origin}`; - default: - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; + idToSchema.set(id, entry[0]); } - }; -}; -function ru_default3() { - return { - localeError: error352() - }; -} -var error362 = () => { - const Sizable = { - string: { unit: "znakov", verb: "imeti" }, - file: { unit: "bajtov", verb: "imeti" }, - array: { unit: "elementov", verb: "imeti" }, - set: { unit: "elementov", verb: "imeti" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "vnos", - email: "e-po\u0161tni naslov", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO datum in \u010Das", - date: "ISO datum", - time: "ISO \u010Das", - duration: "ISO trajanje", - ipv4: "IPv4 naslov", - ipv6: "IPv6 naslov", - cidrv4: "obseg IPv4", - cidrv6: "obseg IPv6", - base64: "base64 kodiran niz", - base64url: "base64url kodiran niz", - json_string: "JSON niz", - e164: "E.164 \u0161tevilka", - jwt: "JWT", - template_literal: "vnos" + const makeURI = (entry) => { + const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; + if (ctx.external) { + const externalId = ctx.external.registry.get(entry[0])?.id; + const uriGenerator = ctx.external.uri ?? ((id2) => id2); + if (externalId) { + return { ref: uriGenerator(externalId) }; + } + const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; + entry[1].defId = id; + return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; + } + if (entry[1] === root) { + return { ref: "#" }; + } + const uriPrefix = `#`; + const defUriPrefix = `${uriPrefix}/${defsSegment}/`; + const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; + return { defId, ref: defUriPrefix + defId }; }; - const TypeDictionary = { - nan: "NaN", - number: "\u0161tevilo", - array: "tabela" + const extractToDef = (entry) => { + if (entry[1].schema.$ref) { + return; + } + const seen = entry[1]; + const { ref, defId } = makeURI(entry); + seen.def = { ...seen.schema }; + if (defId) + seen.defId = defId; + const schema2 = seen.schema; + for (const key in schema2) { + delete schema2[key]; + } + schema2.$ref = ref; }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Neveljaven vnos: pri\u010Dakovano instanceof ${issue22.expected}, prejeto ${received}`; - } - return `Neveljaven vnos: pri\u010Dakovano ${expected}, prejeto ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive3(issue22.values[0])}`; - return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Preveliko: pri\u010Dakovano, da bo ${issue22.origin ?? "vrednost"} imelo ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "elementov"}`; - return `Preveliko: pri\u010Dakovano, da bo ${issue22.origin ?? "vrednost"} ${adj}${issue22.maximum.toString()}`; + if (ctx.cycles === "throw") { + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.cycle) { + throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue22.origin} imelo ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Premajhno: pri\u010Dakovano, da bo ${issue22.origin} ${adj}${issue22.minimum.toString()}`; + } + } + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (schema === entry[0]) { + extractToDef(entry); + continue; + } + if (ctx.external) { + const ext = ctx.external.registry.get(entry[0])?.id; + if (schema !== entry[0] && ext) { + extractToDef(entry); + continue; } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `Neveljaven niz: mora se kon\u010Dati z "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; - if (_issue.format === "regex") - return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; - return `Neveljaven ${FormatDictionary[_issue.format] ?? issue22.format}`; + } + const id = ctx.metadataRegistry.get(entry[0])?.id; + if (id) { + extractToDef(entry); + continue; + } + if (seen.cycle) { + extractToDef(entry); + continue; + } + if (seen.count > 1) { + if (ctx.reused === "ref") { + extractToDef(entry); + continue; } - case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue22.divisor}`; - case "unrecognized_keys": - return `Neprepoznan${issue22.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Neveljaven klju\u010D v ${issue22.origin}`; - case "invalid_union": - return "Neveljaven vnos"; - case "invalid_element": - return `Neveljavna vrednost v ${issue22.origin}`; - default: - return "Neveljaven vnos"; } - }; -}; -function sl_default3() { - return { - localeError: error362() - }; -} -var error372 = () => { - const Sizable = { - string: { unit: "tecken", verb: "att ha" }, - file: { unit: "bytes", verb: "att ha" }, - array: { unit: "objekt", verb: "att inneh\xE5lla" }, - set: { unit: "objekt", verb: "att inneh\xE5lla" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; } - const FormatDictionary = { - regex: "regulj\xE4rt uttryck", - email: "e-postadress", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO-datum och tid", - date: "ISO-datum", - time: "ISO-tid", - duration: "ISO-varaktighet", - ipv4: "IPv4-intervall", - ipv6: "IPv6-intervall", - cidrv4: "IPv4-spektrum", - cidrv6: "IPv6-spektrum", - base64: "base64-kodad str\xE4ng", - base64url: "base64url-kodad str\xE4ng", - json_string: "JSON-str\xE4ng", - e164: "E.164-nummer", - jwt: "JWT", - template_literal: "mall-literal" - }; - const TypeDictionary = { - nan: "NaN", - number: "antal", - array: "lista" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${issue22.expected}, fick ${received}`; - } - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${expected}, fick ${received}`; +} +function finalize2(ctx, schema) { + const root = ctx.seen.get(schema); + if (!root) + throw new Error("Unprocessed schema. This is a bug in Zod."); + const flattenRef = (zodSchema) => { + const seen = ctx.seen.get(zodSchema); + if (seen.ref === null) + return; + const schema2 = seen.def ?? seen.schema; + const _cached = { ...schema2 }; + const ref = seen.ref; + seen.ref = null; + if (ref) { + flattenRef(ref); + const refSeen = ctx.seen.get(ref); + const refSchema = refSeen.schema; + if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { + schema2.allOf = schema2.allOf ?? []; + schema2.allOf.push(refSchema); + } else { + Object.assign(schema2, refSchema); } - case "invalid_value": - if (issue22.values.length === 1) - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive3(issue22.values[0])}`; - return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue22.origin ?? "v\xE4rdet"} att ha ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "element"}`; + Object.assign(schema2, _cached); + const isParentRef = zodSchema._zod.parent === ref; + if (isParentRef) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (!(key in _cached)) { + delete schema2[key]; + } } - return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue22.origin ?? "v\xE4rdet"} att ha ${adj}${issue22.maximum.toString()}`; } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue22.origin ?? "v\xE4rdet"} att ha ${adj}${issue22.minimum.toString()} ${sizing.unit}`; + if (refSchema.$ref && refSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { + delete schema2[key]; + } } - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue22.origin ?? "v\xE4rdet"} att ha ${adj}${issue22.minimum.toString()}`; } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; + } + const parent = zodSchema._zod.parent; + if (parent && parent !== ref) { + flattenRef(parent); + const parentSeen = ctx.seen.get(parent); + if (parentSeen?.schema.$ref) { + schema2.$ref = parentSeen.schema.$ref; + if (parentSeen.def) { + for (const key in schema2) { + if (key === "$ref" || key === "allOf") + continue; + if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { + delete schema2[key]; + } + } } - if (_issue.format === "ends_with") - return `Ogiltig str\xE4ng: m\xE5ste sluta med "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${_issue.includes}"`; - if (_issue.format === "regex") - return `Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${_issue.pattern}"`; - return `Ogiltig(t) ${FormatDictionary[_issue.format] ?? issue22.format}`; } - case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue22.divisor}`; - case "unrecognized_keys": - return `${issue22.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Ogiltig nyckel i ${issue22.origin ?? "v\xE4rdet"}`; - case "invalid_union": - return "Ogiltig input"; - case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue22.origin ?? "v\xE4rdet"}`; - default: - return `Ogiltig input`; } + ctx.override({ + zodSchema, + jsonSchema: schema2, + path: seen.path ?? [] + }); }; -}; -function sv_default3() { - return { - localeError: error372() - }; -} -var error382 = () => { - const Sizable = { - string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }, - set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + for (const entry of [...ctx.seen.entries()].reverse()) { + flattenRef(entry[0]); } - const FormatDictionary = { - regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1", - email: "\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - date: "ISO \u0BA4\u0BC7\u0BA4\u0BBF", - time: "ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD", - duration: "ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1", - ipv4: "IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - ipv6: "IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF", - cidrv4: "IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - cidrv6: "IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1", - base64: "base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - base64url: "base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD", - json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD", - e164: "E.164 \u0B8E\u0BA3\u0BCD", - jwt: "JWT", - template_literal: "input" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0B8E\u0BA3\u0BCD", - array: "\u0B85\u0BA3\u0BBF", - null: "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${issue22.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; - } - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${stringifyPrimitive3(issue22.values[0])}`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${joinValues3(issue22.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue22.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - return `\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue22.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue22.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + const result = {}; + if (ctx.target === "draft-2020-12") { + result.$schema = "https://json-schema.org/draft/2020-12/schema"; + } else if (ctx.target === "draft-07") { + result.$schema = "http://json-schema.org/draft-07/schema#"; + } else if (ctx.target === "draft-04") { + result.$schema = "http://json-schema.org/draft-04/schema#"; + } else if (ctx.target === "openapi-3.0") { + } else { + } + if (ctx.external?.uri) { + const id = ctx.external.registry.get(schema)?.id; + if (!id) + throw new Error("Schema is missing an `id` property"); + result.$id = ctx.external.uri(id); + } + Object.assign(result, root.def ?? root.schema); + const rootMetaId = ctx.metadataRegistry.get(schema)?.id; + if (rootMetaId !== void 0 && result.id === rootMetaId) + delete result.id; + const defs = ctx.external?.defs ?? {}; + for (const entry of ctx.seen.entries()) { + const seen = entry[1]; + if (seen.def && seen.defId) { + if (seen.def.id === seen.defId) + delete seen.def.id; + defs[seen.defId] = seen.def; + } + } + if (ctx.external) { + } else { + if (Object.keys(defs).length > 0) { + if (ctx.target === "draft-2020-12") { + result.$defs = defs; + } else { + result.definitions = defs; } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + } + } + try { + const finalized = JSON.parse(JSON.stringify(result)); + Object.defineProperty(finalized, "~standard", { + value: { + ...schema["~standard"], + jsonSchema: { + input: createStandardJSONSchemaMethod2(schema, "input", ctx.processors), + output: createStandardJSONSchemaMethod2(schema, "output", ctx.processors) } - return `\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${issue22.origin} ${adj}${issue22.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "ends_with") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "includes") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${_issue.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - if (_issue.format === "regex") - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${_issue.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${FormatDictionary[_issue.format] ?? issue22.format}`; + }, + enumerable: false, + writable: false + }); + return finalized; + } catch (_err) { + throw new Error("Error converting schema to JSON."); + } +} +function isTransforming2(_schema, _ctx) { + const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; + if (ctx.seen.has(_schema)) + return false; + ctx.seen.add(_schema); + const def = _schema._zod.def; + if (def.type === "transform") + return true; + if (def.type === "array") + return isTransforming2(def.element, ctx); + if (def.type === "set") + return isTransforming2(def.valueType, ctx); + if (def.type === "lazy") + return isTransforming2(def.getter(), ctx); + if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { + return isTransforming2(def.innerType, ctx); + } + if (def.type === "intersection") { + return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx); + } + if (def.type === "record" || def.type === "map") { + return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx); + } + if (def.type === "pipe") { + if (_schema._zod.traits.has("$ZodCodec")) + return true; + return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx); + } + if (def.type === "object") { + for (const key in def.shape) { + if (isTransforming2(def.shape[key], ctx)) + return true; + } + return false; + } + if (def.type === "union") { + for (const option of def.options) { + if (isTransforming2(option, ctx)) + return true; + } + return false; + } + if (def.type === "tuple") { + for (const item of def.items) { + if (isTransforming2(item, ctx)) + return true; + } + if (def.rest && isTransforming2(def.rest, ctx)) + return true; + return false; + } + return false; +} +var createToJSONSchemaMethod2 = (schema, processors = {}) => (params) => { + const ctx = initializeContext2({ ...params, processors }); + process3(schema, ctx); + extractDefs2(ctx, schema); + return finalize2(ctx, schema); +}; +var createStandardJSONSchemaMethod2 = (schema, io, processors = {}) => (params) => { + const { libraryOptions, target } = params ?? {}; + const ctx = initializeContext2({ ...libraryOptions ?? {}, target, io, processors }); + process3(schema, ctx); + extractDefs2(ctx, schema); + return finalize2(ctx, schema); +}; + +// node_modules/zod/v4/core/json-schema-processors.js +var formatMap2 = { + guid: "uuid", + url: "uri", + datetime: "date-time", + json_string: "json-string", + regex: "" + // do not set +}; +var stringProcessor2 = (schema, ctx, _json, _params) => { + const json3 = _json; + json3.type = "string"; + const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; + if (typeof minimum === "number") + json3.minLength = minimum; + if (typeof maximum === "number") + json3.maxLength = maximum; + if (format2) { + json3.format = formatMap2[format2] ?? format2; + if (json3.format === "") + delete json3.format; + if (format2 === "time") { + delete json3.format; + } + } + if (contentEncoding) + json3.contentEncoding = contentEncoding; + if (patterns && patterns.size > 0) { + const regexes = [...patterns]; + if (regexes.length === 1) + json3.pattern = regexes[0].source; + else if (regexes.length > 1) { + json3.allOf = [ + ...regexes.map((regex2) => ({ + ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, + pattern: regex2.source + })) + ]; + } + } +}; +var numberProcessor2 = (schema, ctx, _json, _params) => { + const json3 = _json; + const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; + if (typeof format2 === "string" && format2.includes("int")) + json3.type = "integer"; + else + json3.type = "number"; + const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY); + const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY); + const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0"; + if (exMin) { + if (legacy) { + json3.minimum = exclusiveMinimum; + json3.exclusiveMinimum = true; + } else { + json3.exclusiveMinimum = exclusiveMinimum; + } + } else if (typeof minimum === "number") { + json3.minimum = minimum; + } + if (exMax) { + if (legacy) { + json3.maximum = exclusiveMaximum; + json3.exclusiveMaximum = true; + } else { + json3.exclusiveMaximum = exclusiveMaximum; + } + } else if (typeof maximum === "number") { + json3.maximum = maximum; + } + if (typeof multipleOf === "number") + json3.multipleOf = multipleOf; +}; +var booleanProcessor2 = (_schema, _ctx, json3, _params) => { + json3.type = "boolean"; +}; +var bigintProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt cannot be represented in JSON Schema"); + } +}; +var symbolProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Symbols cannot be represented in JSON Schema"); + } +}; +var nullProcessor2 = (_schema, ctx, json3, _params) => { + if (ctx.target === "openapi-3.0") { + json3.type = "string"; + json3.nullable = true; + json3.enum = [null]; + } else { + json3.type = "null"; + } +}; +var undefinedProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Undefined cannot be represented in JSON Schema"); + } +}; +var voidProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Void cannot be represented in JSON Schema"); + } +}; +var neverProcessor2 = (_schema, _ctx, json3, _params) => { + json3.not = {}; +}; +var anyProcessor2 = (_schema, _ctx, _json, _params) => { +}; +var unknownProcessor2 = (_schema, _ctx, _json, _params) => { +}; +var dateProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Date cannot be represented in JSON Schema"); + } +}; +var enumProcessor2 = (schema, _ctx, json3, _params) => { + const def = schema._zod.def; + const values = getEnumValues2(def.entries); + if (values.every((v) => typeof v === "number")) + json3.type = "number"; + if (values.every((v) => typeof v === "string")) + json3.type = "string"; + json3.enum = values; +}; +var literalProcessor2 = (schema, ctx, json3, _params) => { + const def = schema._zod.def; + const vals = []; + for (const val of def.values) { + if (val === void 0) { + if (ctx.unrepresentable === "throw") { + throw new Error("Literal `undefined` cannot be represented in JSON Schema"); + } else { } - case "not_multiple_of": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue22.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; - case "unrecognized_keys": - return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue22.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `${issue22.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; - case "invalid_union": - return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"; - case "invalid_element": - return `${issue22.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; - default: - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1`; + } else if (typeof val === "bigint") { + if (ctx.unrepresentable === "throw") { + throw new Error("BigInt literals cannot be represented in JSON Schema"); + } else { + vals.push(Number(val)); + } + } else { + vals.push(val); } - }; + } + if (vals.length === 0) { + } else if (vals.length === 1) { + const val = vals[0]; + json3.type = val === null ? "null" : typeof val; + if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { + json3.enum = [val]; + } else { + json3.const = val; + } + } else { + if (vals.every((v) => typeof v === "number")) + json3.type = "number"; + if (vals.every((v) => typeof v === "string")) + json3.type = "string"; + if (vals.every((v) => typeof v === "boolean")) + json3.type = "boolean"; + if (vals.every((v) => v === null)) + json3.type = "null"; + json3.enum = vals; + } }; -function ta_default3() { - return { - localeError: error382() - }; -} -var error392 = () => { - const Sizable = { - string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, - set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var nanProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("NaN cannot be represented in JSON Schema"); } - const FormatDictionary = { - regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19", - email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25", - url: "URL", - emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO", - time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO", - ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4", - ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6", - cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4", - cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6", - base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64", - base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL", - json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON", - e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)", - jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", - template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02", - array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)", - null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)" +}; +var templateLiteralProcessor2 = (schema, _ctx, json3, _params) => { + const _json = json3; + const pattern = schema._zod.pattern; + if (!pattern) + throw new Error("Pattern not found in template literal"); + _json.type = "string"; + _json.pattern = pattern.source; +}; +var fileProcessor2 = (schema, _ctx, json3, _params) => { + const _json = json3; + const file3 = { + type: "string", + format: "binary", + contentEncoding: "binary" }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue22.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; - } - return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${stringifyPrimitive3(issue22.values[0])}`; - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue22.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue22.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue22.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue22.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue22.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${_issue.prefix}"`; - } - if (_issue.format === "ends_with") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${_issue.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`; - if (_issue.format === "regex") - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${_issue.pattern}`; - return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${issue22.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; - case "unrecognized_keys": - return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue22.origin}`; - case "invalid_union": - return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49"; - case "invalid_element": - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue22.origin}`; - default: - return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; + const { minimum, maximum, mime } = schema._zod.bag; + if (minimum !== void 0) + file3.minLength = minimum; + if (maximum !== void 0) + file3.maxLength = maximum; + if (mime) { + if (mime.length === 1) { + file3.contentMediaType = mime[0]; + Object.assign(_json, file3); + } else { + Object.assign(_json, file3); + _json.anyOf = mime.map((m) => ({ contentMediaType: m })); } - }; + } else { + Object.assign(_json, file3); + } }; -function th_default3() { - return { - localeError: error392() - }; -} -var error402 = () => { - const Sizable = { - string: { unit: "karakter", verb: "olmal\u0131" }, - file: { unit: "bayt", verb: "olmal\u0131" }, - array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }, - set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var successProcessor2 = (_schema, _ctx, json3, _params) => { + json3.type = "boolean"; +}; +var customProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Custom types cannot be represented in JSON Schema"); } - const FormatDictionary = { - regex: "girdi", - email: "e-posta adresi", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO tarih ve saat", - date: "ISO tarih", - time: "ISO saat", - duration: "ISO s\xFCre", - ipv4: "IPv4 adresi", - ipv6: "IPv6 adresi", - cidrv4: "IPv4 aral\u0131\u011F\u0131", - cidrv6: "IPv6 aral\u0131\u011F\u0131", - base64: "base64 ile \u015Fifrelenmi\u015F metin", - base64url: "base64url ile \u015Fifrelenmi\u015F metin", - json_string: "JSON dizesi", - e164: "E.164 say\u0131s\u0131", - jwt: "JWT", - template_literal: "\u015Eablon dizesi" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Ge\xE7ersiz de\u011Fer: beklenen instanceof ${issue22.expected}, al\u0131nan ${received}`; - } - return `Ge\xE7ersiz de\u011Fer: beklenen ${expected}, al\u0131nan ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive3(issue22.values[0])}`; - return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\xC7ok b\xFCy\xFCk: beklenen ${issue22.origin ?? "de\u011Fer"} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; - return `\xC7ok b\xFCy\xFCk: beklenen ${issue22.origin ?? "de\u011Fer"} ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue22.origin} ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; - if (_issue.format === "ends_with") - return `Ge\xE7ersiz metin: "${_issue.suffix}" ile bitmeli`; - if (_issue.format === "includes") - return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; - if (_issue.format === "regex") - return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; - return `Ge\xE7ersiz ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue22.divisor} ile tam b\xF6l\xFCnebilmeli`; - case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue22.keys.length > 1 ? "lar" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `${issue22.origin} i\xE7inde ge\xE7ersiz anahtar`; - case "invalid_union": - return "Ge\xE7ersiz de\u011Fer"; - case "invalid_element": - return `${issue22.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; - default: - return `Ge\xE7ersiz de\u011Fer`; +}; +var functionProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Function types cannot be represented in JSON Schema"); + } +}; +var transformProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Transforms cannot be represented in JSON Schema"); + } +}; +var mapProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Map cannot be represented in JSON Schema"); + } +}; +var setProcessor2 = (_schema, ctx, _json, _params) => { + if (ctx.unrepresentable === "throw") { + throw new Error("Set cannot be represented in JSON Schema"); + } +}; +var arrayProcessor2 = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json3.minItems = minimum; + if (typeof maximum === "number") + json3.maxItems = maximum; + json3.type = "array"; + json3.items = process3(def.element, ctx, { + ...params, + path: [...params.path, "items"] + }); +}; +var objectProcessor2 = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + json3.type = "object"; + json3.properties = {}; + const shape = def.shape; + for (const key in shape) { + json3.properties[key] = process3(shape[key], ctx, { + ...params, + path: [...params.path, "properties", key] + }); + } + const allKeys = new Set(Object.keys(shape)); + const requiredKeys = new Set([...allKeys].filter((key) => { + const v = def.shape[key]._zod; + if (ctx.io === "input") { + return v.optin === void 0; + } else { + return v.optout === void 0; } - }; + })); + if (requiredKeys.size > 0) { + json3.required = Array.from(requiredKeys); + } + if (def.catchall?._zod.def.type === "never") { + json3.additionalProperties = false; + } else if (!def.catchall) { + if (ctx.io === "output") + json3.additionalProperties = false; + } else if (def.catchall) { + json3.additionalProperties = process3(def.catchall, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } }; -function tr_default3() { - return { - localeError: error402() - }; -} -var error412 = () => { - const Sizable = { - string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, - set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var unionProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + const isExclusive = def.inclusive === false; + const options = def.options.map((x, i) => process3(x, ctx, { + ...params, + path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] + })); + if (isExclusive) { + json3.oneOf = options; + } else { + json3.anyOf = options; } - const FormatDictionary = { - regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456", - email: "\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438", - url: "URL", - emoji: "\u0435\u043C\u043E\u0434\u0437\u0456", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO", - date: "\u0434\u0430\u0442\u0430 ISO", - time: "\u0447\u0430\u0441 ISO", - duration: "\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO", - ipv4: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv4", - ipv6: "\u0430\u0434\u0440\u0435\u0441\u0430 IPv6", - cidrv4: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4", - cidrv6: "\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6", - base64: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64", - base64url: "\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url", - json_string: "\u0440\u044F\u0434\u043E\u043A JSON", - e164: "\u043D\u043E\u043C\u0435\u0440 E.164", - jwt: "JWT", - template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0447\u0438\u0441\u043B\u043E", - array: "\u043C\u0430\u0441\u0438\u0432" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${issue22.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; - } - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${stringifyPrimitive3(issue22.values[0])}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue22.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`; - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue22.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue22.origin} ${sizing.verb} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${issue22.origin} \u0431\u0443\u0434\u0435 ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${_issue.pattern}`; - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${issue22.divisor}`; - case "unrecognized_keys": - return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue22.keys.length > 1 ? "\u0456" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue22.origin}`; - case "invalid_union": - return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"; - case "invalid_element": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue22.origin}`; - default: - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; +}; +var intersectionProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + const a = process3(def.left, ctx, { + ...params, + path: [...params.path, "allOf", 0] + }); + const b = process3(def.right, ctx, { + ...params, + path: [...params.path, "allOf", 1] + }); + const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; + const allOf = [ + ...isSimpleIntersection(a) ? a.allOf : [a], + ...isSimpleIntersection(b) ? b.allOf : [b] + ]; + json3.allOf = allOf; +}; +var tupleProcessor2 = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + json3.type = "array"; + const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; + const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; + const prefixItems = def.items.map((x, i) => process3(x, ctx, { + ...params, + path: [...params.path, prefixPath, i] + })); + const rest = def.rest ? process3(def.rest, ctx, { + ...params, + path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] + }) : null; + if (ctx.target === "draft-2020-12") { + json3.prefixItems = prefixItems; + if (rest) { + json3.items = rest; } - }; + } else if (ctx.target === "openapi-3.0") { + json3.items = { + anyOf: prefixItems + }; + if (rest) { + json3.items.anyOf.push(rest); + } + json3.minItems = prefixItems.length; + if (!rest) { + json3.maxItems = prefixItems.length; + } + } else { + json3.items = prefixItems; + if (rest) { + json3.additionalItems = rest; + } + } + const { minimum, maximum } = schema._zod.bag; + if (typeof minimum === "number") + json3.minItems = minimum; + if (typeof maximum === "number") + json3.maxItems = maximum; +}; +var recordProcessor2 = (schema, ctx, _json, params) => { + const json3 = _json; + const def = schema._zod.def; + json3.type = "object"; + const keyType = def.keyType; + const keyBag = keyType._zod.bag; + const patterns = keyBag?.patterns; + if (def.mode === "loose" && patterns && patterns.size > 0) { + const valueSchema = process3(def.valueType, ctx, { + ...params, + path: [...params.path, "patternProperties", "*"] + }); + json3.patternProperties = {}; + for (const pattern of patterns) { + json3.patternProperties[pattern.source] = valueSchema; + } + } else { + if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { + json3.propertyNames = process3(def.keyType, ctx, { + ...params, + path: [...params.path, "propertyNames"] + }); + } + json3.additionalProperties = process3(def.valueType, ctx, { + ...params, + path: [...params.path, "additionalProperties"] + }); + } + const keyValues = keyType._zod.values; + if (keyValues) { + const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number"); + if (validKeyValues.length > 0) { + json3.required = validKeyValues; + } + } +}; +var nullableProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + const inner = process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + if (ctx.target === "openapi-3.0") { + seen.ref = def.innerType; + json3.nullable = true; + } else { + json3.anyOf = [inner, { type: "null" }]; + } +}; +var nonoptionalProcessor2 = (schema, ctx, _json, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}; +var defaultProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json3.default = JSON.parse(JSON.stringify(def.defaultValue)); +}; +var prefaultProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + if (ctx.io === "input") + json3._prefault = JSON.parse(JSON.stringify(def.defaultValue)); +}; +var catchProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + let catchValue; + try { + catchValue = def.catchValue(void 0); + } catch { + throw new Error("Dynamic catch values are not supported in JSON Schema"); + } + json3.default = catchValue; +}; +var pipeProcessor2 = (schema, ctx, _json, params) => { + const def = schema._zod.def; + const inIsTransform = def.in._zod.traits.has("$ZodTransform"); + const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out; + process3(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; +}; +var readonlyProcessor2 = (schema, ctx, json3, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; + json3.readOnly = true; +}; +var promiseProcessor2 = (schema, ctx, _json, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}; +var optionalProcessor2 = (schema, ctx, _json, params) => { + const def = schema._zod.def; + process3(def.innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = def.innerType; +}; +var lazyProcessor2 = (schema, ctx, _json, params) => { + const innerType = schema._zod.innerType; + process3(innerType, ctx, params); + const seen = ctx.seen.get(schema); + seen.ref = innerType; +}; +var allProcessors2 = { + string: stringProcessor2, + number: numberProcessor2, + boolean: booleanProcessor2, + bigint: bigintProcessor2, + symbol: symbolProcessor2, + null: nullProcessor2, + undefined: undefinedProcessor2, + void: voidProcessor2, + never: neverProcessor2, + any: anyProcessor2, + unknown: unknownProcessor2, + date: dateProcessor2, + enum: enumProcessor2, + literal: literalProcessor2, + nan: nanProcessor2, + template_literal: templateLiteralProcessor2, + file: fileProcessor2, + success: successProcessor2, + custom: customProcessor2, + function: functionProcessor2, + transform: transformProcessor2, + map: mapProcessor2, + set: setProcessor2, + array: arrayProcessor2, + object: objectProcessor2, + union: unionProcessor2, + intersection: intersectionProcessor2, + tuple: tupleProcessor2, + record: recordProcessor2, + nullable: nullableProcessor2, + nonoptional: nonoptionalProcessor2, + default: defaultProcessor2, + prefault: prefaultProcessor2, + catch: catchProcessor2, + pipe: pipeProcessor2, + readonly: readonlyProcessor2, + promise: promiseProcessor2, + optional: optionalProcessor2, + lazy: lazyProcessor2 }; -function uk_default3() { - return { - localeError: error412() - }; -} -function ua_default3() { - return uk_default3(); +function toJSONSchema2(input, params) { + if ("_idmap" in input) { + const registry3 = input; + const ctx2 = initializeContext2({ ...params, processors: allProcessors2 }); + const defs = {}; + for (const entry of registry3._idmap.entries()) { + const [_, schema] = entry; + process3(schema, ctx2); + } + const schemas = {}; + const external = { + registry: registry3, + uri: params?.uri, + defs + }; + ctx2.external = external; + for (const entry of registry3._idmap.entries()) { + const [key, schema] = entry; + extractDefs2(ctx2, schema); + schemas[key] = finalize2(ctx2, schema); + } + if (Object.keys(defs).length > 0) { + const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; + schemas.__shared = { + [defsSegment]: defs + }; + } + return { schemas }; + } + const ctx = initializeContext2({ ...params, processors: allProcessors2 }); + process3(input, ctx); + extractDefs2(ctx, input); + return finalize2(ctx, input); } -var error422 = () => { - const Sizable = { - string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, - file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" }, - array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }, - set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; + +// node_modules/zod/v4/core/json-schema-generator.js +var JSONSchemaGenerator2 = class { + /** @deprecated Access via ctx instead */ + get metadataRegistry() { + return this.ctx.metadataRegistry; } - const FormatDictionary = { - regex: "\u0627\u0646 \u067E\u0679", - email: "\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633", - url: "\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644", - emoji: "\u0627\u06CC\u0645\u0648\u062C\u06CC", - uuid: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - uuidv4: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4", - uuidv6: "\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6", - nanoid: "\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC", - guid: "\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - cuid2: "\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2", - ulid: "\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC", - xid: "\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC", - ksuid: "\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC", - datetime: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645", - date: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E", - time: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A", - duration: "\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A", - ipv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633", - ipv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633", - cidrv4: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C", - cidrv6: "\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C", - base64: "\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - base64url: "\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF", - json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF", - e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631", - jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", - template_literal: "\u0627\u0646 \u067E\u0679" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u0646\u0645\u0628\u0631", - array: "\u0622\u0631\u06D2", - null: "\u0646\u0644" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${issue22.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; - } - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${received} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive3(issue22.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues3(issue22.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue22.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue22.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue22.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue22.origin} \u06A9\u06D2 ${adj}${issue22.minimum.toString()} ${sizing.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`; - } - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue22.origin} \u06A9\u0627 ${adj}${issue22.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - } - if (_issue.format === "ends_with") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - if (_issue.format === "includes") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${_issue.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - if (_issue.format === "regex") - return `\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${_issue.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - return `\u063A\u0644\u0637 ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue22.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; - case "unrecognized_keys": - return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue22.keys.length > 1 ? "\u0632" : ""}: ${joinValues3(issue22.keys, "\u060C ")}`; - case "invalid_key": - return `${issue22.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; - case "invalid_union": - return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; - case "invalid_element": - return `${issue22.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; - default: - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; + /** @deprecated Access via ctx instead */ + get target() { + return this.ctx.target; + } + /** @deprecated Access via ctx instead */ + get unrepresentable() { + return this.ctx.unrepresentable; + } + /** @deprecated Access via ctx instead */ + get override() { + return this.ctx.override; + } + /** @deprecated Access via ctx instead */ + get io() { + return this.ctx.io; + } + /** @deprecated Access via ctx instead */ + get counter() { + return this.ctx.counter; + } + set counter(value) { + this.ctx.counter = value; + } + /** @deprecated Access via ctx instead */ + get seen() { + return this.ctx.seen; + } + constructor(params) { + let normalizedTarget = params?.target ?? "draft-2020-12"; + if (normalizedTarget === "draft-4") + normalizedTarget = "draft-04"; + if (normalizedTarget === "draft-7") + normalizedTarget = "draft-07"; + this.ctx = initializeContext2({ + processors: allProcessors2, + target: normalizedTarget, + ...params?.metadata && { metadata: params.metadata }, + ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, + ...params?.override && { override: params.override }, + ...params?.io && { io: params.io } + }); + } + /** + * Process a schema to prepare it for JSON Schema generation. + * This must be called before emit(). + */ + process(schema, _params = { path: [], schemaPath: [] }) { + return process3(schema, this.ctx, _params); + } + /** + * Emit the final JSON Schema after processing. + * Must call process() first. + */ + emit(schema, _params) { + if (_params) { + if (_params.cycles) + this.ctx.cycles = _params.cycles; + if (_params.reused) + this.ctx.reused = _params.reused; + if (_params.external) + this.ctx.external = _params.external; } - }; + extractDefs2(this.ctx, schema); + const result = finalize2(this.ctx, schema); + const { "~standard": _, ...plainResult } = result; + return plainResult; + } }; -function ur_default3() { - return { - localeError: error422() - }; + +// node_modules/zod/v4/core/json-schema.js +var json_schema_exports2 = {}; + +// node_modules/zod/v4/classic/schemas.js +var schemas_exports4 = {}; +__export(schemas_exports4, { + ZodAny: () => ZodAny2, + ZodArray: () => ZodArray2, + ZodBase64: () => ZodBase642, + ZodBase64URL: () => ZodBase64URL2, + ZodBigInt: () => ZodBigInt2, + ZodBigIntFormat: () => ZodBigIntFormat2, + ZodBoolean: () => ZodBoolean2, + ZodCIDRv4: () => ZodCIDRv42, + ZodCIDRv6: () => ZodCIDRv62, + ZodCUID: () => ZodCUID3, + ZodCUID2: () => ZodCUID22, + ZodCatch: () => ZodCatch2, + ZodCodec: () => ZodCodec2, + ZodCustom: () => ZodCustom2, + ZodCustomStringFormat: () => ZodCustomStringFormat2, + ZodDate: () => ZodDate2, + ZodDefault: () => ZodDefault2, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, + ZodE164: () => ZodE1642, + ZodEmail: () => ZodEmail2, + ZodEmoji: () => ZodEmoji2, + ZodEnum: () => ZodEnum2, + ZodExactOptional: () => ZodExactOptional2, + ZodFile: () => ZodFile2, + ZodFunction: () => ZodFunction2, + ZodGUID: () => ZodGUID2, + ZodIPv4: () => ZodIPv42, + ZodIPv6: () => ZodIPv62, + ZodIntersection: () => ZodIntersection2, + ZodJWT: () => ZodJWT2, + ZodKSUID: () => ZodKSUID2, + ZodLazy: () => ZodLazy2, + ZodLiteral: () => ZodLiteral2, + ZodMAC: () => ZodMAC2, + ZodMap: () => ZodMap2, + ZodNaN: () => ZodNaN2, + ZodNanoID: () => ZodNanoID2, + ZodNever: () => ZodNever2, + ZodNonOptional: () => ZodNonOptional2, + ZodNull: () => ZodNull2, + ZodNullable: () => ZodNullable2, + ZodNumber: () => ZodNumber2, + ZodNumberFormat: () => ZodNumberFormat2, + ZodObject: () => ZodObject2, + ZodOptional: () => ZodOptional2, + ZodPipe: () => ZodPipe2, + ZodPrefault: () => ZodPrefault2, + ZodPreprocess: () => ZodPreprocess, + ZodPromise: () => ZodPromise2, + ZodReadonly: () => ZodReadonly2, + ZodRecord: () => ZodRecord2, + ZodSet: () => ZodSet2, + ZodString: () => ZodString2, + ZodStringFormat: () => ZodStringFormat2, + ZodSuccess: () => ZodSuccess2, + ZodSymbol: () => ZodSymbol2, + ZodTemplateLiteral: () => ZodTemplateLiteral2, + ZodTransform: () => ZodTransform2, + ZodTuple: () => ZodTuple2, + ZodType: () => ZodType2, + ZodULID: () => ZodULID2, + ZodURL: () => ZodURL2, + ZodUUID: () => ZodUUID2, + ZodUndefined: () => ZodUndefined2, + ZodUnion: () => ZodUnion2, + ZodUnknown: () => ZodUnknown2, + ZodVoid: () => ZodVoid2, + ZodXID: () => ZodXID2, + ZodXor: () => ZodXor2, + _ZodString: () => _ZodString2, + _default: () => _default4, + _function: () => _function2, + any: () => any2, + array: () => array2, + base64: () => base644, + base64url: () => base64url4, + bigint: () => bigint5, + boolean: () => boolean5, + catch: () => _catch4, + check: () => check2, + cidrv4: () => cidrv44, + cidrv6: () => cidrv64, + codec: () => codec2, + cuid: () => cuid5, + cuid2: () => cuid24, + custom: () => custom2, + date: () => date7, + describe: () => describe4, + discriminatedUnion: () => discriminatedUnion2, + e164: () => e1644, + email: () => email4, + emoji: () => emoji4, + enum: () => _enum4, + exactOptional: () => exactOptional2, + file: () => file2, + float32: () => float322, + float64: () => float642, + function: () => _function2, + guid: () => guid4, + hash: () => hash2, + hex: () => hex4, + hostname: () => hostname4, + httpUrl: () => httpUrl2, + instanceof: () => _instanceof2, + int: () => int2, + int32: () => int322, + int64: () => int642, + intersection: () => intersection2, + invertCodec: () => invertCodec, + ipv4: () => ipv44, + ipv6: () => ipv64, + json: () => json2, + jwt: () => jwt2, + keyof: () => keyof2, + ksuid: () => ksuid4, + lazy: () => lazy2, + literal: () => literal2, + looseObject: () => looseObject2, + looseRecord: () => looseRecord2, + mac: () => mac4, + map: () => map2, + meta: () => meta4, + nan: () => nan2, + nanoid: () => nanoid4, + nativeEnum: () => nativeEnum2, + never: () => never2, + nonoptional: () => nonoptional2, + null: () => _null6, + nullable: () => nullable2, + nullish: () => nullish4, + number: () => number5, + object: () => object2, + optional: () => optional2, + partialRecord: () => partialRecord2, + pipe: () => pipe2, + prefault: () => prefault2, + preprocess: () => preprocess2, + promise: () => promise2, + readonly: () => readonly2, + record: () => record2, + refine: () => refine2, + set: () => set2, + strictObject: () => strictObject2, + string: () => string5, + stringFormat: () => stringFormat2, + stringbool: () => stringbool2, + success: () => success2, + superRefine: () => superRefine2, + symbol: () => symbol2, + templateLiteral: () => templateLiteral2, + transform: () => transform2, + tuple: () => tuple2, + uint32: () => uint322, + uint64: () => uint642, + ulid: () => ulid4, + undefined: () => _undefined6, + union: () => union2, + unknown: () => unknown2, + url: () => url3, + uuid: () => uuid5, + uuidv4: () => uuidv42, + uuidv6: () => uuidv62, + uuidv7: () => uuidv72, + void: () => _void4, + xid: () => xid4, + xor: () => xor2 +}); + +// node_modules/zod/v4/classic/checks.js +var checks_exports4 = {}; +__export(checks_exports4, { + endsWith: () => _endsWith2, + gt: () => _gt2, + gte: () => _gte2, + includes: () => _includes2, + length: () => _length2, + lowercase: () => _lowercase2, + lt: () => _lt2, + lte: () => _lte2, + maxLength: () => _maxLength2, + maxSize: () => _maxSize2, + mime: () => _mime2, + minLength: () => _minLength2, + minSize: () => _minSize2, + multipleOf: () => _multipleOf2, + negative: () => _negative2, + nonnegative: () => _nonnegative2, + nonpositive: () => _nonpositive2, + normalize: () => _normalize2, + overwrite: () => _overwrite2, + positive: () => _positive2, + property: () => _property2, + regex: () => _regex2, + size: () => _size2, + slugify: () => _slugify2, + startsWith: () => _startsWith2, + toLowerCase: () => _toLowerCase2, + toUpperCase: () => _toUpperCase2, + trim: () => _trim2, + uppercase: () => _uppercase2 +}); + +// node_modules/zod/v4/classic/iso.js +var iso_exports2 = {}; +__export(iso_exports2, { + ZodISODate: () => ZodISODate2, + ZodISODateTime: () => ZodISODateTime2, + ZodISODuration: () => ZodISODuration2, + ZodISOTime: () => ZodISOTime2, + date: () => date6, + datetime: () => datetime4, + duration: () => duration4, + time: () => time4 +}); +var ZodISODateTime2 = /* @__PURE__ */ $constructor2("ZodISODateTime", (inst, def) => { + $ZodISODateTime2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function datetime4(params) { + return _isoDateTime2(ZodISODateTime2, params); } -var error432 = () => { - const Sizable = { - string: { unit: "belgi", verb: "bo\u2018lishi kerak" }, - file: { unit: "bayt", verb: "bo\u2018lishi kerak" }, - array: { unit: "element", verb: "bo\u2018lishi kerak" }, - set: { unit: "element", verb: "bo\u2018lishi kerak" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "kirish", - email: "elektron pochta manzili", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO sana va vaqti", - date: "ISO sana", - time: "ISO vaqt", - duration: "ISO davomiylik", - ipv4: "IPv4 manzil", - ipv6: "IPv6 manzil", - mac: "MAC manzil", - cidrv4: "IPv4 diapazon", - cidrv6: "IPv6 diapazon", - base64: "base64 kodlangan satr", - base64url: "base64url kodlangan satr", - json_string: "JSON satr", - e164: "E.164 raqam", - jwt: "JWT", - template_literal: "kirish" - }; - const TypeDictionary = { - nan: "NaN", - number: "raqam", - array: "massiv" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `Noto\u2018g\u2018ri kirish: kutilgan instanceof ${issue22.expected}, qabul qilingan ${received}`; - } - return `Noto\u2018g\u2018ri kirish: kutilgan ${expected}, qabul qilingan ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `Noto\u2018g\u2018ri kirish: kutilgan ${stringifyPrimitive3(issue22.values[0])}`; - return `Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Juda katta: kutilgan ${issue22.origin ?? "qiymat"} ${adj}${issue22.maximum.toString()} ${sizing.unit} ${sizing.verb}`; - return `Juda katta: kutilgan ${issue22.origin ?? "qiymat"} ${adj}${issue22.maximum.toString()}`; +var ZodISODate2 = /* @__PURE__ */ $constructor2("ZodISODate", (inst, def) => { + $ZodISODate2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function date6(params) { + return _isoDate2(ZodISODate2, params); +} +var ZodISOTime2 = /* @__PURE__ */ $constructor2("ZodISOTime", (inst, def) => { + $ZodISOTime2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function time4(params) { + return _isoTime2(ZodISOTime2, params); +} +var ZodISODuration2 = /* @__PURE__ */ $constructor2("ZodISODuration", (inst, def) => { + $ZodISODuration2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function duration4(params) { + return _isoDuration2(ZodISODuration2, params); +} + +// node_modules/zod/v4/classic/errors.js +var initializer4 = (inst, issues) => { + $ZodError2.init(inst, issues); + inst.name = "ZodError"; + Object.defineProperties(inst, { + format: { + value: (mapper) => formatError2(inst, mapper) + // enumerable: false, + }, + flatten: { + value: (mapper) => flattenError2(inst, mapper) + // enumerable: false, + }, + addIssue: { + value: (issue4) => { + inst.issues.push(issue4); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Juda kichik: kutilgan ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit} ${sizing.verb}`; - } - return `Juda kichik: kutilgan ${issue22.origin} ${adj}${issue22.minimum.toString()}`; + // enumerable: false, + }, + addIssues: { + value: (issues2) => { + inst.issues.push(...issues2); + inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Noto\u2018g\u2018ri satr: "${_issue.prefix}" bilan boshlanishi kerak`; - if (_issue.format === "ends_with") - return `Noto\u2018g\u2018ri satr: "${_issue.suffix}" bilan tugashi kerak`; - if (_issue.format === "includes") - return `Noto\u2018g\u2018ri satr: "${_issue.includes}" ni o\u2018z ichiga olishi kerak`; - if (_issue.format === "regex") - return `Noto\u2018g\u2018ri satr: ${_issue.pattern} shabloniga mos kelishi kerak`; - return `Noto\u2018g\u2018ri ${FormatDictionary[_issue.format] ?? issue22.format}`; + // enumerable: false, + }, + isEmpty: { + get() { + return inst.issues.length === 0; } - case "not_multiple_of": - return `Noto\u2018g\u2018ri raqam: ${issue22.divisor} ning karralisi bo\u2018lishi kerak`; - case "unrecognized_keys": - return `Noma\u2019lum kalit${issue22.keys.length > 1 ? "lar" : ""}: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `${issue22.origin} dagi kalit noto\u2018g\u2018ri`; - case "invalid_union": - return "Noto\u2018g\u2018ri kirish"; - case "invalid_element": - return `${issue22.origin} da noto\u2018g\u2018ri qiymat`; - default: - return `Noto\u2018g\u2018ri kirish`; + // enumerable: false, } - }; + }); }; -function uz_default3() { - return { - localeError: error432() - }; -} -var error442 = () => { - const Sizable = { - string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, - file: { unit: "byte", verb: "c\xF3" }, - array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }, - set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; +var ZodError2 = /* @__PURE__ */ $constructor2("ZodError", initializer4); +var ZodRealError2 = /* @__PURE__ */ $constructor2("ZodError", initializer4, { + Parent: Error +}); + +// node_modules/zod/v4/classic/parse.js +var parse4 = /* @__PURE__ */ _parse2(ZodRealError2); +var parseAsync4 = /* @__PURE__ */ _parseAsync2(ZodRealError2); +var safeParse4 = /* @__PURE__ */ _safeParse2(ZodRealError2); +var safeParseAsync4 = /* @__PURE__ */ _safeParseAsync2(ZodRealError2); +var encode6 = /* @__PURE__ */ _encode2(ZodRealError2); +var decode4 = /* @__PURE__ */ _decode2(ZodRealError2); +var encodeAsync4 = /* @__PURE__ */ _encodeAsync2(ZodRealError2); +var decodeAsync4 = /* @__PURE__ */ _decodeAsync2(ZodRealError2); +var safeEncode4 = /* @__PURE__ */ _safeEncode2(ZodRealError2); +var safeDecode4 = /* @__PURE__ */ _safeDecode2(ZodRealError2); +var safeEncodeAsync4 = /* @__PURE__ */ _safeEncodeAsync2(ZodRealError2); +var safeDecodeAsync4 = /* @__PURE__ */ _safeDecodeAsync2(ZodRealError2); + +// node_modules/zod/v4/classic/schemas.js +var _installedGroups = /* @__PURE__ */ new WeakMap(); +function _installLazyMethods(inst, group, methods) { + const proto = Object.getPrototypeOf(inst); + let installed = _installedGroups.get(proto); + if (!installed) { + installed = /* @__PURE__ */ new Set(); + _installedGroups.set(proto, installed); } - const FormatDictionary = { - regex: "\u0111\u1EA7u v\xE0o", - email: "\u0111\u1ECBa ch\u1EC9 email", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ng\xE0y gi\u1EDD ISO", - date: "ng\xE0y ISO", - time: "gi\u1EDD ISO", - duration: "kho\u1EA3ng th\u1EDDi gian ISO", - ipv4: "\u0111\u1ECBa ch\u1EC9 IPv4", - ipv6: "\u0111\u1ECBa ch\u1EC9 IPv6", - cidrv4: "d\u1EA3i IPv4", - cidrv6: "d\u1EA3i IPv6", - base64: "chu\u1ED7i m\xE3 h\xF3a base64", - base64url: "chu\u1ED7i m\xE3 h\xF3a base64url", - json_string: "chu\u1ED7i JSON", - e164: "s\u1ED1 E.164", - jwt: "JWT", - template_literal: "\u0111\u1EA7u v\xE0o" - }; - const TypeDictionary = { - nan: "NaN", - number: "s\u1ED1", - array: "m\u1EA3ng" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${issue22.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; - } - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive3(issue22.values[0])}`; - return `T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue22.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue22.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue22.origin} ${sizing.verb} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue22.origin} ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${_issue.suffix}"`; - if (_issue.format === "includes") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${_issue.includes}"`; - if (_issue.format === "regex") - return `Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${_issue.pattern}`; - return `${FormatDictionary[_issue.format] ?? issue22.format} kh\xF4ng h\u1EE3p l\u1EC7`; + if (installed.has(group)) + return; + installed.add(group); + for (const key in methods) { + const fn = methods[key]; + Object.defineProperty(proto, key, { + configurable: true, + enumerable: false, + get() { + const bound = fn.bind(this); + Object.defineProperty(this, key, { + configurable: true, + writable: true, + enumerable: true, + value: bound + }); + return bound; + }, + set(v) { + Object.defineProperty(this, key, { + configurable: true, + writable: true, + enumerable: true, + value: v + }); } - case "not_multiple_of": - return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue22.divisor}`; - case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue22.origin}`; - case "invalid_union": - return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"; - case "invalid_element": - return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue22.origin}`; - default: - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; + }); + } +} +var ZodType2 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => { + $ZodType2.init(inst, def); + Object.assign(inst["~standard"], { + jsonSchema: { + input: createStandardJSONSchemaMethod2(inst, "input"), + output: createStandardJSONSchemaMethod2(inst, "output") } - }; -}; -function vi_default3() { - return { - localeError: error442() - }; + }); + inst.toJSONSchema = createToJSONSchemaMethod2(inst, {}); + inst.def = def; + inst.type = def.type; + Object.defineProperty(inst, "_def", { value: def }); + inst.parse = (data, params) => parse4(inst, data, params, { callee: inst.parse }); + inst.safeParse = (data, params) => safeParse4(inst, data, params); + inst.parseAsync = async (data, params) => parseAsync4(inst, data, params, { callee: inst.parseAsync }); + inst.safeParseAsync = async (data, params) => safeParseAsync4(inst, data, params); + inst.spa = inst.safeParseAsync; + inst.encode = (data, params) => encode6(inst, data, params); + inst.decode = (data, params) => decode4(inst, data, params); + inst.encodeAsync = async (data, params) => encodeAsync4(inst, data, params); + inst.decodeAsync = async (data, params) => decodeAsync4(inst, data, params); + inst.safeEncode = (data, params) => safeEncode4(inst, data, params); + inst.safeDecode = (data, params) => safeDecode4(inst, data, params); + inst.safeEncodeAsync = async (data, params) => safeEncodeAsync4(inst, data, params); + inst.safeDecodeAsync = async (data, params) => safeDecodeAsync4(inst, data, params); + _installLazyMethods(inst, "ZodType", { + check(...chks) { + const def2 = this.def; + return this.clone(util_exports2.mergeDefs(def2, { + checks: [ + ...def2.checks ?? [], + ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) + ] + }), { parent: true }); + }, + with(...chks) { + return this.check(...chks); + }, + clone(def2, params) { + return clone2(this, def2, params); + }, + brand() { + return this; + }, + register(reg, meta5) { + reg.add(this, meta5); + return this; + }, + refine(check3, params) { + return this.check(refine2(check3, params)); + }, + superRefine(refinement, params) { + return this.check(superRefine2(refinement, params)); + }, + overwrite(fn) { + return this.check(_overwrite2(fn)); + }, + optional() { + return optional2(this); + }, + exactOptional() { + return exactOptional2(this); + }, + nullable() { + return nullable2(this); + }, + nullish() { + return optional2(nullable2(this)); + }, + nonoptional(params) { + return nonoptional2(this, params); + }, + array() { + return array2(this); + }, + or(arg) { + return union2([this, arg]); + }, + and(arg) { + return intersection2(this, arg); + }, + transform(tx) { + return pipe2(this, transform2(tx)); + }, + default(d) { + return _default4(this, d); + }, + prefault(d) { + return prefault2(this, d); + }, + catch(params) { + return _catch4(this, params); + }, + pipe(target) { + return pipe2(this, target); + }, + readonly() { + return readonly2(this); + }, + describe(description) { + const cl = this.clone(); + globalRegistry2.add(cl, { description }); + return cl; + }, + meta(...args) { + if (args.length === 0) + return globalRegistry2.get(this); + const cl = this.clone(); + globalRegistry2.add(cl, args[0]); + return cl; + }, + isOptional() { + return this.safeParse(void 0).success; + }, + isNullable() { + return this.safeParse(null).success; + }, + apply(fn) { + return fn(this); + } + }); + Object.defineProperty(inst, "description", { + get() { + return globalRegistry2.get(inst)?.description; + }, + configurable: true + }); + return inst; +}); +var _ZodString2 = /* @__PURE__ */ $constructor2("_ZodString", (inst, def) => { + $ZodString2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => stringProcessor2(inst, ctx, json3, params); + const bag = inst._zod.bag; + inst.format = bag.format ?? null; + inst.minLength = bag.minimum ?? null; + inst.maxLength = bag.maximum ?? null; + _installLazyMethods(inst, "_ZodString", { + regex(...args) { + return this.check(_regex2(...args)); + }, + includes(...args) { + return this.check(_includes2(...args)); + }, + startsWith(...args) { + return this.check(_startsWith2(...args)); + }, + endsWith(...args) { + return this.check(_endsWith2(...args)); + }, + min(...args) { + return this.check(_minLength2(...args)); + }, + max(...args) { + return this.check(_maxLength2(...args)); + }, + length(...args) { + return this.check(_length2(...args)); + }, + nonempty(...args) { + return this.check(_minLength2(1, ...args)); + }, + lowercase(params) { + return this.check(_lowercase2(params)); + }, + uppercase(params) { + return this.check(_uppercase2(params)); + }, + trim() { + return this.check(_trim2()); + }, + normalize(...args) { + return this.check(_normalize2(...args)); + }, + toLowerCase() { + return this.check(_toLowerCase2()); + }, + toUpperCase() { + return this.check(_toUpperCase2()); + }, + slugify() { + return this.check(_slugify2()); + } + }); +}); +var ZodString2 = /* @__PURE__ */ $constructor2("ZodString", (inst, def) => { + $ZodString2.init(inst, def); + _ZodString2.init(inst, def); + inst.email = (params) => inst.check(_email2(ZodEmail2, params)); + inst.url = (params) => inst.check(_url2(ZodURL2, params)); + inst.jwt = (params) => inst.check(_jwt2(ZodJWT2, params)); + inst.emoji = (params) => inst.check(_emoji4(ZodEmoji2, params)); + inst.guid = (params) => inst.check(_guid2(ZodGUID2, params)); + inst.uuid = (params) => inst.check(_uuid2(ZodUUID2, params)); + inst.uuidv4 = (params) => inst.check(_uuidv42(ZodUUID2, params)); + inst.uuidv6 = (params) => inst.check(_uuidv62(ZodUUID2, params)); + inst.uuidv7 = (params) => inst.check(_uuidv72(ZodUUID2, params)); + inst.nanoid = (params) => inst.check(_nanoid2(ZodNanoID2, params)); + inst.guid = (params) => inst.check(_guid2(ZodGUID2, params)); + inst.cuid = (params) => inst.check(_cuid3(ZodCUID3, params)); + inst.cuid2 = (params) => inst.check(_cuid22(ZodCUID22, params)); + inst.ulid = (params) => inst.check(_ulid2(ZodULID2, params)); + inst.base64 = (params) => inst.check(_base642(ZodBase642, params)); + inst.base64url = (params) => inst.check(_base64url2(ZodBase64URL2, params)); + inst.xid = (params) => inst.check(_xid2(ZodXID2, params)); + inst.ksuid = (params) => inst.check(_ksuid2(ZodKSUID2, params)); + inst.ipv4 = (params) => inst.check(_ipv42(ZodIPv42, params)); + inst.ipv6 = (params) => inst.check(_ipv62(ZodIPv62, params)); + inst.cidrv4 = (params) => inst.check(_cidrv42(ZodCIDRv42, params)); + inst.cidrv6 = (params) => inst.check(_cidrv62(ZodCIDRv62, params)); + inst.e164 = (params) => inst.check(_e1642(ZodE1642, params)); + inst.datetime = (params) => inst.check(datetime4(params)); + inst.date = (params) => inst.check(date6(params)); + inst.time = (params) => inst.check(time4(params)); + inst.duration = (params) => inst.check(duration4(params)); +}); +function string5(params) { + return _string2(ZodString2, params); +} +var ZodStringFormat2 = /* @__PURE__ */ $constructor2("ZodStringFormat", (inst, def) => { + $ZodStringFormat2.init(inst, def); + _ZodString2.init(inst, def); +}); +var ZodEmail2 = /* @__PURE__ */ $constructor2("ZodEmail", (inst, def) => { + $ZodEmail2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function email4(params) { + return _email2(ZodEmail2, params); +} +var ZodGUID2 = /* @__PURE__ */ $constructor2("ZodGUID", (inst, def) => { + $ZodGUID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function guid4(params) { + return _guid2(ZodGUID2, params); +} +var ZodUUID2 = /* @__PURE__ */ $constructor2("ZodUUID", (inst, def) => { + $ZodUUID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function uuid5(params) { + return _uuid2(ZodUUID2, params); +} +function uuidv42(params) { + return _uuidv42(ZodUUID2, params); +} +function uuidv62(params) { + return _uuidv62(ZodUUID2, params); +} +function uuidv72(params) { + return _uuidv72(ZodUUID2, params); +} +var ZodURL2 = /* @__PURE__ */ $constructor2("ZodURL", (inst, def) => { + $ZodURL2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function url3(params) { + return _url2(ZodURL2, params); +} +function httpUrl2(params) { + return _url2(ZodURL2, { + protocol: regexes_exports2.httpProtocol, + hostname: regexes_exports2.domain, + ...util_exports2.normalizeParams(params) + }); +} +var ZodEmoji2 = /* @__PURE__ */ $constructor2("ZodEmoji", (inst, def) => { + $ZodEmoji2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function emoji4(params) { + return _emoji4(ZodEmoji2, params); +} +var ZodNanoID2 = /* @__PURE__ */ $constructor2("ZodNanoID", (inst, def) => { + $ZodNanoID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function nanoid4(params) { + return _nanoid2(ZodNanoID2, params); +} +var ZodCUID3 = /* @__PURE__ */ $constructor2("ZodCUID", (inst, def) => { + $ZodCUID3.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cuid5(params) { + return _cuid3(ZodCUID3, params); +} +var ZodCUID22 = /* @__PURE__ */ $constructor2("ZodCUID2", (inst, def) => { + $ZodCUID22.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cuid24(params) { + return _cuid22(ZodCUID22, params); +} +var ZodULID2 = /* @__PURE__ */ $constructor2("ZodULID", (inst, def) => { + $ZodULID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ulid4(params) { + return _ulid2(ZodULID2, params); +} +var ZodXID2 = /* @__PURE__ */ $constructor2("ZodXID", (inst, def) => { + $ZodXID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function xid4(params) { + return _xid2(ZodXID2, params); +} +var ZodKSUID2 = /* @__PURE__ */ $constructor2("ZodKSUID", (inst, def) => { + $ZodKSUID2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ksuid4(params) { + return _ksuid2(ZodKSUID2, params); +} +var ZodIPv42 = /* @__PURE__ */ $constructor2("ZodIPv4", (inst, def) => { + $ZodIPv42.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ipv44(params) { + return _ipv42(ZodIPv42, params); +} +var ZodMAC2 = /* @__PURE__ */ $constructor2("ZodMAC", (inst, def) => { + $ZodMAC2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function mac4(params) { + return _mac2(ZodMAC2, params); +} +var ZodIPv62 = /* @__PURE__ */ $constructor2("ZodIPv6", (inst, def) => { + $ZodIPv62.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function ipv64(params) { + return _ipv62(ZodIPv62, params); +} +var ZodCIDRv42 = /* @__PURE__ */ $constructor2("ZodCIDRv4", (inst, def) => { + $ZodCIDRv42.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cidrv44(params) { + return _cidrv42(ZodCIDRv42, params); } -var error452 = () => { - const Sizable = { - string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, - file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" }, - array: { unit: "\u9879", verb: "\u5305\u542B" }, - set: { unit: "\u9879", verb: "\u5305\u542B" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u8F93\u5165", - email: "\u7535\u5B50\u90AE\u4EF6", - url: "URL", - emoji: "\u8868\u60C5\u7B26\u53F7", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO\u65E5\u671F\u65F6\u95F4", - date: "ISO\u65E5\u671F", - time: "ISO\u65F6\u95F4", - duration: "ISO\u65F6\u957F", - ipv4: "IPv4\u5730\u5740", - ipv6: "IPv6\u5730\u5740", - cidrv4: "IPv4\u7F51\u6BB5", - cidrv6: "IPv6\u7F51\u6BB5", - base64: "base64\u7F16\u7801\u5B57\u7B26\u4E32", - base64url: "base64url\u7F16\u7801\u5B57\u7B26\u4E32", - json_string: "JSON\u5B57\u7B26\u4E32", - e164: "E.164\u53F7\u7801", - jwt: "JWT", - template_literal: "\u8F93\u5165" - }; - const TypeDictionary = { - nan: "NaN", - number: "\u6570\u5B57", - array: "\u6570\u7EC4", - null: "\u7A7A\u503C(null)" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${issue22.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; - } - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive3(issue22.values[0])}`; - return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue22.origin ?? "\u503C"} ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue22.origin ?? "\u503C"} ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue22.origin} ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue22.origin} ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; - if (_issue.format === "ends_with") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.suffix}" \u7ED3\u5C3E`; - if (_issue.format === "includes") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${_issue.pattern}`; - return `\u65E0\u6548${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue22.divisor} \u7684\u500D\u6570`; - case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `${issue22.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; - case "invalid_union": - return "\u65E0\u6548\u8F93\u5165"; - case "invalid_element": - return `${issue22.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; - default: - return `\u65E0\u6548\u8F93\u5165`; - } - }; -}; -function zh_CN_default3() { - return { - localeError: error452() - }; +var ZodCIDRv62 = /* @__PURE__ */ $constructor2("ZodCIDRv6", (inst, def) => { + $ZodCIDRv62.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function cidrv64(params) { + return _cidrv62(ZodCIDRv62, params); } -var error462 = () => { - const Sizable = { - string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, - file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" }, - array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }, - set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u8F38\u5165", - email: "\u90F5\u4EF6\u5730\u5740", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "ISO \u65E5\u671F\u6642\u9593", - date: "ISO \u65E5\u671F", - time: "ISO \u6642\u9593", - duration: "ISO \u671F\u9593", - ipv4: "IPv4 \u4F4D\u5740", - ipv6: "IPv6 \u4F4D\u5740", - cidrv4: "IPv4 \u7BC4\u570D", - cidrv6: "IPv6 \u7BC4\u570D", - base64: "base64 \u7DE8\u78BC\u5B57\u4E32", - base64url: "base64url \u7DE8\u78BC\u5B57\u4E32", - json_string: "JSON \u5B57\u4E32", - e164: "E.164 \u6578\u503C", - jwt: "JWT", - template_literal: "\u8F38\u5165" - }; - const TypeDictionary = { - nan: "NaN" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${issue22.expected}\uFF0C\u4F46\u6536\u5230 ${received}`; - } - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${expected}\uFF0C\u4F46\u6536\u5230 ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive3(issue22.values[0])}`; - return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue22.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue22.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue22.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue22.maximum.toString()}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) { - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue22.origin} \u61C9\u70BA ${adj}${issue22.minimum.toString()} ${sizing.unit}`; - } - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue22.origin} \u61C9\u70BA ${adj}${issue22.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") { - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; - } - if (_issue.format === "ends_with") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.suffix}" \u7D50\u5C3E`; - if (_issue.format === "includes") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${_issue.pattern}`; - return `\u7121\u6548\u7684 ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue22.divisor} \u7684\u500D\u6578`; - case "unrecognized_keys": - return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue22.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues3(issue22.keys, "\u3001")}`; - case "invalid_key": - return `${issue22.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; - case "invalid_union": - return "\u7121\u6548\u7684\u8F38\u5165\u503C"; - case "invalid_element": - return `${issue22.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; - default: - return `\u7121\u6548\u7684\u8F38\u5165\u503C`; - } - }; -}; -function zh_TW_default3() { - return { - localeError: error462() - }; +var ZodBase642 = /* @__PURE__ */ $constructor2("ZodBase64", (inst, def) => { + $ZodBase642.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function base644(params) { + return _base642(ZodBase642, params); } -var error472 = () => { - const Sizable = { - string: { unit: "\xE0mi", verb: "n\xED" }, - file: { unit: "bytes", verb: "n\xED" }, - array: { unit: "nkan", verb: "n\xED" }, - set: { unit: "nkan", verb: "n\xED" } - }; - function getSizing(origin2) { - return Sizable[origin2] ?? null; - } - const FormatDictionary = { - regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9", - email: "\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC", - url: "URL", - emoji: "emoji", - uuid: "UUID", - uuidv4: "UUIDv4", - uuidv6: "UUIDv6", - nanoid: "nanoid", - guid: "GUID", - cuid: "cuid", - cuid2: "cuid2", - ulid: "ULID", - xid: "XID", - ksuid: "KSUID", - datetime: "\xE0k\xF3k\xF2 ISO", - date: "\u1ECDj\u1ECD\u0301 ISO", - time: "\xE0k\xF3k\xF2 ISO", - duration: "\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO", - ipv4: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv4", - ipv6: "\xE0d\xEDr\u1EB9\u0301s\xEC IPv6", - cidrv4: "\xE0gb\xE8gb\xE8 IPv4", - cidrv6: "\xE0gb\xE8gb\xE8 IPv6", - base64: "\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64", - base64url: "\u1ECD\u0300r\u1ECD\u0300 base64url", - json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON", - e164: "n\u1ECD\u0301mb\xE0 E.164", - jwt: "JWT", - template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9" - }; - const TypeDictionary = { - nan: "NaN", - number: "n\u1ECD\u0301mb\xE0", - array: "akop\u1ECD" - }; - return (issue22) => { - switch (issue22.code) { - case "invalid_type": { - const expected = TypeDictionary[issue22.expected] ?? issue22.expected; - const receivedType = parsedType3(issue22.input); - const received = TypeDictionary[receivedType] ?? receivedType; - if (/^[A-Z]/.test(issue22.expected)) { - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${issue22.expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; - } - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${expected}, \xE0m\u1ECD\u0300 a r\xED ${received}`; - } - case "invalid_value": - if (issue22.values.length === 1) - return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${stringifyPrimitive3(issue22.values[0])}`; - return `\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${joinValues3(issue22.values, "|")}`; - case "too_big": { - const adj = issue22.inclusive ? "<=" : "<"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue22.origin ?? "iye"} ${sizing.verb} ${adj}${issue22.maximum} ${sizing.unit}`; - return `T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue22.maximum}`; - } - case "too_small": { - const adj = issue22.inclusive ? ">=" : ">"; - const sizing = getSizing(issue22.origin); - if (sizing) - return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${issue22.origin} ${sizing.verb} ${adj}${issue22.minimum} ${sizing.unit}`; - return `K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${adj}${issue22.minimum}`; - } - case "invalid_format": { - const _issue = issue22; - if (_issue.format === "starts_with") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${_issue.prefix}"`; - if (_issue.format === "ends_with") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${_issue.suffix}"`; - if (_issue.format === "includes") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${_issue.includes}"`; - if (_issue.format === "regex") - return `\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${_issue.pattern}`; - return `A\u1E63\xEC\u1E63e: ${FormatDictionary[_issue.format] ?? issue22.format}`; - } - case "not_multiple_of": - return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${issue22.divisor}`; - case "unrecognized_keys": - return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${joinValues3(issue22.keys, ", ")}`; - case "invalid_key": - return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue22.origin}`; - case "invalid_union": - return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; - case "invalid_element": - return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${issue22.origin}`; - default: - return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"; - } - }; -}; -function yo_default3() { - return { - localeError: error472() - }; +var ZodBase64URL2 = /* @__PURE__ */ $constructor2("ZodBase64URL", (inst, def) => { + $ZodBase64URL2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function base64url4(params) { + return _base64url2(ZodBase64URL2, params); } -var _a4; -var $output3 = /* @__PURE__ */ Symbol("ZodOutput"); -var $input3 = /* @__PURE__ */ Symbol("ZodInput"); -var $ZodRegistry3 = class { - constructor() { - this._map = /* @__PURE__ */ new WeakMap(); - this._idmap = /* @__PURE__ */ new Map(); - } - add(schema, ..._meta) { - const meta32 = _meta[0]; - this._map.set(schema, meta32); - if (meta32 && typeof meta32 === "object" && "id" in meta32) { - this._idmap.set(meta32.id, schema); - } - return this; - } - clear() { - this._map = /* @__PURE__ */ new WeakMap(); - this._idmap = /* @__PURE__ */ new Map(); - return this; - } - remove(schema) { - const meta32 = this._map.get(schema); - if (meta32 && typeof meta32 === "object" && "id" in meta32) { - this._idmap.delete(meta32.id); - } - this._map.delete(schema); - return this; - } - get(schema) { - const p = schema._zod.parent; - if (p) { - const pm = { ...this.get(p) ?? {} }; - delete pm.id; - const f = { ...pm, ...this._map.get(schema) }; - return Object.keys(f).length ? f : void 0; - } - return this._map.get(schema); - } - has(schema) { - return this._map.has(schema); - } -}; -function registry3() { - return new $ZodRegistry3(); +var ZodE1642 = /* @__PURE__ */ $constructor2("ZodE164", (inst, def) => { + $ZodE1642.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function e1644(params) { + return _e1642(ZodE1642, params); } -(_a4 = globalThis).__zod_globalRegistry ?? (_a4.__zod_globalRegistry = registry3()); -var globalRegistry3 = globalThis.__zod_globalRegistry; -// @__NO_SIDE_EFFECTS__ -function _string3(Class22, params) { - return new Class22({ - type: "string", - ...normalizeParams3(params) - }); +var ZodJWT2 = /* @__PURE__ */ $constructor2("ZodJWT", (inst, def) => { + $ZodJWT2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function jwt2(params) { + return _jwt2(ZodJWT2, params); } -// @__NO_SIDE_EFFECTS__ -function _coercedString3(Class22, params) { - return new Class22({ - type: "string", - coerce: true, - ...normalizeParams3(params) - }); +var ZodCustomStringFormat2 = /* @__PURE__ */ $constructor2("ZodCustomStringFormat", (inst, def) => { + $ZodCustomStringFormat2.init(inst, def); + ZodStringFormat2.init(inst, def); +}); +function stringFormat2(format2, fnOrRegex, _params = {}) { + return _stringFormat2(ZodCustomStringFormat2, format2, fnOrRegex, _params); } -// @__NO_SIDE_EFFECTS__ -function _email3(Class22, params) { - return new Class22({ - type: "string", - format: "email", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +function hostname4(_params) { + return _stringFormat2(ZodCustomStringFormat2, "hostname", regexes_exports2.hostname, _params); } -// @__NO_SIDE_EFFECTS__ -function _guid3(Class22, params) { - return new Class22({ - type: "string", - format: "guid", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +function hex4(_params) { + return _stringFormat2(ZodCustomStringFormat2, "hex", regexes_exports2.hex, _params); } -// @__NO_SIDE_EFFECTS__ -function _uuid3(Class22, params) { - return new Class22({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +function hash2(alg, params) { + const enc = params?.enc ?? "hex"; + const format2 = `${alg}_${enc}`; + const regex2 = regexes_exports2[format2]; + if (!regex2) + throw new Error(`Unrecognized hash format: ${format2}`); + return _stringFormat2(ZodCustomStringFormat2, format2, regex2, params); } -// @__NO_SIDE_EFFECTS__ -function _uuidv43(Class22, params) { - return new Class22({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v4", - ...normalizeParams3(params) +var ZodNumber2 = /* @__PURE__ */ $constructor2("ZodNumber", (inst, def) => { + $ZodNumber2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => numberProcessor2(inst, ctx, json3, params); + _installLazyMethods(inst, "ZodNumber", { + gt(value, params) { + return this.check(_gt2(value, params)); + }, + gte(value, params) { + return this.check(_gte2(value, params)); + }, + min(value, params) { + return this.check(_gte2(value, params)); + }, + lt(value, params) { + return this.check(_lt2(value, params)); + }, + lte(value, params) { + return this.check(_lte2(value, params)); + }, + max(value, params) { + return this.check(_lte2(value, params)); + }, + int(params) { + return this.check(int2(params)); + }, + safe(params) { + return this.check(int2(params)); + }, + positive(params) { + return this.check(_gt2(0, params)); + }, + nonnegative(params) { + return this.check(_gte2(0, params)); + }, + negative(params) { + return this.check(_lt2(0, params)); + }, + nonpositive(params) { + return this.check(_lte2(0, params)); + }, + multipleOf(value, params) { + return this.check(_multipleOf2(value, params)); + }, + step(value, params) { + return this.check(_multipleOf2(value, params)); + }, + finite() { + return this; + } }); + const bag = inst._zod.bag; + inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; + inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; + inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); + inst.isFinite = true; + inst.format = bag.format ?? null; +}); +function number5(params) { + return _number2(ZodNumber2, params); } -// @__NO_SIDE_EFFECTS__ -function _uuidv63(Class22, params) { - return new Class22({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v6", - ...normalizeParams3(params) - }); +var ZodNumberFormat2 = /* @__PURE__ */ $constructor2("ZodNumberFormat", (inst, def) => { + $ZodNumberFormat2.init(inst, def); + ZodNumber2.init(inst, def); +}); +function int2(params) { + return _int2(ZodNumberFormat2, params); } -// @__NO_SIDE_EFFECTS__ -function _uuidv73(Class22, params) { - return new Class22({ - type: "string", - format: "uuid", - check: "string_format", - abort: false, - version: "v7", - ...normalizeParams3(params) - }); +function float322(params) { + return _float322(ZodNumberFormat2, params); } -// @__NO_SIDE_EFFECTS__ -function _url3(Class22, params) { - return new Class22({ - type: "string", - format: "url", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +function float642(params) { + return _float642(ZodNumberFormat2, params); } -// @__NO_SIDE_EFFECTS__ -function _emoji22(Class22, params) { - return new Class22({ - type: "string", - format: "emoji", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +function int322(params) { + return _int322(ZodNumberFormat2, params); +} +function uint322(params) { + return _uint322(ZodNumberFormat2, params); +} +var ZodBoolean2 = /* @__PURE__ */ $constructor2("ZodBoolean", (inst, def) => { + $ZodBoolean2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => booleanProcessor2(inst, ctx, json3, params); +}); +function boolean5(params) { + return _boolean2(ZodBoolean2, params); +} +var ZodBigInt2 = /* @__PURE__ */ $constructor2("ZodBigInt", (inst, def) => { + $ZodBigInt2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => bigintProcessor2(inst, ctx, json3, params); + inst.gte = (value, params) => inst.check(_gte2(value, params)); + inst.min = (value, params) => inst.check(_gte2(value, params)); + inst.gt = (value, params) => inst.check(_gt2(value, params)); + inst.gte = (value, params) => inst.check(_gte2(value, params)); + inst.min = (value, params) => inst.check(_gte2(value, params)); + inst.lt = (value, params) => inst.check(_lt2(value, params)); + inst.lte = (value, params) => inst.check(_lte2(value, params)); + inst.max = (value, params) => inst.check(_lte2(value, params)); + inst.positive = (params) => inst.check(_gt2(BigInt(0), params)); + inst.negative = (params) => inst.check(_lt2(BigInt(0), params)); + inst.nonpositive = (params) => inst.check(_lte2(BigInt(0), params)); + inst.nonnegative = (params) => inst.check(_gte2(BigInt(0), params)); + inst.multipleOf = (value, params) => inst.check(_multipleOf2(value, params)); + const bag = inst._zod.bag; + inst.minValue = bag.minimum ?? null; + inst.maxValue = bag.maximum ?? null; + inst.format = bag.format ?? null; +}); +function bigint5(params) { + return _bigint2(ZodBigInt2, params); +} +var ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("ZodBigIntFormat", (inst, def) => { + $ZodBigIntFormat2.init(inst, def); + ZodBigInt2.init(inst, def); +}); +function int642(params) { + return _int642(ZodBigIntFormat2, params); +} +function uint642(params) { + return _uint642(ZodBigIntFormat2, params); +} +var ZodSymbol2 = /* @__PURE__ */ $constructor2("ZodSymbol", (inst, def) => { + $ZodSymbol2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => symbolProcessor2(inst, ctx, json3, params); +}); +function symbol2(params) { + return _symbol2(ZodSymbol2, params); +} +var ZodUndefined2 = /* @__PURE__ */ $constructor2("ZodUndefined", (inst, def) => { + $ZodUndefined2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => undefinedProcessor2(inst, ctx, json3, params); +}); +function _undefined6(params) { + return _undefined5(ZodUndefined2, params); +} +var ZodNull2 = /* @__PURE__ */ $constructor2("ZodNull", (inst, def) => { + $ZodNull2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nullProcessor2(inst, ctx, json3, params); +}); +function _null6(params) { + return _null5(ZodNull2, params); } -// @__NO_SIDE_EFFECTS__ -function _nanoid3(Class22, params) { - return new Class22({ - type: "string", - format: "nanoid", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +var ZodAny2 = /* @__PURE__ */ $constructor2("ZodAny", (inst, def) => { + $ZodAny2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => anyProcessor2(inst, ctx, json3, params); +}); +function any2() { + return _any2(ZodAny2); } -// @__NO_SIDE_EFFECTS__ -function _cuid4(Class22, params) { - return new Class22({ - type: "string", - format: "cuid", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +var ZodUnknown2 = /* @__PURE__ */ $constructor2("ZodUnknown", (inst, def) => { + $ZodUnknown2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => unknownProcessor2(inst, ctx, json3, params); +}); +function unknown2() { + return _unknown2(ZodUnknown2); } -// @__NO_SIDE_EFFECTS__ -function _cuid23(Class22, params) { - return new Class22({ - type: "string", - format: "cuid2", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +var ZodNever2 = /* @__PURE__ */ $constructor2("ZodNever", (inst, def) => { + $ZodNever2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => neverProcessor2(inst, ctx, json3, params); +}); +function never2(params) { + return _never2(ZodNever2, params); } -// @__NO_SIDE_EFFECTS__ -function _ulid3(Class22, params) { - return new Class22({ - type: "string", - format: "ulid", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +var ZodVoid2 = /* @__PURE__ */ $constructor2("ZodVoid", (inst, def) => { + $ZodVoid2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => voidProcessor2(inst, ctx, json3, params); +}); +function _void4(params) { + return _void3(ZodVoid2, params); } -// @__NO_SIDE_EFFECTS__ -function _xid3(Class22, params) { - return new Class22({ - type: "string", - format: "xid", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +var ZodDate2 = /* @__PURE__ */ $constructor2("ZodDate", (inst, def) => { + $ZodDate2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => dateProcessor2(inst, ctx, json3, params); + inst.min = (value, params) => inst.check(_gte2(value, params)); + inst.max = (value, params) => inst.check(_lte2(value, params)); + const c = inst._zod.bag; + inst.minDate = c.minimum ? new Date(c.minimum) : null; + inst.maxDate = c.maximum ? new Date(c.maximum) : null; +}); +function date7(params) { + return _date2(ZodDate2, params); } -// @__NO_SIDE_EFFECTS__ -function _ksuid3(Class22, params) { - return new Class22({ - type: "string", - format: "ksuid", - check: "string_format", - abort: false, - ...normalizeParams3(params) +var ZodArray2 = /* @__PURE__ */ $constructor2("ZodArray", (inst, def) => { + $ZodArray2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => arrayProcessor2(inst, ctx, json3, params); + inst.element = def.element; + _installLazyMethods(inst, "ZodArray", { + min(n, params) { + return this.check(_minLength2(n, params)); + }, + nonempty(params) { + return this.check(_minLength2(1, params)); + }, + max(n, params) { + return this.check(_maxLength2(n, params)); + }, + length(n, params) { + return this.check(_length2(n, params)); + }, + unwrap() { + return this.element; + } }); +}); +function array2(element, params) { + return _array2(ZodArray2, element, params); } -// @__NO_SIDE_EFFECTS__ -function _ipv43(Class22, params) { - return new Class22({ - type: "string", - format: "ipv4", - check: "string_format", - abort: false, - ...normalizeParams3(params) - }); +function keyof2(schema) { + const shape = schema._zod.def.shape; + return _enum4(Object.keys(shape)); } -// @__NO_SIDE_EFFECTS__ -function _ipv63(Class22, params) { - return new Class22({ - type: "string", - format: "ipv6", - check: "string_format", - abort: false, - ...normalizeParams3(params) +var ZodObject2 = /* @__PURE__ */ $constructor2("ZodObject", (inst, def) => { + $ZodObjectJIT2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => objectProcessor2(inst, ctx, json3, params); + util_exports2.defineLazy(inst, "shape", () => { + return def.shape; }); -} -// @__NO_SIDE_EFFECTS__ -function _mac3(Class22, params) { - return new Class22({ - type: "string", - format: "mac", - check: "string_format", - abort: false, - ...normalizeParams3(params) + _installLazyMethods(inst, "ZodObject", { + keyof() { + return _enum4(Object.keys(this._zod.def.shape)); + }, + catchall(catchall) { + return this.clone({ ...this._zod.def, catchall }); + }, + passthrough() { + return this.clone({ ...this._zod.def, catchall: unknown2() }); + }, + loose() { + return this.clone({ ...this._zod.def, catchall: unknown2() }); + }, + strict() { + return this.clone({ ...this._zod.def, catchall: never2() }); + }, + strip() { + return this.clone({ ...this._zod.def, catchall: void 0 }); + }, + extend(incoming) { + return util_exports2.extend(this, incoming); + }, + safeExtend(incoming) { + return util_exports2.safeExtend(this, incoming); + }, + merge(other) { + return util_exports2.merge(this, other); + }, + pick(mask) { + return util_exports2.pick(this, mask); + }, + omit(mask) { + return util_exports2.omit(this, mask); + }, + partial(...args) { + return util_exports2.partial(ZodOptional2, this, args[0]); + }, + required(...args) { + return util_exports2.required(ZodNonOptional2, this, args[0]); + } }); +}); +function object2(shape, params) { + const def = { + type: "object", + shape: shape ?? {}, + ...util_exports2.normalizeParams(params) + }; + return new ZodObject2(def); } -// @__NO_SIDE_EFFECTS__ -function _cidrv43(Class22, params) { - return new Class22({ - type: "string", - format: "cidrv4", - check: "string_format", - abort: false, - ...normalizeParams3(params) +function strictObject2(shape, params) { + return new ZodObject2({ + type: "object", + shape, + catchall: never2(), + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _cidrv63(Class22, params) { - return new Class22({ - type: "string", - format: "cidrv6", - check: "string_format", - abort: false, - ...normalizeParams3(params) +function looseObject2(shape, params) { + return new ZodObject2({ + type: "object", + shape, + catchall: unknown2(), + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _base643(Class22, params) { - return new Class22({ - type: "string", - format: "base64", - check: "string_format", - abort: false, - ...normalizeParams3(params) +var ZodUnion2 = /* @__PURE__ */ $constructor2("ZodUnion", (inst, def) => { + $ZodUnion2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor2(inst, ctx, json3, params); + inst.options = def.options; +}); +function union2(options, params) { + return new ZodUnion2({ + type: "union", + options, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _base64url3(Class22, params) { - return new Class22({ - type: "string", - format: "base64url", - check: "string_format", - abort: false, - ...normalizeParams3(params) +var ZodXor2 = /* @__PURE__ */ $constructor2("ZodXor", (inst, def) => { + ZodUnion2.init(inst, def); + $ZodXor2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor2(inst, ctx, json3, params); + inst.options = def.options; +}); +function xor2(options, params) { + return new ZodXor2({ + type: "union", + options, + inclusive: false, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _e1643(Class22, params) { - return new Class22({ - type: "string", - format: "e164", - check: "string_format", - abort: false, - ...normalizeParams3(params) +var ZodDiscriminatedUnion2 = /* @__PURE__ */ $constructor2("ZodDiscriminatedUnion", (inst, def) => { + ZodUnion2.init(inst, def); + $ZodDiscriminatedUnion2.init(inst, def); +}); +function discriminatedUnion2(discriminator, options, params) { + return new ZodDiscriminatedUnion2({ + type: "union", + options, + discriminator, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _jwt3(Class22, params) { - return new Class22({ - type: "string", - format: "jwt", - check: "string_format", - abort: false, - ...normalizeParams3(params) +var ZodIntersection2 = /* @__PURE__ */ $constructor2("ZodIntersection", (inst, def) => { + $ZodIntersection2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => intersectionProcessor2(inst, ctx, json3, params); +}); +function intersection2(left, right) { + return new ZodIntersection2({ + type: "intersection", + left, + right }); } -var TimePrecision3 = { - Any: null, - Minute: -1, - Second: 0, - Millisecond: 3, - Microsecond: 6 -}; -// @__NO_SIDE_EFFECTS__ -function _isoDateTime3(Class22, params) { - return new Class22({ - type: "string", - format: "datetime", - check: "string_format", - offset: false, - local: false, - precision: null, - ...normalizeParams3(params) +var ZodTuple2 = /* @__PURE__ */ $constructor2("ZodTuple", (inst, def) => { + $ZodTuple2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => tupleProcessor2(inst, ctx, json3, params); + inst.rest = (rest) => inst.clone({ + ...inst._zod.def, + rest }); -} -// @__NO_SIDE_EFFECTS__ -function _isoDate3(Class22, params) { - return new Class22({ - type: "string", - format: "date", - check: "string_format", - ...normalizeParams3(params) +}); +function tuple2(items, _paramsOrRest, _params) { + const hasRest = _paramsOrRest instanceof $ZodType2; + const params = hasRest ? _params : _paramsOrRest; + const rest = hasRest ? _paramsOrRest : null; + return new ZodTuple2({ + type: "tuple", + items, + rest, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _isoTime3(Class22, params) { - return new Class22({ - type: "string", - format: "time", - check: "string_format", - precision: null, - ...normalizeParams3(params) +var ZodRecord2 = /* @__PURE__ */ $constructor2("ZodRecord", (inst, def) => { + $ZodRecord2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => recordProcessor2(inst, ctx, json3, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; +}); +function record2(keyType, valueType, params) { + if (!valueType || !valueType._zod) { + return new ZodRecord2({ + type: "record", + keyType: string5(), + valueType: keyType, + ...util_exports2.normalizeParams(valueType) + }); + } + return new ZodRecord2({ + type: "record", + keyType, + valueType, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _isoDuration3(Class22, params) { - return new Class22({ - type: "string", - format: "duration", - check: "string_format", - ...normalizeParams3(params) +function partialRecord2(keyType, valueType, params) { + const k = clone2(keyType); + k._zod.values = void 0; + return new ZodRecord2({ + type: "record", + keyType: k, + valueType, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _number3(Class22, params) { - return new Class22({ - type: "number", - checks: [], - ...normalizeParams3(params) +function looseRecord2(keyType, valueType, params) { + return new ZodRecord2({ + type: "record", + keyType, + valueType, + mode: "loose", + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _coercedNumber3(Class22, params) { - return new Class22({ - type: "number", - coerce: true, - checks: [], - ...normalizeParams3(params) +var ZodMap2 = /* @__PURE__ */ $constructor2("ZodMap", (inst, def) => { + $ZodMap2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => mapProcessor2(inst, ctx, json3, params); + inst.keyType = def.keyType; + inst.valueType = def.valueType; + inst.min = (...args) => inst.check(_minSize2(...args)); + inst.nonempty = (params) => inst.check(_minSize2(1, params)); + inst.max = (...args) => inst.check(_maxSize2(...args)); + inst.size = (...args) => inst.check(_size2(...args)); +}); +function map2(keyType, valueType, params) { + return new ZodMap2({ + type: "map", + keyType, + valueType, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _int3(Class22, params) { - return new Class22({ - type: "number", - check: "number_format", - abort: false, - format: "safeint", - ...normalizeParams3(params) +var ZodSet2 = /* @__PURE__ */ $constructor2("ZodSet", (inst, def) => { + $ZodSet2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => setProcessor2(inst, ctx, json3, params); + inst.min = (...args) => inst.check(_minSize2(...args)); + inst.nonempty = (params) => inst.check(_minSize2(1, params)); + inst.max = (...args) => inst.check(_maxSize2(...args)); + inst.size = (...args) => inst.check(_size2(...args)); +}); +function set2(valueType, params) { + return new ZodSet2({ + type: "set", + valueType, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _float323(Class22, params) { - return new Class22({ - type: "number", - check: "number_format", - abort: false, - format: "float32", - ...normalizeParams3(params) +var ZodEnum2 = /* @__PURE__ */ $constructor2("ZodEnum", (inst, def) => { + $ZodEnum2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => enumProcessor2(inst, ctx, json3, params); + inst.enum = def.entries; + inst.options = Object.values(def.entries); + const keys = new Set(Object.keys(def.entries)); + inst.extract = (values, params) => { + const newEntries = {}; + for (const value of values) { + if (keys.has(value)) { + newEntries[value] = def.entries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum2({ + ...def, + checks: [], + ...util_exports2.normalizeParams(params), + entries: newEntries + }); + }; + inst.exclude = (values, params) => { + const newEntries = { ...def.entries }; + for (const value of values) { + if (keys.has(value)) { + delete newEntries[value]; + } else + throw new Error(`Key ${value} not found in enum`); + } + return new ZodEnum2({ + ...def, + checks: [], + ...util_exports2.normalizeParams(params), + entries: newEntries + }); + }; +}); +function _enum4(values, params) { + const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; + return new ZodEnum2({ + type: "enum", + entries, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _float643(Class22, params) { - return new Class22({ - type: "number", - check: "number_format", - abort: false, - format: "float64", - ...normalizeParams3(params) +function nativeEnum2(entries, params) { + return new ZodEnum2({ + type: "enum", + entries, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _int323(Class22, params) { - return new Class22({ - type: "number", - check: "number_format", - abort: false, - format: "int32", - ...normalizeParams3(params) +var ZodLiteral2 = /* @__PURE__ */ $constructor2("ZodLiteral", (inst, def) => { + $ZodLiteral2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => literalProcessor2(inst, ctx, json3, params); + inst.values = new Set(def.values); + Object.defineProperty(inst, "value", { + get() { + if (def.values.length > 1) { + throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); + } + return def.values[0]; + } }); -} -// @__NO_SIDE_EFFECTS__ -function _uint323(Class22, params) { - return new Class22({ - type: "number", - check: "number_format", - abort: false, - format: "uint32", - ...normalizeParams3(params) +}); +function literal2(value, params) { + return new ZodLiteral2({ + type: "literal", + values: Array.isArray(value) ? value : [value], + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _boolean3(Class22, params) { - return new Class22({ - type: "boolean", - ...normalizeParams3(params) - }); +var ZodFile2 = /* @__PURE__ */ $constructor2("ZodFile", (inst, def) => { + $ZodFile2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => fileProcessor2(inst, ctx, json3, params); + inst.min = (size, params) => inst.check(_minSize2(size, params)); + inst.max = (size, params) => inst.check(_maxSize2(size, params)); + inst.mime = (types, params) => inst.check(_mime2(Array.isArray(types) ? types : [types], params)); +}); +function file2(params) { + return _file2(ZodFile2, params); } -// @__NO_SIDE_EFFECTS__ -function _coercedBoolean3(Class22, params) { - return new Class22({ - type: "boolean", - coerce: true, - ...normalizeParams3(params) +var ZodTransform2 = /* @__PURE__ */ $constructor2("ZodTransform", (inst, def) => { + $ZodTransform2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => transformProcessor2(inst, ctx, json3, params); + inst._zod.parse = (payload, _ctx) => { + if (_ctx.direction === "backward") { + throw new $ZodEncodeError2(inst.constructor.name); + } + payload.addIssue = (issue4) => { + if (typeof issue4 === "string") { + payload.issues.push(util_exports2.issue(issue4, payload.value, def)); + } else { + const _issue = issue4; + if (_issue.fatal) + _issue.continue = false; + _issue.code ?? (_issue.code = "custom"); + _issue.input ?? (_issue.input = payload.value); + _issue.inst ?? (_issue.inst = inst); + payload.issues.push(util_exports2.issue(_issue)); + } + }; + const output = def.transform(payload.value, payload); + if (output instanceof Promise) { + return output.then((output2) => { + payload.value = output2; + payload.fallback = true; + return payload; + }); + } + payload.value = output; + payload.fallback = true; + return payload; + }; +}); +function transform2(fn) { + return new ZodTransform2({ + type: "transform", + transform: fn }); } -// @__NO_SIDE_EFFECTS__ -function _bigint3(Class22, params) { - return new Class22({ - type: "bigint", - ...normalizeParams3(params) +var ZodOptional2 = /* @__PURE__ */ $constructor2("ZodOptional", (inst, def) => { + $ZodOptional2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => optionalProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function optional2(innerType) { + return new ZodOptional2({ + type: "optional", + innerType }); } -// @__NO_SIDE_EFFECTS__ -function _coercedBigint3(Class22, params) { - return new Class22({ - type: "bigint", - coerce: true, - ...normalizeParams3(params) +var ZodExactOptional2 = /* @__PURE__ */ $constructor2("ZodExactOptional", (inst, def) => { + $ZodExactOptional2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => optionalProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function exactOptional2(innerType) { + return new ZodExactOptional2({ + type: "optional", + innerType }); } -// @__NO_SIDE_EFFECTS__ -function _int643(Class22, params) { - return new Class22({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "int64", - ...normalizeParams3(params) +var ZodNullable2 = /* @__PURE__ */ $constructor2("ZodNullable", (inst, def) => { + $ZodNullable2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nullableProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nullable2(innerType) { + return new ZodNullable2({ + type: "nullable", + innerType }); } -// @__NO_SIDE_EFFECTS__ -function _uint643(Class22, params) { - return new Class22({ - type: "bigint", - check: "bigint_format", - abort: false, - format: "uint64", - ...normalizeParams3(params) - }); +function nullish4(innerType) { + return optional2(nullable2(innerType)); } -// @__NO_SIDE_EFFECTS__ -function _symbol3(Class22, params) { - return new Class22({ - type: "symbol", - ...normalizeParams3(params) +var ZodDefault2 = /* @__PURE__ */ $constructor2("ZodDefault", (inst, def) => { + $ZodDefault2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => defaultProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeDefault = inst.unwrap; +}); +function _default4(innerType, defaultValue) { + return new ZodDefault2({ + type: "default", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports2.shallowClone(defaultValue); + } }); } -// @__NO_SIDE_EFFECTS__ -function _undefined22(Class22, params) { - return new Class22({ - type: "undefined", - ...normalizeParams3(params) +var ZodPrefault2 = /* @__PURE__ */ $constructor2("ZodPrefault", (inst, def) => { + $ZodPrefault2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => prefaultProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function prefault2(innerType, defaultValue) { + return new ZodPrefault2({ + type: "prefault", + innerType, + get defaultValue() { + return typeof defaultValue === "function" ? defaultValue() : util_exports2.shallowClone(defaultValue); + } }); } -// @__NO_SIDE_EFFECTS__ -function _null22(Class22, params) { - return new Class22({ - type: "null", - ...normalizeParams3(params) +var ZodNonOptional2 = /* @__PURE__ */ $constructor2("ZodNonOptional", (inst, def) => { + $ZodNonOptional2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nonoptionalProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function nonoptional2(innerType, params) { + return new ZodNonOptional2({ + type: "nonoptional", + innerType, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _any3(Class22) { - return new Class22({ - type: "any" +var ZodSuccess2 = /* @__PURE__ */ $constructor2("ZodSuccess", (inst, def) => { + $ZodSuccess2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => successProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function success2(innerType) { + return new ZodSuccess2({ + type: "success", + innerType }); } -// @__NO_SIDE_EFFECTS__ -function _unknown3(Class22) { - return new Class22({ - type: "unknown" +var ZodCatch2 = /* @__PURE__ */ $constructor2("ZodCatch", (inst, def) => { + $ZodCatch2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => catchProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; + inst.removeCatch = inst.unwrap; +}); +function _catch4(innerType, catchValue) { + return new ZodCatch2({ + type: "catch", + innerType, + catchValue: typeof catchValue === "function" ? catchValue : () => catchValue }); } -// @__NO_SIDE_EFFECTS__ -function _never3(Class22, params) { - return new Class22({ - type: "never", - ...normalizeParams3(params) - }); +var ZodNaN2 = /* @__PURE__ */ $constructor2("ZodNaN", (inst, def) => { + $ZodNaN2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => nanProcessor2(inst, ctx, json3, params); +}); +function nan2(params) { + return _nan2(ZodNaN2, params); } -// @__NO_SIDE_EFFECTS__ -function _void5(Class22, params) { - return new Class22({ - type: "void", - ...normalizeParams3(params) +var ZodPipe2 = /* @__PURE__ */ $constructor2("ZodPipe", (inst, def) => { + $ZodPipe2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => pipeProcessor2(inst, ctx, json3, params); + inst.in = def.in; + inst.out = def.out; +}); +function pipe2(in_, out) { + return new ZodPipe2({ + type: "pipe", + in: in_, + out + // ...util.normalizeParams(params), }); } -// @__NO_SIDE_EFFECTS__ -function _date3(Class22, params) { - return new Class22({ - type: "date", - ...normalizeParams3(params) +var ZodCodec2 = /* @__PURE__ */ $constructor2("ZodCodec", (inst, def) => { + ZodPipe2.init(inst, def); + $ZodCodec2.init(inst, def); +}); +function codec2(in_, out, params) { + return new ZodCodec2({ + type: "pipe", + in: in_, + out, + transform: params.decode, + reverseTransform: params.encode }); } -// @__NO_SIDE_EFFECTS__ -function _coercedDate3(Class22, params) { - return new Class22({ - type: "date", - coerce: true, - ...normalizeParams3(params) +function invertCodec(codec3) { + const def = codec3._zod.def; + return new ZodCodec2({ + type: "pipe", + in: def.out, + out: def.in, + transform: def.reverseTransform, + reverseTransform: def.transform }); } -// @__NO_SIDE_EFFECTS__ -function _nan3(Class22, params) { - return new Class22({ - type: "nan", - ...normalizeParams3(params) +var ZodPreprocess = /* @__PURE__ */ $constructor2("ZodPreprocess", (inst, def) => { + ZodPipe2.init(inst, def); + $ZodPreprocess.init(inst, def); +}); +var ZodReadonly2 = /* @__PURE__ */ $constructor2("ZodReadonly", (inst, def) => { + $ZodReadonly2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => readonlyProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function readonly2(innerType) { + return new ZodReadonly2({ + type: "readonly", + innerType }); } -// @__NO_SIDE_EFFECTS__ -function _lt3(value, params) { - return new $ZodCheckLessThan3({ - check: "less_than", - ...normalizeParams3(params), - value, - inclusive: false +var ZodTemplateLiteral2 = /* @__PURE__ */ $constructor2("ZodTemplateLiteral", (inst, def) => { + $ZodTemplateLiteral2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => templateLiteralProcessor2(inst, ctx, json3, params); +}); +function templateLiteral2(parts, params) { + return new ZodTemplateLiteral2({ + type: "template_literal", + parts, + ...util_exports2.normalizeParams(params) }); } -// @__NO_SIDE_EFFECTS__ -function _lte3(value, params) { - return new $ZodCheckLessThan3({ - check: "less_than", - ...normalizeParams3(params), - value, - inclusive: true +var ZodLazy2 = /* @__PURE__ */ $constructor2("ZodLazy", (inst, def) => { + $ZodLazy2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => lazyProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.getter(); +}); +function lazy2(getter) { + return new ZodLazy2({ + type: "lazy", + getter }); } -// @__NO_SIDE_EFFECTS__ -function _gt3(value, params) { - return new $ZodCheckGreaterThan3({ - check: "greater_than", - ...normalizeParams3(params), - value, - inclusive: false +var ZodPromise2 = /* @__PURE__ */ $constructor2("ZodPromise", (inst, def) => { + $ZodPromise2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => promiseProcessor2(inst, ctx, json3, params); + inst.unwrap = () => inst._zod.def.innerType; +}); +function promise2(innerType) { + return new ZodPromise2({ + type: "promise", + innerType }); } -// @__NO_SIDE_EFFECTS__ -function _gte3(value, params) { - return new $ZodCheckGreaterThan3({ - check: "greater_than", - ...normalizeParams3(params), - value, - inclusive: true +var ZodFunction2 = /* @__PURE__ */ $constructor2("ZodFunction", (inst, def) => { + $ZodFunction2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => functionProcessor2(inst, ctx, json3, params); +}); +function _function2(params) { + return new ZodFunction2({ + type: "function", + input: Array.isArray(params?.input) ? tuple2(params?.input) : params?.input ?? array2(unknown2()), + output: params?.output ?? unknown2() }); } -// @__NO_SIDE_EFFECTS__ -function _positive3(params) { - return /* @__PURE__ */ _gt3(0, params); +var ZodCustom2 = /* @__PURE__ */ $constructor2("ZodCustom", (inst, def) => { + $ZodCustom2.init(inst, def); + ZodType2.init(inst, def); + inst._zod.processJSONSchema = (ctx, json3, params) => customProcessor2(inst, ctx, json3, params); +}); +function check2(fn) { + const ch = new $ZodCheck2({ + check: "custom" + // ...util.normalizeParams(params), + }); + ch._zod.check = fn; + return ch; } -// @__NO_SIDE_EFFECTS__ -function _negative3(params) { - return /* @__PURE__ */ _lt3(0, params); +function custom2(fn, _params) { + return _custom2(ZodCustom2, fn ?? (() => true), _params); } -// @__NO_SIDE_EFFECTS__ -function _nonpositive3(params) { - return /* @__PURE__ */ _lte3(0, params); +function refine2(fn, _params = {}) { + return _refine2(ZodCustom2, fn, _params); } -// @__NO_SIDE_EFFECTS__ -function _nonnegative3(params) { - return /* @__PURE__ */ _gte3(0, params); +function superRefine2(fn, params) { + return _superRefine2(fn, params); } -// @__NO_SIDE_EFFECTS__ -function _multipleOf3(value, params) { - return new $ZodCheckMultipleOf3({ - check: "multiple_of", - ...normalizeParams3(params), - value +var describe4 = describe3; +var meta4 = meta3; +function _instanceof2(cls, params = {}) { + const inst = new ZodCustom2({ + type: "custom", + check: "custom", + fn: (data) => data instanceof cls, + abort: true, + ...util_exports2.normalizeParams(params) }); + inst._zod.bag.Class = cls; + inst._zod.check = (payload) => { + if (!(payload.value instanceof cls)) { + payload.issues.push({ + code: "invalid_type", + expected: cls.name, + input: payload.value, + inst, + path: [...inst._zod.def.path ?? []] + }); + } + }; + return inst; } -// @__NO_SIDE_EFFECTS__ -function _maxSize3(maximum, params) { - return new $ZodCheckMaxSize3({ - check: "max_size", - ...normalizeParams3(params), - maximum +var stringbool2 = (...args) => _stringbool2({ + Codec: ZodCodec2, + Boolean: ZodBoolean2, + String: ZodString2 +}, ...args); +function json2(params) { + const jsonSchema = lazy2(() => { + return union2([string5(params), number5(), boolean5(), _null6(), array2(jsonSchema), record2(string5(), jsonSchema)]); }); + return jsonSchema; } -// @__NO_SIDE_EFFECTS__ -function _minSize3(minimum, params) { - return new $ZodCheckMinSize3({ - check: "min_size", - ...normalizeParams3(params), - minimum +function preprocess2(fn, schema) { + return new ZodPreprocess({ + type: "pipe", + in: transform2(fn), + out: schema }); } -// @__NO_SIDE_EFFECTS__ -function _size3(size, params) { - return new $ZodCheckSizeEquals3({ - check: "size_equals", - ...normalizeParams3(params), - size + +// node_modules/zod/v4/classic/compat.js +var ZodIssueCode2 = { + invalid_type: "invalid_type", + too_big: "too_big", + too_small: "too_small", + invalid_format: "invalid_format", + not_multiple_of: "not_multiple_of", + unrecognized_keys: "unrecognized_keys", + invalid_union: "invalid_union", + invalid_key: "invalid_key", + invalid_element: "invalid_element", + invalid_value: "invalid_value", + custom: "custom" +}; +function setErrorMap2(map3) { + config2({ + customError: map3 }); } -// @__NO_SIDE_EFFECTS__ -function _maxLength3(maximum, params) { - const ch = new $ZodCheckMaxLength3({ - check: "max_length", - ...normalizeParams3(params), - maximum - }); - return ch; +function getErrorMap2() { + return config2().customError; } -// @__NO_SIDE_EFFECTS__ -function _minLength3(minimum, params) { - return new $ZodCheckMinLength3({ - check: "min_length", - ...normalizeParams3(params), - minimum - }); +var ZodFirstPartyTypeKind2; +/* @__PURE__ */ (function(ZodFirstPartyTypeKind3) { +})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); + +// node_modules/zod/v4/classic/from-json-schema.js +var z2 = { + ...schemas_exports4, + ...checks_exports4, + iso: iso_exports2 +}; +var RECOGNIZED_KEYS2 = /* @__PURE__ */ new Set([ + // Schema identification + "$schema", + "$ref", + "$defs", + "definitions", + // Core schema keywords + "$id", + "id", + "$comment", + "$anchor", + "$vocabulary", + "$dynamicRef", + "$dynamicAnchor", + // Type + "type", + "enum", + "const", + // Composition + "anyOf", + "oneOf", + "allOf", + "not", + // Object + "properties", + "required", + "additionalProperties", + "patternProperties", + "propertyNames", + "minProperties", + "maxProperties", + // Array + "items", + "prefixItems", + "additionalItems", + "minItems", + "maxItems", + "uniqueItems", + "contains", + "minContains", + "maxContains", + // String + "minLength", + "maxLength", + "pattern", + "format", + // Number + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + // Already handled metadata + "description", + "default", + // Content + "contentEncoding", + "contentMediaType", + "contentSchema", + // Unsupported (error-throwing) + "unevaluatedItems", + "unevaluatedProperties", + "if", + "then", + "else", + "dependentSchemas", + "dependentRequired", + // OpenAPI + "nullable", + "readOnly" +]); +function detectVersion2(schema, defaultTarget) { + const $schema = schema.$schema; + if ($schema === "https://json-schema.org/draft/2020-12/schema") { + return "draft-2020-12"; + } + if ($schema === "http://json-schema.org/draft-07/schema#") { + return "draft-7"; + } + if ($schema === "http://json-schema.org/draft-04/schema#") { + return "draft-4"; + } + return defaultTarget ?? "draft-2020-12"; +} +function resolveRef2(ref, ctx) { + if (!ref.startsWith("#")) { + throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); + } + const path = ref.slice(1).split("/").filter(Boolean); + if (path.length === 0) { + return ctx.rootSchema; + } + const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; + if (path[0] === defsKey) { + const key = path[1]; + if (!key || !ctx.defs[key]) { + throw new Error(`Reference not found: ${ref}`); + } + return ctx.defs[key]; + } + throw new Error(`Reference not found: ${ref}`); +} +function convertBaseSchema2(schema, ctx) { + if (schema.not !== void 0) { + if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { + return z2.never(); + } + throw new Error("not is not supported in Zod (except { not: {} } for never)"); + } + if (schema.unevaluatedItems !== void 0) { + throw new Error("unevaluatedItems is not supported"); + } + if (schema.unevaluatedProperties !== void 0) { + throw new Error("unevaluatedProperties is not supported"); + } + if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { + throw new Error("Conditional schemas (if/then/else) are not supported"); + } + if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { + throw new Error("dependentSchemas and dependentRequired are not supported"); + } + if (schema.$ref) { + const refPath = schema.$ref; + if (ctx.refs.has(refPath)) { + return ctx.refs.get(refPath); + } + if (ctx.processing.has(refPath)) { + return z2.lazy(() => { + if (!ctx.refs.has(refPath)) { + throw new Error(`Circular reference not resolved: ${refPath}`); + } + return ctx.refs.get(refPath); + }); + } + ctx.processing.add(refPath); + const resolved = resolveRef2(refPath, ctx); + const zodSchema2 = convertSchema2(resolved, ctx); + ctx.refs.set(refPath, zodSchema2); + ctx.processing.delete(refPath); + return zodSchema2; + } + if (schema.enum !== void 0) { + const enumValues = schema.enum; + if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { + return z2.null(); + } + if (enumValues.length === 0) { + return z2.never(); + } + if (enumValues.length === 1) { + return z2.literal(enumValues[0]); + } + if (enumValues.every((v) => typeof v === "string")) { + return z2.enum(enumValues); + } + const literalSchemas = enumValues.map((v) => z2.literal(v)); + if (literalSchemas.length < 2) { + return literalSchemas[0]; + } + return z2.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + } + if (schema.const !== void 0) { + return z2.literal(schema.const); + } + const type = schema.type; + if (Array.isArray(type)) { + const typeSchemas = type.map((t) => { + const typeSchema = { ...schema, type: t }; + return convertBaseSchema2(typeSchema, ctx); + }); + if (typeSchemas.length === 0) { + return z2.never(); + } + if (typeSchemas.length === 1) { + return typeSchemas[0]; + } + return z2.union(typeSchemas); + } + if (!type) { + return z2.any(); + } + let zodSchema; + switch (type) { + case "string": { + let stringSchema = z2.string(); + if (schema.format) { + const format2 = schema.format; + if (format2 === "email") { + stringSchema = stringSchema.check(z2.email()); + } else if (format2 === "uri" || format2 === "uri-reference") { + stringSchema = stringSchema.check(z2.url()); + } else if (format2 === "uuid" || format2 === "guid") { + stringSchema = stringSchema.check(z2.uuid()); + } else if (format2 === "date-time") { + stringSchema = stringSchema.check(z2.iso.datetime()); + } else if (format2 === "date") { + stringSchema = stringSchema.check(z2.iso.date()); + } else if (format2 === "time") { + stringSchema = stringSchema.check(z2.iso.time()); + } else if (format2 === "duration") { + stringSchema = stringSchema.check(z2.iso.duration()); + } else if (format2 === "ipv4") { + stringSchema = stringSchema.check(z2.ipv4()); + } else if (format2 === "ipv6") { + stringSchema = stringSchema.check(z2.ipv6()); + } else if (format2 === "mac") { + stringSchema = stringSchema.check(z2.mac()); + } else if (format2 === "cidr") { + stringSchema = stringSchema.check(z2.cidrv4()); + } else if (format2 === "cidr-v6") { + stringSchema = stringSchema.check(z2.cidrv6()); + } else if (format2 === "base64") { + stringSchema = stringSchema.check(z2.base64()); + } else if (format2 === "base64url") { + stringSchema = stringSchema.check(z2.base64url()); + } else if (format2 === "e164") { + stringSchema = stringSchema.check(z2.e164()); + } else if (format2 === "jwt") { + stringSchema = stringSchema.check(z2.jwt()); + } else if (format2 === "emoji") { + stringSchema = stringSchema.check(z2.emoji()); + } else if (format2 === "nanoid") { + stringSchema = stringSchema.check(z2.nanoid()); + } else if (format2 === "cuid") { + stringSchema = stringSchema.check(z2.cuid()); + } else if (format2 === "cuid2") { + stringSchema = stringSchema.check(z2.cuid2()); + } else if (format2 === "ulid") { + stringSchema = stringSchema.check(z2.ulid()); + } else if (format2 === "xid") { + stringSchema = stringSchema.check(z2.xid()); + } else if (format2 === "ksuid") { + stringSchema = stringSchema.check(z2.ksuid()); + } + } + if (typeof schema.minLength === "number") { + stringSchema = stringSchema.min(schema.minLength); + } + if (typeof schema.maxLength === "number") { + stringSchema = stringSchema.max(schema.maxLength); + } + if (schema.pattern) { + stringSchema = stringSchema.regex(new RegExp(schema.pattern)); + } + zodSchema = stringSchema; + break; + } + case "number": + case "integer": { + let numberSchema = type === "integer" ? z2.number().int() : z2.number(); + if (typeof schema.minimum === "number") { + numberSchema = numberSchema.min(schema.minimum); + } + if (typeof schema.maximum === "number") { + numberSchema = numberSchema.max(schema.maximum); + } + if (typeof schema.exclusiveMinimum === "number") { + numberSchema = numberSchema.gt(schema.exclusiveMinimum); + } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { + numberSchema = numberSchema.gt(schema.minimum); + } + if (typeof schema.exclusiveMaximum === "number") { + numberSchema = numberSchema.lt(schema.exclusiveMaximum); + } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { + numberSchema = numberSchema.lt(schema.maximum); + } + if (typeof schema.multipleOf === "number") { + numberSchema = numberSchema.multipleOf(schema.multipleOf); + } + zodSchema = numberSchema; + break; + } + case "boolean": { + zodSchema = z2.boolean(); + break; + } + case "null": { + zodSchema = z2.null(); + break; + } + case "object": { + const shape = {}; + const properties = schema.properties || {}; + const requiredSet = new Set(schema.required || []); + for (const [key, propSchema] of Object.entries(properties)) { + const propZodSchema = convertSchema2(propSchema, ctx); + shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); + } + if (schema.propertyNames) { + const keySchema = convertSchema2(schema.propertyNames, ctx); + const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) : z2.any(); + if (Object.keys(shape).length === 0) { + zodSchema = z2.record(keySchema, valueSchema); + break; + } + const objectSchema2 = z2.object(shape).passthrough(); + const recordSchema = z2.looseRecord(keySchema, valueSchema); + zodSchema = z2.intersection(objectSchema2, recordSchema); + break; + } + if (schema.patternProperties) { + const patternProps = schema.patternProperties; + const patternKeys = Object.keys(patternProps); + const looseRecords = []; + for (const pattern of patternKeys) { + const patternValue = convertSchema2(patternProps[pattern], ctx); + const keySchema = z2.string().regex(new RegExp(pattern)); + looseRecords.push(z2.looseRecord(keySchema, patternValue)); + } + const schemasToIntersect = []; + if (Object.keys(shape).length > 0) { + schemasToIntersect.push(z2.object(shape).passthrough()); + } + schemasToIntersect.push(...looseRecords); + if (schemasToIntersect.length === 0) { + zodSchema = z2.object({}).passthrough(); + } else if (schemasToIntersect.length === 1) { + zodSchema = schemasToIntersect[0]; + } else { + let result = z2.intersection(schemasToIntersect[0], schemasToIntersect[1]); + for (let i = 2; i < schemasToIntersect.length; i++) { + result = z2.intersection(result, schemasToIntersect[i]); + } + zodSchema = result; + } + break; + } + const objectSchema = z2.object(shape); + if (schema.additionalProperties === false) { + zodSchema = objectSchema.strict(); + } else if (typeof schema.additionalProperties === "object") { + zodSchema = objectSchema.catchall(convertSchema2(schema.additionalProperties, ctx)); + } else { + zodSchema = objectSchema.passthrough(); + } + break; + } + case "array": { + const prefixItems = schema.prefixItems; + const items = schema.items; + if (prefixItems && Array.isArray(prefixItems)) { + const tupleItems = prefixItems.map((item) => convertSchema2(item, ctx)); + const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema2(items, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (Array.isArray(items)) { + const tupleItems = items.map((item) => convertSchema2(item, ctx)); + const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema2(schema.additionalItems, ctx) : void 0; + if (rest) { + zodSchema = z2.tuple(tupleItems).rest(rest); + } else { + zodSchema = z2.tuple(tupleItems); + } + if (typeof schema.minItems === "number") { + zodSchema = zodSchema.check(z2.minLength(schema.minItems)); + } + if (typeof schema.maxItems === "number") { + zodSchema = zodSchema.check(z2.maxLength(schema.maxItems)); + } + } else if (items !== void 0) { + const element = convertSchema2(items, ctx); + let arraySchema = z2.array(element); + if (typeof schema.minItems === "number") { + arraySchema = arraySchema.min(schema.minItems); + } + if (typeof schema.maxItems === "number") { + arraySchema = arraySchema.max(schema.maxItems); + } + zodSchema = arraySchema; + } else { + zodSchema = z2.array(z2.any()); + } + break; + } + default: + throw new Error(`Unsupported type: ${type}`); + } + return zodSchema; } -// @__NO_SIDE_EFFECTS__ -function _length3(length, params) { - return new $ZodCheckLengthEquals3({ - check: "length_equals", - ...normalizeParams3(params), - length - }); +function convertSchema2(schema, ctx) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + let baseSchema = convertBaseSchema2(schema, ctx); + const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; + if (schema.anyOf && Array.isArray(schema.anyOf)) { + const options = schema.anyOf.map((s) => convertSchema2(s, ctx)); + const anyOfUnion = z2.union(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, anyOfUnion) : anyOfUnion; + } + if (schema.oneOf && Array.isArray(schema.oneOf)) { + const options = schema.oneOf.map((s) => convertSchema2(s, ctx)); + const oneOfUnion = z2.xor(options); + baseSchema = hasExplicitType ? z2.intersection(baseSchema, oneOfUnion) : oneOfUnion; + } + if (schema.allOf && Array.isArray(schema.allOf)) { + if (schema.allOf.length === 0) { + baseSchema = hasExplicitType ? baseSchema : z2.any(); + } else { + let result = hasExplicitType ? baseSchema : convertSchema2(schema.allOf[0], ctx); + const startIdx = hasExplicitType ? 0 : 1; + for (let i = startIdx; i < schema.allOf.length; i++) { + result = z2.intersection(result, convertSchema2(schema.allOf[i], ctx)); + } + baseSchema = result; + } + } + if (schema.nullable === true && ctx.version === "openapi-3.0") { + baseSchema = z2.nullable(baseSchema); + } + if (schema.readOnly === true) { + baseSchema = z2.readonly(baseSchema); + } + if (schema.default !== void 0) { + baseSchema = baseSchema.default(schema.default); + } + const extraMeta = {}; + const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; + for (const key of coreMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; + for (const key of contentMetadataKeys) { + if (key in schema) { + extraMeta[key] = schema[key]; + } + } + for (const key of Object.keys(schema)) { + if (!RECOGNIZED_KEYS2.has(key)) { + extraMeta[key] = schema[key]; + } + } + if (Object.keys(extraMeta).length > 0) { + ctx.registry.add(baseSchema, extraMeta); + } + if (schema.description) { + baseSchema = baseSchema.describe(schema.description); + } + return baseSchema; } -// @__NO_SIDE_EFFECTS__ -function _regex3(pattern, params) { - return new $ZodCheckRegex3({ - check: "string_format", - format: "regex", - ...normalizeParams3(params), - pattern - }); +function fromJSONSchema2(schema, params) { + if (typeof schema === "boolean") { + return schema ? z2.any() : z2.never(); + } + let normalized; + try { + normalized = JSON.parse(JSON.stringify(schema)); + } catch { + throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas"); + } + const version3 = detectVersion2(normalized, params?.defaultTarget); + const defs = normalized.$defs || normalized.definitions || {}; + const ctx = { + version: version3, + defs, + refs: /* @__PURE__ */ new Map(), + processing: /* @__PURE__ */ new Set(), + rootSchema: normalized, + registry: params?.registry ?? globalRegistry2 + }; + return convertSchema2(normalized, ctx); } -// @__NO_SIDE_EFFECTS__ -function _lowercase3(params) { - return new $ZodCheckLowerCase3({ - check: "string_format", - format: "lowercase", - ...normalizeParams3(params) - }); + +// node_modules/zod/v4/classic/coerce.js +var coerce_exports2 = {}; +__export(coerce_exports2, { + bigint: () => bigint6, + boolean: () => boolean6, + date: () => date8, + number: () => number6, + string: () => string6 +}); +function string6(params) { + return _coercedString2(ZodString2, params); } -// @__NO_SIDE_EFFECTS__ -function _uppercase3(params) { - return new $ZodCheckUpperCase3({ - check: "string_format", - format: "uppercase", - ...normalizeParams3(params) - }); +function number6(params) { + return _coercedNumber2(ZodNumber2, params); } -// @__NO_SIDE_EFFECTS__ -function _includes3(includes, params) { - return new $ZodCheckIncludes3({ - check: "string_format", - format: "includes", - ...normalizeParams3(params), - includes - }); +function boolean6(params) { + return _coercedBoolean2(ZodBoolean2, params); } -// @__NO_SIDE_EFFECTS__ -function _startsWith3(prefix, params) { - return new $ZodCheckStartsWith3({ - check: "string_format", - format: "starts_with", - ...normalizeParams3(params), - prefix - }); +function bigint6(params) { + return _coercedBigint2(ZodBigInt2, params); } -// @__NO_SIDE_EFFECTS__ -function _endsWith3(suffix, params) { - return new $ZodCheckEndsWith3({ - check: "string_format", - format: "ends_with", - ...normalizeParams3(params), - suffix - }); +function date8(params) { + return _coercedDate2(ZodDate2, params); } -// @__NO_SIDE_EFFECTS__ -function _property3(property, schema, params) { - return new $ZodCheckProperty3({ - check: "property", - property, - schema, - ...normalizeParams3(params) - }); + +// node_modules/zod/v4/classic/external.js +config2(en_default2()); + +// src/util.ts +function composeStatusDescription(infraError, tfSummary) { + let description = infraError ? "Build failed - Infra problems" : "Build finished"; + return description + tfSummary; } -// @__NO_SIDE_EFFECTS__ -function _mime3(types, params) { - return new $ZodCheckMimeType3({ - check: "mime_type", - mime: types, - ...normalizeParams3(params) - }); +function getSummary(result) { + const parsedResult = external_exports2.object({ + summary: external_exports2.string().min(1) + }).safeParse(result); + return parsedResult.success ? ` - ${parsedResult.data.summary}` : ""; } -// @__NO_SIDE_EFFECTS__ -function _overwrite3(tx) { - return new $ZodCheckOverwrite3({ - check: "overwrite", - tx + +// src/schema/input.ts +var stringToArraySchema = external_exports2.string().transform((str) => str.split(";")); +var keyValueArrayToObjectSchema = stringToArraySchema.transform((arr) => { + let obj = {}; + arr.forEach((item) => { + const [key, ...values] = item.split("="); + if (key === "" && Array.isArray(values) && values.length === 0) return; + obj[key] = values.join("="); }); -} -// @__NO_SIDE_EFFECTS__ -function _normalize3(form) { - return /* @__PURE__ */ _overwrite3((input) => input.normalize(form)); -} -// @__NO_SIDE_EFFECTS__ -function _trim3() { - return /* @__PURE__ */ _overwrite3((input) => input.trim()); -} -// @__NO_SIDE_EFFECTS__ -function _toLowerCase3() { - return /* @__PURE__ */ _overwrite3((input) => input.toLowerCase()); -} -// @__NO_SIDE_EFFECTS__ -function _toUpperCase3() { - return /* @__PURE__ */ _overwrite3((input) => input.toUpperCase()); -} -// @__NO_SIDE_EFFECTS__ -function _slugify3() { - return /* @__PURE__ */ _overwrite3((input) => slugify3(input)); -} -// @__NO_SIDE_EFFECTS__ -function _array3(Class22, element, params) { - return new Class22({ - type: "array", - element, - // get element() { - // return element; - // }, - ...normalizeParams3(params) + return external_exports2.record(external_exports2.string(), external_exports2.string()).parse(obj); +}); +var tmtEnvVarsSchema = keyValueArrayToObjectSchema; +var tmtEnvSecretsSchema = keyValueArrayToObjectSchema; +var tmtArtifactsInputSchema = stringToArraySchema.transform((arr) => { + let artifacts = []; + arr.forEach((item) => { + if (item === "") return; + artifacts.push({ type: "fedora-copr-build", id: item }); }); -} -// @__NO_SIDE_EFFECTS__ -function _union3(Class22, options, params) { - return new Class22({ - type: "union", - options, - ...normalizeParams3(params) + return artifacts; +}); +var tmtContextInputSchema = keyValueArrayToObjectSchema; +var tmtArtifactsSchema = external_exports2.array( + external_exports2.object({ + id: external_exports2.string().min(1), + type: external_exports2.string().min(1), + packages: external_exports2.array(external_exports2.string().min(1)).optional(), + install: external_exports2.boolean().optional(), + order: external_exports2.number().optional() + }) +).default([]); +var tmtContextSchema = external_exports2.looseObject({ + distro: external_exports2.string().min(1).optional(), + variant: external_exports2.string().min(1).optional(), + arch: external_exports2.string().min(1).optional(), + component: external_exports2.string().min(1).optional(), + collection: external_exports2.string().min(1).optional(), + module: external_exports2.string().min(1).optional(), + initiator: external_exports2.string().min(1).optional(), + trigger: external_exports2.string().min(1).optional() +}); +var envSettingsSchema = external_exports2.object({ + pipeline: external_exports2.object({ + skip_guest_setup: external_exports2.boolean().optional() + }).optional(), + provisioning: external_exports2.object({ + post_install_script: external_exports2.string().min(1).optional(), + tags: external_exports2.record(external_exports2.string(), external_exports2.string()).optional() + }).optional() +}).optional(); +var pipelineSettingsSchema = external_exports2.object({ + timeout: external_exports2.number().min(1).optional(), + type: external_exports2.enum(["tmt-multihost"]).optional(), + "provision-error-failed-result": external_exports2.boolean().optional(), + "parallel-limit": external_exports2.number().nonnegative().optional() +}).optional(); +var timeoutSchema = external_exports2.coerce.number(); +var tmtPlanRegexSchema = external_exports2.string().min(1); +var tmtPlanFilterSchema = external_exports2.string().min(1); +var tmtPathSchema = external_exports2.string().min(1); + +// src/schema/testing-farm-api.ts +var requestSchema2 = external_exports2.object({ + id: external_exports2.string(), + state: external_exports2.string(), + created: external_exports2.string(), + updated: external_exports2.string() +}); +var requestDetailsSchema = external_exports2.object({ + id: external_exports2.string(), + state: external_exports2.string(), + result: external_exports2.object({ + summary: external_exports2.union([external_exports2.string(), external_exports2.null()]), + overall: external_exports2.string() + }).nullable(), + run_time: external_exports2.number().nullable(), + created: external_exports2.string(), + updated: external_exports2.string() +}); + +// src/action.ts +async function action(pr) { + const tfInstance = getInput("api_url"); + const api = new TestingFarmAPI( + tfInstance, + getInput("api_key", { required: true }) + ); + const tfScope = (await api.whoami()).token.ranch; + const tfUrl = tfScope === "public" ? "https://artifacts.dev.testing-farm.io" : "https://artifacts.osci.redhat.com/testing-farm"; + const tmtEnvVarsParsed = tmtEnvVarsSchema.safeParse(getInput("variables")); + const tmtEnvVars = tmtEnvVarsParsed.success ? tmtEnvVarsParsed.data : {}; + const tmtEnvSecretsParsed = tmtEnvSecretsSchema.safeParse( + getInput("secrets") + ); + const tmtEnvSecrets = tmtEnvSecretsParsed.success ? tmtEnvSecretsParsed.data : {}; + const tmtArtifactsParsed = tmtArtifactsInputSchema.safeParse( + getInput("copr_artifacts") + ); + const tmtArtifacts = tmtArtifactsParsed.success ? tmtArtifactsSchema.parse(tmtArtifactsParsed.data) : []; + const rawTmtHardware = getInput("tmt_hardware"); + let tmtHardware; + if (rawTmtHardware) { + tmtHardware = JSON.parse(rawTmtHardware); + } + const tmtPathParsed = tmtPathSchema.safeParse(getInput("tmt_path")); + const tmtPath = tmtPathParsed.success ? tmtPathParsed.data : "."; + const tmtContextParsed = tmtContextInputSchema.safeParse( + getInput("tmt_context") + ); + const tmtContext = tmtContextParsed.success ? tmtContextSchema.parse(tmtContextParsed.data) : void 0; + const tmtPlanRegexParsed = tmtPlanRegexSchema.safeParse( + getInput("tmt_plan_regex") + ); + const tmtPlanRegex = tmtPlanRegexParsed.success ? { name: tmtPlanRegexParsed.data } : {}; + const tmtPlanFilterParsed = tmtPlanFilterSchema.safeParse( + getInput("tmt_plan_filter") + ); + const tmtPlanFilter = tmtPlanFilterParsed.success ? tmtPlanFilterParsed.data : void 0; + const envSettingsParsed = envSettingsSchema.safeParse( + JSON.parse(getInput("environment_settings")) + ); + const envSettings = envSettingsParsed.success ? envSettingsParsed.data : {}; + const pipelineSettings = pipelineSettingsSchema.parse( + JSON.parse(getInput("pipeline_settings")) + ); + const ref = getInput("git_ref") || "master"; + debug(`Using git_ref: '${ref}'`); + const composeInput = getInput("compose"); + const poolInput = getInput("pool"); + const environment = { + arch: getInput("arch"), + ...poolInput ? { pool: poolInput } : {}, + variables: tmtEnvVars, + settings: envSettings, + secrets: tmtEnvSecrets, + artifacts: tmtArtifacts, + tmt: { + ...tmtContext ? { context: tmtContext } : {} + } + }; + if (composeInput) { + environment.os = { + compose: composeInput + }; + } else { + environment.os = null; + } + const request2 = { + test: { + fmf: { + url: getInput("git_url", { required: true }), + ref, + path: tmtPath, + plan_filter: tmtPlanFilter, + ...tmtPlanRegex + } + }, + environments: [environment], + settings: { + pipeline: pipelineSettings + } + }; + let tfResponseRaw; + if (!rawTmtHardware) { + tfResponseRaw = await api.newRequest(request2, false); + } else { + tfResponseRaw = await api.unsafeNewRequest({ + ...request2, + environments: [{ ...request2.environments[0], hardware: tmtHardware }] + }); + } + request2.environments.map( + (env) => delete env.secrets + ); + debug( + `Testing Farm request (except environment[].secrets): ${JSON.stringify( + request2, + null, + 2 + )}` + ); + debug(`Testing Farm response: ${JSON.stringify(tfResponseRaw, null, 2)}`); + const tfResponse = requestSchema2.parse(tfResponseRaw); + const tfArtifactUrl = `${tfUrl}/${tfResponse.id}`; + notice(`Testing Farm logs: ${tfArtifactUrl}`); + debug("Setting outputs and states"); + setOutput("request_id", tfResponse.id); + setOutput("request_url", `${tfInstance}/requests/${tfResponse.id}`); + setOutput("test_log_url", tfArtifactUrl); + setTfRequestId(tfResponse.id); + setTfArtifactUrl(tfArtifactUrl); + pr.isInitialized() && await pr.setStatus("pending", "Build started", `${tfArtifactUrl}`); + const interval = 120 * 1e3; + const parsedTimeout = timeoutSchema.safeParse(getInput("timeout")); + let timeout = parsedTimeout.success ? parsedTimeout.data * 2 : 960; + let tfResult; + debug(`Testing Farm - waiting for results (timeout: ${timeout} minutes)`); + do { + tfResult = requestDetailsSchema.parse( + await api.requestDetails(tfResponse.id, false) + ); + if (tfResult.state !== "running" && tfResult.state !== "new" && tfResult.state !== "pending" && tfResult.state !== "queued") { + break; + } + debug(`Testing Farm - state: '${tfResult.state}'`); + timeout--; + await setTimeout2(interval); + } while (timeout > 0); + if (timeout === 0) { + throw new TFError( + `Testing Farm - timeout reached. The test is still in state: '${tfResult.state}'`, + `${tfArtifactUrl}` + ); + } + debug(`response:'${JSON.stringify(tfResult, null, 2)}'`); + const state = tfResult.state; + const result = tfResult.result ? tfResult.result.overall : "unknown"; + let finalState = "success"; + let infraError = false; + let log = ""; + notice(`State is ${state} and result is: ${result}`); + if (state === "complete") { + if (result !== "passed") { + finalState = "failure"; + } + } else { + infraError = true; + finalState = "failure"; + log = "pipeline.log"; + } + notice(`Final state is: ${finalState}`); + notice(`Infra state is: ${infraError ? "Failed" : "OK"}`); + const summary2 = new Summary2([], { + id: tfResponse.id, + name: getInput("pull_request_status_name"), + runTime: tfResult.run_time || 0, + created: tfResponse.created, + updated: tfResponse.updated, + compose: composeInput || null, + arch: getInput("arch"), + infrastructureFailure: infraError, + status: state, + outcome: result, + results: [ + `test `, + `pipeline` + ] }); + debug(`Set PR status to ${finalState} with result" ${tfResult.result}`); + pr.isInitialized() && await pr.setStatus( + finalState, + composeStatusDescription(infraError, getSummary(tfResult.result)), + `${tfArtifactUrl}` + ); + if (pr.isInitialized() && getBooleanInput("create_issue_comment")) { + do { + const timeout2 = Math.floor(Math.random() * 1e4); + debug(`set timeout to ${timeout2}`); + await setTimeout2(timeout2); + await pr.metadata.refresh(); + } while (pr.metadata.lock === "true"); + debug(`metadata unlocked`); + await pr.metadata.controller.setMetadata( + pr.number, + "lock", + "true" + ); + summary2.refreshData(pr.metadata.data); + debug(`Publish Comment: ${summary2.data}`); + await pr.publishComment( + `### Testing Farm results +${summary2.getTableSummary()}`, + summary2.data + ); + await pr.metadata.setMetadata(summary2.data, "false"); + } + if (getBooleanInput("create_github_summary")) { + debug(`Creating GitHub Summary`); + await summary2.setJobSummary(); + } + if (finalState === "failure") { + throw new TFError( + composeStatusDescription(infraError, getSummary(tfResult.result)), + `${tfArtifactUrl}` + ); + } } -function _xor3(Class22, options, params) { - return new Class22({ - type: "union", - options, - inclusive: false, - ...normalizeParams3(params) +var action_default = action; + +// node_modules/@actions/github/lib/context.js +import { readFileSync, existsSync as existsSync2 } from "fs"; +import { EOL as EOL5 } from "os"; +var Context = class { + /** + * Hydrate the context from the environment + */ + constructor() { + var _a4, _b, _c; + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if (existsSync2(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); + } else { + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${EOL5}`); + } + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + this.job = process.env.GITHUB_JOB; + this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10); + this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); + this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); + this.apiUrl = (_a4 = process.env.GITHUB_API_URL) !== null && _a4 !== void 0 ? _a4 : `https://api.github.com`; + this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; + this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); + return { owner, repo }; + } + if (this.payload.repository) { + return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name + }; + } + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +}; + +// node_modules/@actions/github/lib/internal/utils.js +var httpClient = __toESM(require_lib(), 1); +var import_undici2 = __toESM(require_undici(), 1); +var __awaiter2 = function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); }); +}; +function getProxyAgent(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgent(destinationUrl); } -// @__NO_SIDE_EFFECTS__ -function _discriminatedUnion3(Class22, discriminator, options, params) { - return new Class22({ - type: "union", - options, - discriminator, - ...normalizeParams3(params) - }); +function getProxyAgentDispatcher(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgentDispatcher(destinationUrl); } -// @__NO_SIDE_EFFECTS__ -function _intersection3(Class22, left, right) { - return new Class22({ - type: "intersection", - left, - right +function getProxyFetch(destinationUrl) { + const httpDispatcher = getProxyAgentDispatcher(destinationUrl); + const proxyFetch = (url4, opts) => __awaiter2(this, void 0, void 0, function* () { + return (0, import_undici2.fetch)(url4, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); + return proxyFetch; } -// @__NO_SIDE_EFFECTS__ -function _tuple3(Class22, items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType3; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new Class22({ - type: "tuple", - items, - rest, - ...normalizeParams3(params) - }); +function getApiBaseUrl() { + return process.env["GITHUB_API_URL"] || "https://api.github.com"; } -// @__NO_SIDE_EFFECTS__ -function _record3(Class22, keyType, valueType, params) { - return new Class22({ - type: "record", - keyType, - valueType, - ...normalizeParams3(params) - }); + +// node_modules/universal-user-agent/index.js +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + if (typeof process === "object" && process.version !== void 0) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + return ""; } -// @__NO_SIDE_EFFECTS__ -function _map3(Class22, keyType, valueType, params) { - return new Class22({ - type: "map", - keyType, - valueType, - ...normalizeParams3(params) + +// node_modules/before-after-hook/lib/register.js +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + if (!options) { + options = {}; + } + if (Array.isArray(name)) { + return name.reverse().reduce((callback, name2) => { + return register.bind(null, state, name2, callback, options); + }, method)(); + } + return Promise.resolve().then(() => { + if (!state.registry[name]) { + return method(options); + } + return state.registry[name].reduce((method2, registered) => { + return registered.hook.bind(null, method2, options); + }, method)(); }); } -// @__NO_SIDE_EFFECTS__ -function _set3(Class22, valueType, params) { - return new Class22({ - type: "set", - valueType, - ...normalizeParams3(params) + +// node_modules/before-after-hook/lib/add.js +function addHook(state, kind, name, hook2) { + const orig = hook2; + if (!state.registry[name]) { + state.registry[name] = []; + } + if (kind === "before") { + hook2 = (method, options) => { + return Promise.resolve().then(orig.bind(null, options)).then(method.bind(null, options)); + }; + } + if (kind === "after") { + hook2 = (method, options) => { + let result; + return Promise.resolve().then(method.bind(null, options)).then((result_) => { + result = result_; + return orig(result, options); + }).then(() => { + return result; + }); + }; + } + if (kind === "error") { + hook2 = (method, options) => { + return Promise.resolve().then(method.bind(null, options)).catch((error99) => { + return orig(error99, options); + }); + }; + } + state.registry[name].push({ + hook: hook2, + orig }); } -// @__NO_SIDE_EFFECTS__ -function _enum5(Class22, values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new Class22({ - type: "enum", - entries, - ...normalizeParams3(params) - }); + +// node_modules/before-after-hook/lib/remove.js +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } + const index = state.registry[name].map((registered) => { + return registered.orig; + }).indexOf(method); + if (index === -1) { + return; + } + state.registry[name].splice(index, 1); } -// @__NO_SIDE_EFFECTS__ -function _nativeEnum3(Class22, entries, params) { - return new Class22({ - type: "enum", - entries, - ...normalizeParams3(params) + +// node_modules/before-after-hook/index.js +var bind2 = Function.bind; +var bindable = bind2.bind(bind2); +function bindApi(hook2, state, name) { + const removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook2.api = { remove: removeHookRef }; + hook2.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach((kind) => { + const args = name ? [state, kind, name] : [state, kind]; + hook2[kind] = hook2.api[kind] = bindable(addHook, null).apply(null, args); }); } -// @__NO_SIDE_EFFECTS__ -function _literal3(Class22, value, params) { - return new Class22({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...normalizeParams3(params) - }); +function Singular() { + const singularHookName = /* @__PURE__ */ Symbol("Singular"); + const singularHookState = { + registry: {} + }; + const singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; } -// @__NO_SIDE_EFFECTS__ -function _file3(Class22, params) { - return new Class22({ - type: "file", - ...normalizeParams3(params) - }); +function Collection() { + const state = { + registry: {} + }; + const hook2 = register.bind(null, state); + bindApi(hook2, state); + return hook2; } -// @__NO_SIDE_EFFECTS__ -function _transform3(Class22, fn) { - return new Class22({ - type: "transform", - transform: fn - }); +var before_after_hook_default = { Singular, Collection }; + +// node_modules/@octokit/endpoint/dist-bundle/index.js +var VERSION3 = "0.0.0-development"; +var userAgent = `octokit-endpoint.js/${VERSION3} ${getUserAgent()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; +function lowercaseKeys(object3) { + if (!object3) { + return {}; + } + return Object.keys(object3).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object3[key]; + return newObj; + }, {}); } -// @__NO_SIDE_EFFECTS__ -function _optional3(Class22, innerType) { - return new Class22({ - type: "optional", - innerType - }); +function isPlainObject4(value) { + if (typeof value !== "object" || value === null) return false; + if (Object.prototype.toString.call(value) !== "[object Object]") return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } -// @__NO_SIDE_EFFECTS__ -function _nullable3(Class22, innerType) { - return new Class22({ - type: "nullable", - innerType +function mergeDeep(defaults3, options) { + const result = Object.assign({}, defaults3); + Object.keys(options).forEach((key) => { + if (isPlainObject4(options[key])) { + if (!(key in defaults3)) Object.assign(result, { [key]: options[key] }); + else result[key] = mergeDeep(defaults3[key], options[key]); + } else { + Object.assign(result, { [key]: options[key] }); + } }); + return result; } -// @__NO_SIDE_EFFECTS__ -function _default5(Class22, innerType, defaultValue) { - return new Class22({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : shallowClone3(defaultValue); +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; } - }); + } + return obj; } -// @__NO_SIDE_EFFECTS__ -function _nonoptional3(Class22, innerType, params) { - return new Class22({ - type: "nonoptional", - innerType, - ...normalizeParams3(params) - }); +function merge4(defaults3, route, options) { + if (typeof route === "string") { + let [method, url4] = route.split(" "); + options = Object.assign(url4 ? { method, url: url4 } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults3 || {}, options); + if (options.url === "/graphql") { + if (defaults3 && defaults3.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults3.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; } -// @__NO_SIDE_EFFECTS__ -function _success3(Class22, innerType) { - return new Class22({ - type: "success", - innerType - }); +function addQueryParameters(url4, parameters) { + const separator = /\?/.test(url4) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url4; + } + return url4 + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); } -// @__NO_SIDE_EFFECTS__ -function _catch5(Class22, innerType, catchValue) { - return new Class22({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue - }); +var urlVariableRegex = /\{[^{}}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/(?:^\W+)|(?:(? a.concat(b), []); } -// @__NO_SIDE_EFFECTS__ -function _readonly3(Class22, innerType) { - return new Class22({ - type: "readonly", - innerType - }); +function omit3(object3, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object3)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object3[key]; + } + } + return result; } -// @__NO_SIDE_EFFECTS__ -function _templateLiteral3(Class22, parts, params) { - return new Class22({ - type: "template_literal", - parts, - ...normalizeParams3(params) - }); +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); } -// @__NO_SIDE_EFFECTS__ -function _lazy3(Class22, getter) { - return new Class22({ - type: "lazy", - getter +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } -// @__NO_SIDE_EFFECTS__ -function _promise3(Class22, innerType) { - return new Class22({ - type: "promise", - innerType - }); +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } } -// @__NO_SIDE_EFFECTS__ -function _custom3(Class22, fn, _params) { - const norm = normalizeParams3(_params); - norm.abort ?? (norm.abort = true); - const schema = new Class22({ - type: "custom", - check: "custom", - fn, - ...norm - }); - return schema; +function isDefined(value) { + return value !== void 0 && value !== null; } -// @__NO_SIDE_EFFECTS__ -function _refine3(Class22, fn, _params) { - const schema = new Class22({ - type: "custom", - check: "custom", - fn, - ...normalizeParams3(_params) - }); - return schema; +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; } -// @__NO_SIDE_EFFECTS__ -function _superRefine3(fn) { - const ch = /* @__PURE__ */ _check3((payload) => { - payload.addIssue = (issue22) => { - if (typeof issue22 === "string") { - payload.issues.push(issue4(issue22, payload.value, ch._zod.def)); +function getValues(context3, operator, key, modifier) { + var value = context3[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } } else { - const _issue = issue22; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = ch); - _issue.continue ?? (_issue.continue = !ch._zod.def.abort); - payload.issues.push(issue4(_issue)); + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } } - }; - return fn(payload.value, payload); - }); - return ch; -} -// @__NO_SIDE_EFFECTS__ -function _check3(fn, params) { - const ch = new $ZodCheck3({ - check: "custom", - ...normalizeParams3(params) - }); - ch._zod.check = fn; - return ch; -} -// @__NO_SIDE_EFFECTS__ -function describe5(description) { - const ch = new $ZodCheck3({ check: "describe" }); - ch._zod.onattach = [ - (inst) => { - const existing = globalRegistry3.get(inst) ?? {}; - globalRegistry3.add(inst, { ...existing, description }); } - ]; - ch._zod.check = () => { + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) }; - return ch; } -// @__NO_SIDE_EFFECTS__ -function meta5(metadata) { - const ch = new $ZodCheck3({ check: "meta" }); - ch._zod.onattach = [ - (inst) => { - const existing = globalRegistry3.get(inst) ?? {}; - globalRegistry3.add(inst, { ...existing, ...metadata }); +function expand(template, context3) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal3) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context3, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal3); + } } - ]; - ch._zod.check = () => { - }; - return ch; + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } } -// @__NO_SIDE_EFFECTS__ -function _stringbool3(Classes, _params) { - const params = normalizeParams3(_params); - let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"]; - let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"]; - if (params.case !== "sensitive") { - truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); - falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v); +function parse5(options) { + let method = options.method.toUpperCase(); + let url4 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit3(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url4); + url4 = parseUrl(url4).expand(parameters); + if (!/^http/.test(url4)) { + url4 = options.baseUrl + url4; } - const truthySet = new Set(truthyArray); - const falsySet = new Set(falsyArray); - const _Codec = Classes.Codec ?? $ZodCodec3; - const _Boolean = Classes.Boolean ?? $ZodBoolean3; - const _String = Classes.String ?? $ZodString3; - const stringSchema = new _String({ type: "string", error: params.error }); - const booleanSchema = new _Boolean({ type: "boolean", error: params.error }); - const codec22 = new _Codec({ - type: "pipe", - in: stringSchema, - out: booleanSchema, - transform: ((input, payload) => { - let data = input; - if (params.case !== "sensitive") - data = data.toLowerCase(); - if (truthySet.has(data)) { - return true; - } else if (falsySet.has(data)) { - return false; - } else { - payload.issues.push({ - code: "invalid_value", - expected: "stringbool", - values: [...truthySet, ...falsySet], - input: payload.value, - inst: codec22, - continue: false - }); - return {}; + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit3(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format2) => format2.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url4.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/(? { + const format2 = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format2}`; + }).join(","); } - }), - reverseTransform: ((input, _payload) => { - if (input === true) { - return truthyArray[0] || "true"; - } else { - return falsyArray[0] || "false"; + } + } + if (["GET", "HEAD"].includes(method)) { + url4 = addQueryParameters(url4, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; } - }), - error: params.error + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url: url4, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); +} +function endpointWithDefaults(defaults3, route, options) { + return parse5(merge4(defaults3, route, options)); +} +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge4(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge4.bind(null, DEFAULTS2), + parse: parse5 + }); +} +var endpoint = withDefaults(null, DEFAULTS); + +// node_modules/@octokit/request/dist-bundle/index.js +var import_content_type = __toESM(require_dist(), 1); + +// node_modules/json-with-bigint/json-with-bigint.js +var intRegex = /^-?\d+$/; +var noiseValue = /^-?\d+n+$/; +var originalStringify = JSON.stringify; +var originalParse = JSON.parse; +var customFormat = /^-?\d+n$/; +var bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; +var noiseStringify = /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g; +var JSONStringify = (value, replacer, space) => { + if ("rawJSON" in JSON) { + return originalStringify( + value, + (key, value2) => { + if (typeof value2 === "bigint") return JSON.rawJSON(value2.toString()); + if (typeof replacer === "function") return replacer(key, value2); + if (Array.isArray(replacer) && replacer.includes(key)) return value2; + return value2; + }, + space + ); + } + if (!value) return originalStringify(value, replacer, space); + const convertedToCustomJSON = originalStringify( + value, + (key, value2) => { + const isNoise = typeof value2 === "string" && noiseValue.test(value2); + if (isNoise) return value2.toString() + "n"; + if (typeof value2 === "bigint") return value2.toString() + "n"; + if (typeof replacer === "function") return replacer(key, value2); + if (Array.isArray(replacer) && replacer.includes(key)) return value2; + return value2; + }, + space + ); + const processedJSON = convertedToCustomJSON.replace( + bigIntsStringify, + "$1$2$3" + ); + const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3"); + return denoisedJSON; +}; +var featureCache = /* @__PURE__ */ new Map(); +var isContextSourceSupported = () => { + const parseFingerprint = JSON.parse.toString(); + if (featureCache.has(parseFingerprint)) { + return featureCache.get(parseFingerprint); + } + try { + const result = JSON.parse( + "1", + (_, __, context3) => !!context3?.source && context3.source === "1" + ); + featureCache.set(parseFingerprint, result); + return result; + } catch { + featureCache.set(parseFingerprint, false); + return false; + } +}; +var convertMarkedBigIntsReviver = (key, value, context3, userReviver) => { + const isCustomFormatBigInt = typeof value === "string" && customFormat.test(value); + if (isCustomFormatBigInt) return BigInt(value.slice(0, -1)); + const isNoiseValue = typeof value === "string" && noiseValue.test(value); + if (isNoiseValue) return value.slice(0, -1); + if (typeof userReviver !== "function") return value; + return userReviver(key, value, context3); +}; +var JSONParseV2 = (text, reviver) => { + return JSON.parse(text, (key, value, context3) => { + const isBigNumber = typeof value === "number" && (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER); + const isInt = context3 && intRegex.test(context3.source); + const isBigInt = isBigNumber && isInt; + if (isBigInt) return BigInt(context3.source); + if (typeof reviver !== "function") return value; + return reviver(key, value, context3); }); - return codec22; +}; +var MAX_INT = Number.MAX_SAFE_INTEGER.toString(); +var MAX_DIGITS = MAX_INT.length; +var stringsOrLargeNumbers = /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g; +var noiseValueWithQuotes = /^"-?\d+n+"$/; +var JSONParse = (text, reviver) => { + if (!text) return originalParse(text, reviver); + if (isContextSourceSupported()) return JSONParseV2(text, reviver); + const serializedData = text.replace( + stringsOrLargeNumbers, + (text2, digits, fractional, exponential) => { + const isString2 = text2[0] === '"'; + const isNoise = isString2 && noiseValueWithQuotes.test(text2); + if (isNoise) return text2.substring(0, text2.length - 1) + 'n"'; + const isFractionalOrExponential = fractional || exponential; + const isLessThanMaxSafeInt = digits && (digits.length < MAX_DIGITS || digits.length === MAX_DIGITS && digits <= MAX_INT); + if (isString2 || isFractionalOrExponential || isLessThanMaxSafeInt) + return text2; + return '"' + text2 + 'n"'; + } + ); + return originalParse( + serializedData, + (key, value, context3) => convertMarkedBigIntsReviver(key, value, context3, reviver) + ); +}; + +// node_modules/@octokit/request-error/dist-src/index.js +var RequestError = class extends Error { + name; + /** + * http status code + */ + status; + /** + * Request options that lead to the error. + */ + request; + /** + * Response object if a response was received + */ + response; + constructor(message2, statusCode, options) { + super(message2, { cause: options.cause }); + this.name = "HttpError"; + this.status = Number.parseInt(statusCode); + if (Number.isNaN(this.status)) { + this.status = 0; + } + if ("response" in options) { + this.response = options.response; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + /(? ""; +async function fetchWrapper(requestOptions) { + const fetch3 = requestOptions.request?.fetch || globalThis.fetch; + if (!fetch3) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + const log = requestOptions.request?.log || console; + const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false; + const body = isPlainObject5(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body; + const requestHeaders = Object.fromEntries( + Object.entries(requestOptions.headers).map(([name, value]) => [ + name, + String(value) + ]) + ); + let fetchResponse; + try { + fetchResponse = await fetch3(requestOptions.url, { + method: requestOptions.method, + body, + redirect: requestOptions.request?.redirect, + headers: requestHeaders, + signal: requestOptions.request?.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }); + } catch (error99) { + let message2 = "Unknown Error"; + if (error99 instanceof Error) { + if (error99.name === "AbortError") { + error99.status = 500; + throw error99; + } + message2 = error99.message; + if (error99.name === "TypeError" && "cause" in error99) { + if (error99.cause instanceof Error) { + message2 = error99.cause.message; + } else if (typeof error99.cause === "string") { + message2 = error99.cause; + } + } + } + const requestError = new RequestError(message2, 500, { + request: requestOptions + }); + requestError.cause = error99; + throw requestError; + } + const status = fetchResponse.status; + const url4 = fetchResponse.url; + const responseHeaders = {}; + for (const [key, value] of fetchResponse.headers) { + responseHeaders[key] = value; + } + const octokitResponse = { + url: url4, + status, + headers: responseHeaders, + data: "" + }; + if ("deprecation" in responseHeaders) { + const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return octokitResponse; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return octokitResponse; + } + throw new RequestError(fetchResponse.statusText, status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status === 304) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError("Not modified", status, { + response: octokitResponse, + request: requestOptions + }); + } + if (status >= 400) { + octokitResponse.data = await getResponseData(fetchResponse); + throw new RequestError(toErrorMessage(octokitResponse.data), status, { + response: octokitResponse, + request: requestOptions + }); + } + octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body; + return octokitResponse; +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (!contentType) { + return response.text().catch(noop2); + } + const mimetype = (0, import_content_type.parse)(contentType); + if (isJSONResponse(mimetype)) { + let text = ""; + try { + text = await response.text(); + return JSONParse(text); + } catch (err) { + return text; + } + } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") { + return response.text().catch(noop2); + } else { + return response.arrayBuffer().catch( + /* v8 ignore next -- @preserve */ + () => new ArrayBuffer(0) + ); + } } -// @__NO_SIDE_EFFECTS__ -function _stringFormat3(Class22, format2, fnOrRegex, _params = {}) { - const params = normalizeParams3(_params); - const def = { - ...normalizeParams3(_params), - check: "string_format", - type: "string", - format: format2, - fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val), - ...params - }; - if (fnOrRegex instanceof RegExp) { - def.pattern = fnOrRegex; +function isJSONResponse(mimetype) { + return mimetype.type === "application/json" || mimetype.type === "application/scim+json"; +} +function toErrorMessage(data) { + if (typeof data === "string") { + return data; } - const inst = new Class22(def); - return inst; + if (data instanceof ArrayBuffer) { + return "Unknown error"; + } + if ("message" in data) { + const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : ""; + return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; } -function initializeContext3(params) { - let target = params?.target ?? "draft-2020-12"; - if (target === "draft-4") - target = "draft-04"; - if (target === "draft-7") - target = "draft-07"; - return { - processors: params.processors ?? {}, - metadataRegistry: params?.metadata ?? globalRegistry3, - target, - unrepresentable: params?.unrepresentable ?? "throw", - override: params?.override ?? (() => { - }), - io: params?.io ?? "output", - counter: 0, - seen: /* @__PURE__ */ new Map(), - cycles: params?.cycles ?? "ref", - reused: params?.reused ?? "inline", - external: params?.external ?? void 0 +function withDefaults2(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults2.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults2.bind(null, endpoint2) + }); } -function process22(schema, ctx, _params = { path: [], schemaPath: [] }) { - var _a22; - const def = schema._zod.def; - const seen = ctx.seen.get(schema); - if (seen) { - seen.count++; - const isCycle = _params.schemaPath.includes(schema); - if (isCycle) { - seen.cycle = _params.path; +var request = withDefaults2(endpoint, defaults_default2); + +// node_modules/@octokit/graphql/dist-bundle/index.js +var VERSION5 = "0.0.0-development"; +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } - return seen.schema; } - const result = { schema: {}, count: 1, cycle: void 0, path: _params.path }; - ctx.seen.set(schema, result); - const overrideSchema = schema._zod.toJSONSchema?.(); - if (overrideSchema) { - result.schema = overrideSchema; - } else { - const params = { - ..._params, - schemaPath: [..._params.schemaPath, schema], - path: _params.path - }; - if (schema._zod.processJSONSchema) { - schema._zod.processJSONSchema(ctx, result.schema, params); - } else { - const _json = result.schema; - const processor = ctx.processors[def.type]; - if (!processor) { - throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`); - } - processor(schema, ctx, _json, params); + name = "GraphqlResponseError"; + errors; + data; +}; +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType", + "operationName" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); } - const parent = schema._zod.parent; - if (parent) { - if (!result.ref) - result.ref = parent; - process22(parent, ctx, params); - ctx.seen.get(parent).isParent = true; + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); } } - const meta32 = ctx.metadataRegistry.get(schema); - if (meta32) - Object.assign(result.schema, meta32); - if (ctx.io === "input" && isTransforming3(schema)) { - delete result.schema.examples; - delete result.schema.default; - } - if (ctx.io === "input" && result.schema._prefault) - (_a22 = result.schema).default ?? (_a22.default = result.schema._prefault); - delete result.schema._prefault; - const _result = ctx.seen.get(schema); - return _result.schema; -} -function extractDefs3(ctx, schema) { - const root = ctx.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const idToSchema = /* @__PURE__ */ new Map(); - for (const entry of ctx.seen.entries()) { - const id = ctx.metadataRegistry.get(entry[0])?.id; - if (id) { - const existing = idToSchema.get(id); - if (existing && existing !== entry[0]) { - throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`); - } - idToSchema.set(id, entry[0]); + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl2 = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl2)) { + requestOptions.url = baseUrl2.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); } - const makeURI = (entry) => { - const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions"; - if (ctx.external) { - const externalId = ctx.external.registry.get(entry[0])?.id; - const uriGenerator = ctx.external.uri ?? ((id2) => id2); - if (externalId) { - return { ref: uriGenerator(externalId) }; + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; } - const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`; - entry[1].defId = id; - return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` }; - } - if (entry[1] === root) { - return { ref: "#" }; + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); } - const uriPrefix = `#`; - const defUriPrefix = `${uriPrefix}/${defsSegment}/`; - const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`; - return { defId, ref: defUriPrefix + defId }; + return response.data.data; + }); +} +function withDefaults3(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); }; - const extractToDef = (entry) => { - if (entry[1].schema.$ref) { - return; - } - const seen = entry[1]; - const { ref, defId } = makeURI(entry); - seen.def = { ...seen.schema }; - if (defId) - seen.defId = defId; - const schema2 = seen.schema; - for (const key in schema2) { - delete schema2[key]; - } - schema2.$ref = ref; + return Object.assign(newApi, { + defaults: withDefaults3.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} +var graphql2 = withDefaults3(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION5} ${getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults3(customRequest, { + method: "POST", + url: "/graphql" + }); +} + +// node_modules/@octokit/auth-token/dist-bundle/index.js +var b64url = "(?:[a-zA-Z0-9_-]+)"; +var sep = "\\."; +var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`); +var isJWT = jwtRE.test.bind(jwtRE); +async function auth(token) { + const isApp = isJWT(token); + const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_"); + const isUserToServer = token.startsWith("ghu_"); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType }; - if (ctx.cycles === "throw") { - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (seen.cycle) { - throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/ +} +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} +async function hook(token, request2, route, parameters) { + const endpoint2 = request2.endpoint.merge( + route, + parameters + ); + endpoint2.headers.authorization = withAuthorizationPrefix(token); + return request2(endpoint2); +} +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`); +// node_modules/@octokit/core/dist-src/version.js +var VERSION6 = "7.0.6"; + +// node_modules/@octokit/core/dist-src/index.js +var noop3 = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +function createLogger(logger = {}) { + if (typeof logger.debug !== "function") { + logger.debug = noop3; + } + if (typeof logger.info !== "function") { + logger.info = noop3; + } + if (typeof logger.warn !== "function") { + logger.warn = consoleWarn; + } + if (typeof logger.error !== "function") { + logger.error = consoleError; + } + return logger; +} +var userAgentTrail = `octokit-core.js/${VERSION6} ${getUserAgent()}`; +var Octokit = class { + static VERSION = VERSION6; + static defaults(defaults3) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults3 === "function") { + super(defaults3(options)); + return; + } + super( + Object.assign( + {}, + defaults3, + options, + options.userAgent && defaults3.userAgent ? { + userAgent: `${options.userAgent} ${defaults3.userAgent}` + } : null + ) + ); } - } + }; + return OctokitWithDefaults; } - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (schema === entry[0]) { - extractToDef(entry); - continue; - } - if (ctx.external) { - const ext = ctx.external.registry.get(entry[0])?.id; - if (schema !== entry[0] && ext) { - extractToDef(entry); - continue; + static plugins = []; + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + }; + return NewOctokit; + } + constructor(options = {}) { + const hook2 = new before_after_hook_default.Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook2.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; } - const id = ctx.metadataRegistry.get(entry[0])?.id; - if (id) { - extractToDef(entry); - continue; - } - if (seen.cycle) { - extractToDef(entry); - continue; + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; } - if (seen.count > 1) { - if (ctx.reused === "ref") { - extractToDef(entry); - continue; - } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; } - } -} -function finalize3(ctx, schema) { - const root = ctx.seen.get(schema); - if (!root) - throw new Error("Unprocessed schema. This is a bug in Zod."); - const flattenRef = (zodSchema) => { - const seen = ctx.seen.get(zodSchema); - if (seen.ref === null) - return; - const schema2 = seen.def ?? seen.schema; - const _cached = { ...schema2 }; - const ref = seen.ref; - seen.ref = null; - if (ref) { - flattenRef(ref); - const refSeen = ctx.seen.get(ref); - const refSchema = refSeen.schema; - if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) { - schema2.allOf = schema2.allOf ?? []; - schema2.allOf.push(refSchema); + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = createLogger(options.log); + this.hook = hook2; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); } else { - Object.assign(schema2, refSchema); - } - Object.assign(schema2, _cached); - const isParentRef = zodSchema._zod.parent === ref; - if (isParentRef) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (!(key in _cached)) { - delete schema2[key]; - } - } - } - if (refSchema.$ref && refSeen.def) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (key in refSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(refSeen.def[key])) { - delete schema2[key]; - } - } + const auth2 = createTokenAuth(options.auth); + hook2.wrap("request", auth2.hook); + this.auth = auth2; } + } else { + const { authStrategy, ...otherOptions } = options; + const auth2 = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook2.wrap("request", auth2.hook); + this.auth = auth2; } - const parent = zodSchema._zod.parent; - if (parent && parent !== ref) { - flattenRef(parent); - const parentSeen = ctx.seen.get(parent); - if (parentSeen?.schema.$ref) { - schema2.$ref = parentSeen.schema.$ref; - if (parentSeen.def) { - for (const key in schema2) { - if (key === "$ref" || key === "allOf") - continue; - if (key in parentSeen.def && JSON.stringify(schema2[key]) === JSON.stringify(parentSeen.def[key])) { - delete schema2[key]; - } - } - } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); + } + } + // assigned during constructor + request; + graphql; + log; + hook; + // TODO: type `octokit.auth` based on passed options.authStrategy + auth; +}; + +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +var VERSION7 = "17.0.0"; + +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +var Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + addRepoAccessToSelfHostedRunnerGroupInOrg: [ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" + ], + createEnvironmentVariable: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/variables" + ], + createHostedRunnerForOrg: ["POST /orgs/{org}/actions/hosted-runners"], + createOrUpdateEnvironmentSecret: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" + ], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token" + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token" + ], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token" + ], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" + ], + deleteCustomImageFromOrg: [ + "DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}" + ], + deleteCustomImageVersionFromOrg: [ + "DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}" + ], + deleteEnvironmentSecret: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" + ], + deleteHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + deleteRepoVariable: [ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}" + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}" + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" + ], + forceCancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" + ], + generateRunnerJitconfigForOrg: [ + "POST /orgs/{org}/actions/runners/generate-jitconfig" + ], + generateRunnerJitconfigForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository" + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions" + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getCustomImageForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}" + ], + getCustomImageVersionForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}" + ], + getCustomOidcSubClaimForRepo: [ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + getEnvironmentPublicKey: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow" + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow" + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions" + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions" + ], + getHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" + ], + getHostedRunnersGithubOwnedImagesForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/images/github-owned" + ], + getHostedRunnersLimitsForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/limits" + ], + getHostedRunnersMachineSpecsForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/machine-sizes" + ], + getHostedRunnersPartnerImagesForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/images/partner" + ], + getHostedRunnersPlatformsForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/platforms" + ], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" + ], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access" + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listCustomImageVersionsForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions" + ], + listCustomImagesForOrg: [ + "GET /orgs/{org}/actions/hosted-runners/images/custom" + ], + listEnvironmentSecrets: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/variables" + ], + listGithubHostedRunnersInGroupForOrg: [ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners" + ], + listHostedRunnersForOrg: ["GET /orgs/{org}/actions/hosted-runners"], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels" + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: [ + "GET /repos/{owner}/{repo}/actions/organization-secrets" + ], + listRepoOrganizationVariables: [ + "GET /repos/{owner}/{repo}/actions/organization-variables" + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads" + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + listSelectedReposForOrgVariable: [ + "GET /orgs/{org}/actions/variables/{name}/repositories" + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories" + ], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" + ], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgVariable: [ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + reviewCustomGatesForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions" + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels" + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + setCustomOidcSubClaimForRepo: [ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow" + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow" + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions" + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories" + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories" + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access" + ], + updateEnvironmentVariable: [ + "PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}" + ], + updateHostedRunnerForOrg: [ + "PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}" + ], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: [ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}" + ] + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription" + ], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription" + ], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}" + ], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public" + ], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications" + ], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription" + ], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] + }, + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}" + ], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens" + ], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}" + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}" + ], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories" + ], + listInstallationRequestsForAuthenticatedApp: [ + "GET /app/installation-requests" + ], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed" + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts" + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}" + ], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended" + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions" + ], + getGithubBillingPremiumRequestUsageReportOrg: [ + "GET /organizations/{org}/settings/billing/premium_request/usage" + ], + getGithubBillingPremiumRequestUsageReportUser: [ + "GET /users/{username}/settings/billing/premium_request/usage" + ], + getGithubBillingUsageReportOrg: [ + "GET /organizations/{org}/settings/billing/usage" + ], + getGithubBillingUsageReportUser: [ + "GET /users/{username}/settings/billing/usage" + ], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages" + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage" + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage" + ] + }, + campaigns: { + createCampaign: ["POST /orgs/{org}/campaigns"], + deleteCampaign: ["DELETE /orgs/{org}/campaigns/{campaign_number}"], + getCampaignSummary: ["GET /orgs/{org}/campaigns/{campaign_number}"], + listOrgCampaigns: ["GET /orgs/{org}/campaigns"], + updateCampaign: ["PATCH /orgs/{org}/campaigns/{campaign_number}"] + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences" + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] + }, + codeScanning: { + commitAutofix: [ + "POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix/commits" + ], + createAutofix: [ + "POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix" + ], + createVariantAnalysis: [ + "POST /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses" + ], + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + deleteCodeqlDatabase: [ + "DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" + ], + getAutofix: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix" + ], + getCodeqlDatabase: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + getVariantAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}" + ], + getVariantAnalysisRepoTask: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/variant-analyses/{codeql_variant_analysis_id}/repos/{repo_owner}/{repo_name}" + ], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" + ], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" + ], + updateDefaultSetup: [ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" + ], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] + }, + codeSecurity: { + attachConfiguration: [ + "POST /orgs/{org}/code-security/configurations/{configuration_id}/attach" + ], + attachEnterpriseConfiguration: [ + "POST /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach" + ], + createConfiguration: ["POST /orgs/{org}/code-security/configurations"], + createConfigurationForEnterprise: [ + "POST /enterprises/{enterprise}/code-security/configurations" + ], + deleteConfiguration: [ + "DELETE /orgs/{org}/code-security/configurations/{configuration_id}" + ], + deleteConfigurationForEnterprise: [ + "DELETE /enterprises/{enterprise}/code-security/configurations/{configuration_id}" + ], + detachConfiguration: [ + "DELETE /orgs/{org}/code-security/configurations/detach" + ], + getConfiguration: [ + "GET /orgs/{org}/code-security/configurations/{configuration_id}" + ], + getConfigurationForRepository: [ + "GET /repos/{owner}/{repo}/code-security-configuration" + ], + getConfigurationsForEnterprise: [ + "GET /enterprises/{enterprise}/code-security/configurations" + ], + getConfigurationsForOrg: ["GET /orgs/{org}/code-security/configurations"], + getDefaultConfigurations: [ + "GET /orgs/{org}/code-security/configurations/defaults" + ], + getDefaultConfigurationsForEnterprise: [ + "GET /enterprises/{enterprise}/code-security/configurations/defaults" + ], + getRepositoriesForConfiguration: [ + "GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories" + ], + getRepositoriesForEnterpriseConfiguration: [ + "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories" + ], + getSingleConfigurationForEnterprise: [ + "GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}" + ], + setConfigurationAsDefault: [ + "PUT /orgs/{org}/code-security/configurations/{configuration_id}/defaults" + ], + setConfigurationAsDefaultForEnterprise: [ + "PUT /enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults" + ], + updateConfiguration: [ + "PATCH /orgs/{org}/code-security/configurations/{configuration_id}" + ], + updateEnterpriseConfiguration: [ + "PATCH /enterprises/{enterprise}/code-security/configurations/{configuration_id}" + ] + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + checkPermissionsForDevcontainer: [ + "GET /repos/{owner}/{repo}/codespaces/permissions_check" + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines" + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}" + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces" + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}" + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports" + ], + getCodespacesForUserInOrg: [ + "GET /orgs/{org}/members/{username}/codespaces" + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}" + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key" + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}" + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers" + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces" + ], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories" + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + preFlightWithRepoForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/new" + ], + publishForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/publish" + ], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines" + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + copilot: { + addCopilotSeatsForTeams: [ + "POST /orgs/{org}/copilot/billing/selected_teams" + ], + addCopilotSeatsForUsers: [ + "POST /orgs/{org}/copilot/billing/selected_users" + ], + cancelCopilotSeatAssignmentForTeams: [ + "DELETE /orgs/{org}/copilot/billing/selected_teams" + ], + cancelCopilotSeatAssignmentForUsers: [ + "DELETE /orgs/{org}/copilot/billing/selected_users" + ], + copilotMetricsForOrganization: ["GET /orgs/{org}/copilot/metrics"], + copilotMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/metrics"], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] + }, + credentials: { revoke: ["POST /credentials/revoke"] }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/dependabot/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + repositoryAccessForOrg: [ + "GET /organizations/{org}/dependabot/repository-access" + ], + setRepositoryAccessDefaultLevel: [ + "PUT /organizations/{org}/dependabot/repository-access/default-level" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ], + updateRepositoryAccessForOrg: [ + "PATCH /organizations/{org}/dependabot/repository-access" + ] + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots" + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" + ], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, + enterpriseTeamMemberships: { + add: [ + "PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" + ], + bulkAdd: [ + "POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add" + ], + bulkRemove: [ + "POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove" + ], + get: [ + "GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" + ], + list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"], + remove: [ + "DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}" + ] + }, + enterpriseTeamOrganizations: { + add: [ + "PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" + ], + bulkAdd: [ + "POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add" + ], + bulkRemove: [ + "POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove" + ], + delete: [ + "DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" + ], + getAssignment: [ + "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}" + ], + getAssignments: [ + "GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations" + ] + }, + enterpriseTeams: { + create: ["POST /enterprises/{enterprise}/teams"], + delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"], + get: ["GET /enterprises/{enterprise}/teams/{team_slug}"], + list: ["GET /enterprises/{enterprise}/teams"], + update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"] + }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"] + }, + hostedCompute: { + createNetworkConfigurationForOrg: [ + "POST /orgs/{org}/settings/network-configurations" + ], + deleteNetworkConfigurationFromOrg: [ + "DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}" + ], + getNetworkConfigurationForOrg: [ + "GET /orgs/{org}/settings/network-configurations/{network_configuration_id}" + ], + getNetworkSettingsForOrg: [ + "GET /orgs/{org}/settings/network-settings/{network_settings_id}" + ], + listNetworkConfigurationsForOrg: [ + "GET /orgs/{org}/settings/network-configurations" + ], + updateNetworkConfigurationForOrg: [ + "PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}" + ] + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits" + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] + }, + issues: { + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + addBlockedByDependency: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by" + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + addSubIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues" + ], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" + ], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" + ], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" + ], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" + ], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + getParent: ["GET /repos/{owner}/{repo}/issues/{issue_number}/parent"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listDependenciesBlockedBy: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by" + ], + listDependenciesBlocking: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking" + ], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" + ], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" + ], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + listSubIssues: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues" + ], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + removeDependencyBlockedBy: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], + removeSubIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue" + ], + reprioritizeSubIssue: [ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority" + ], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" + ] + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"] + }, + markdown: { + render: ["POST /markdown"], + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } } + ] + }, + meta: { + get: ["GET /meta"], + getAllVersions: ["GET /versions"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] + }, + migrations: { + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive" + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive" + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive" + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive" + ], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories" + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ] + }, + oidc: { + getOidcCustomSubTemplateForOrg: [ + "GET /orgs/{org}/actions/oidc/customization/sub" + ], + updateOidcCustomSubTemplateForOrg: [ + "PUT /orgs/{org}/actions/oidc/customization/sub" + ] + }, + orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}", + {}, + { + deprecated: "octokit.rest.orgs.addSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#add-a-security-manager-team" } - } - ctx.override({ - zodSchema, - jsonSchema: schema2, - path: seen.path ?? [] - }); - }; - for (const entry of [...ctx.seen.entries()].reverse()) { - flattenRef(entry[0]); - } - const result = {}; - if (ctx.target === "draft-2020-12") { - result.$schema = "https://json-schema.org/draft/2020-12/schema"; - } else if (ctx.target === "draft-07") { - result.$schema = "http://json-schema.org/draft-07/schema#"; - } else if (ctx.target === "draft-04") { - result.$schema = "http://json-schema.org/draft-04/schema#"; - } else if (ctx.target === "openapi-3.0") { - } else { - } - if (ctx.external?.uri) { - const id = ctx.external.registry.get(schema)?.id; - if (!id) - throw new Error("Schema is missing an `id` property"); - result.$id = ctx.external.uri(id); - } - Object.assign(result, root.def ?? root.schema); - const defs = ctx.external?.defs ?? {}; - for (const entry of ctx.seen.entries()) { - const seen = entry[1]; - if (seen.def && seen.defId) { - defs[seen.defId] = seen.def; - } - } - if (ctx.external) { - } else { - if (Object.keys(defs).length > 0) { - if (ctx.target === "draft-2020-12") { - result.$defs = defs; - } else { - result.definitions = defs; + ], + assignTeamToOrgRole: [ + "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + assignUserToOrgRole: [ + "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}" + ], + createArtifactStorageRecord: [ + "POST /orgs/{org}/artifacts/metadata/storage-record" + ], + createInvitation: ["POST /orgs/{org}/invitations"], + createIssueType: ["POST /orgs/{org}/issue-types"], + createWebhook: ["POST /orgs/{org}/hooks"], + customPropertiesForOrgsCreateOrUpdateOrganizationValues: [ + "PATCH /organizations/{org}/org-properties/values" + ], + customPropertiesForOrgsGetOrganizationValues: [ + "GET /organizations/{org}/org-properties/values" + ], + customPropertiesForReposCreateOrUpdateOrganizationDefinition: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], + customPropertiesForReposCreateOrUpdateOrganizationDefinitions: [ + "PATCH /orgs/{org}/properties/schema" + ], + customPropertiesForReposCreateOrUpdateOrganizationValues: [ + "PATCH /orgs/{org}/properties/values" + ], + customPropertiesForReposDeleteOrganizationDefinition: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], + customPropertiesForReposGetOrganizationDefinition: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], + customPropertiesForReposGetOrganizationDefinitions: [ + "GET /orgs/{org}/properties/schema" + ], + customPropertiesForReposGetOrganizationValues: [ + "GET /orgs/{org}/properties/values" + ], + delete: ["DELETE /orgs/{org}"], + deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"], + deleteAttestationsById: [ + "DELETE /orgs/{org}/attestations/{attestation_id}" + ], + deleteAttestationsBySubjectDigest: [ + "DELETE /orgs/{org}/attestations/digest/{subject_digest}" + ], + deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + disableSelectedRepositoryImmutableReleasesOrganization: [ + "DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}" + ], + enableSelectedRepositoryImmutableReleasesOrganization: [ + "PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}" + ], + get: ["GET /orgs/{org}"], + getImmutableReleasesSettings: [ + "GET /orgs/{org}/settings/immutable-releases" + ], + getImmutableReleasesSettingsRepositories: [ + "GET /orgs/{org}/settings/immutable-releases/repositories" + ], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], + getOrgRulesetHistory: ["GET /orgs/{org}/rulesets/{ruleset_id}/history"], + getOrgRulesetVersion: [ + "GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}" + ], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listArtifactStorageRecords: [ + "GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records" + ], + listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"], + listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"], + listAttestationsBulk: [ + "POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}" + ], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listIssueTypes: ["GET /orgs/{org}/issue-types"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], + listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], + listOrgRoles: ["GET /orgs/{org}/organization-roles"], + listOrganizationFineGrainedPermissions: [ + "GET /orgs/{org}/organization-fine-grained-permissions" + ], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listSecurityManagerTeams: [ + "GET /orgs/{org}/security-managers", + {}, + { + deprecated: "octokit.rest.orgs.listSecurityManagerTeams() is deprecated, see https://docs.github.com/rest/orgs/security-managers#list-security-manager-teams" } - } - } - try { - const finalized = JSON.parse(JSON.stringify(result)); - Object.defineProperty(finalized, "~standard", { - value: { - ...schema["~standard"], - jsonSchema: { - input: createStandardJSONSchemaMethod3(schema, "input", ctx.processors), - output: createStandardJSONSchemaMethod3(schema, "output", ctx.processors) - } - }, - enumerable: false, - writable: false - }); - return finalized; - } catch (_err) { - throw new Error("Error converting schema to JSON."); - } -} -function isTransforming3(_schema, _ctx) { - const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() }; - if (ctx.seen.has(_schema)) - return false; - ctx.seen.add(_schema); - const def = _schema._zod.def; - if (def.type === "transform") - return true; - if (def.type === "array") - return isTransforming3(def.element, ctx); - if (def.type === "set") - return isTransforming3(def.valueType, ctx); - if (def.type === "lazy") - return isTransforming3(def.getter(), ctx); - if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") { - return isTransforming3(def.innerType, ctx); - } - if (def.type === "intersection") { - return isTransforming3(def.left, ctx) || isTransforming3(def.right, ctx); - } - if (def.type === "record" || def.type === "map") { - return isTransforming3(def.keyType, ctx) || isTransforming3(def.valueType, ctx); - } - if (def.type === "pipe") { - return isTransforming3(def.in, ctx) || isTransforming3(def.out, ctx); - } - if (def.type === "object") { - for (const key in def.shape) { - if (isTransforming3(def.shape[key], ctx)) - return true; - } - return false; - } - if (def.type === "union") { - for (const option of def.options) { - if (isTransforming3(option, ctx)) - return true; - } - return false; - } - if (def.type === "tuple") { - for (const item of def.items) { - if (isTransforming3(item, ctx)) - return true; - } - if (def.rest && isTransforming3(def.rest, ctx)) - return true; - return false; - } - return false; -} -var createToJSONSchemaMethod3 = (schema, processors = {}) => (params) => { - const ctx = initializeContext3({ ...params, processors }); - process22(schema, ctx); - extractDefs3(ctx, schema); - return finalize3(ctx, schema); -}; -var createStandardJSONSchemaMethod3 = (schema, io, processors = {}) => (params) => { - const { libraryOptions, target } = params ?? {}; - const ctx = initializeContext3({ ...libraryOptions ?? {}, target, io, processors }); - process22(schema, ctx); - extractDefs3(ctx, schema); - return finalize3(ctx, schema); -}; -var formatMap3 = { - guid: "uuid", - url: "uri", - datetime: "date-time", - json_string: "json-string", - regex: "" - // do not set -}; -var stringProcessor3 = (schema, ctx, _json, _params) => { - const json22 = _json; - json22.type = "string"; - const { minimum, maximum, format: format2, patterns, contentEncoding } = schema._zod.bag; - if (typeof minimum === "number") - json22.minLength = minimum; - if (typeof maximum === "number") - json22.maxLength = maximum; - if (format2) { - json22.format = formatMap3[format2] ?? format2; - if (json22.format === "") - delete json22.format; - if (format2 === "time") { - delete json22.format; - } - } - if (contentEncoding) - json22.contentEncoding = contentEncoding; - if (patterns && patterns.size > 0) { - const regexes = [...patterns]; - if (regexes.length === 1) - json22.pattern = regexes[0].source; - else if (regexes.length > 1) { - json22.allOf = [ - ...regexes.map((regex2) => ({ - ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {}, - pattern: regex2.source - })) - ]; - } - } -}; -var numberProcessor3 = (schema, ctx, _json, _params) => { - const json22 = _json; - const { minimum, maximum, format: format2, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag; - if (typeof format2 === "string" && format2.includes("int")) - json22.type = "integer"; - else - json22.type = "number"; - if (typeof exclusiveMinimum === "number") { - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json22.minimum = exclusiveMinimum; - json22.exclusiveMinimum = true; - } else { - json22.exclusiveMinimum = exclusiveMinimum; - } - } - if (typeof minimum === "number") { - json22.minimum = minimum; - if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") { - if (exclusiveMinimum >= minimum) - delete json22.minimum; - else - delete json22.exclusiveMinimum; - } - } - if (typeof exclusiveMaximum === "number") { - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json22.maximum = exclusiveMaximum; - json22.exclusiveMaximum = true; - } else { - json22.exclusiveMaximum = exclusiveMaximum; - } - } - if (typeof maximum === "number") { - json22.maximum = maximum; - if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") { - if (exclusiveMaximum <= maximum) - delete json22.maximum; - else - delete json22.exclusiveMaximum; - } - } - if (typeof multipleOf === "number") - json22.multipleOf = multipleOf; -}; -var booleanProcessor3 = (_schema, _ctx, json22, _params) => { - json22.type = "boolean"; -}; -var bigintProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("BigInt cannot be represented in JSON Schema"); - } -}; -var symbolProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Symbols cannot be represented in JSON Schema"); - } -}; -var nullProcessor3 = (_schema, ctx, json22, _params) => { - if (ctx.target === "openapi-3.0") { - json22.type = "string"; - json22.nullable = true; - json22.enum = [null]; - } else { - json22.type = "null"; - } -}; -var undefinedProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Undefined cannot be represented in JSON Schema"); - } -}; -var voidProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Void cannot be represented in JSON Schema"); - } -}; -var neverProcessor3 = (_schema, _ctx, json22, _params) => { - json22.not = {}; -}; -var anyProcessor3 = (_schema, _ctx, _json, _params) => { -}; -var unknownProcessor3 = (_schema, _ctx, _json, _params) => { -}; -var dateProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Date cannot be represented in JSON Schema"); - } -}; -var enumProcessor3 = (schema, _ctx, json22, _params) => { - const def = schema._zod.def; - const values = getEnumValues3(def.entries); - if (values.every((v) => typeof v === "number")) - json22.type = "number"; - if (values.every((v) => typeof v === "string")) - json22.type = "string"; - json22.enum = values; -}; -var literalProcessor3 = (schema, ctx, json22, _params) => { - const def = schema._zod.def; - const vals = []; - for (const val of def.values) { - if (val === void 0) { - if (ctx.unrepresentable === "throw") { - throw new Error("Literal `undefined` cannot be represented in JSON Schema"); - } else { + ], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}" + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}" + ], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}", + {}, + { + deprecated: "octokit.rest.orgs.removeSecurityManagerTeam() is deprecated, see https://docs.github.com/rest/orgs/security-managers#remove-a-security-manager-team" } - } else if (typeof val === "bigint") { - if (ctx.unrepresentable === "throw") { - throw new Error("BigInt literals cannot be represented in JSON Schema"); - } else { - vals.push(Number(val)); + ], + reviewPatGrantRequest: [ + "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /orgs/{org}/personal-access-token-requests" + ], + revokeAllOrgRolesTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" + ], + revokeAllOrgRolesUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}" + ], + revokeOrgRoleTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + revokeOrgRoleUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + setImmutableReleasesSettings: [ + "PUT /orgs/{org}/settings/immutable-releases" + ], + setImmutableReleasesSettingsRepositories: [ + "PUT /orgs/{org}/settings/immutable-releases/repositories" + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateIssueType: ["PUT /orgs/{org}/issue-types/{issue_type_id}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}" + ], + updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}" + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}" + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}" + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] } - } else { - vals.push(val); - } - } - if (vals.length === 0) { - } else if (vals.length === 1) { - const val = vals[0]; - json22.type = val === null ? "null" : typeof val; - if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") { - json22.enum = [val]; - } else { - json22.const = val; - } - } else { - if (vals.every((v) => typeof v === "number")) - json22.type = "number"; - if (vals.every((v) => typeof v === "string")) - json22.type = "string"; - if (vals.every((v) => typeof v === "boolean")) - json22.type = "boolean"; - if (vals.every((v) => v === null)) - json22.type = "null"; - json22.enum = vals; - } -}; -var nanProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("NaN cannot be represented in JSON Schema"); - } -}; -var templateLiteralProcessor3 = (schema, _ctx, json22, _params) => { - const _json = json22; - const pattern = schema._zod.pattern; - if (!pattern) - throw new Error("Pattern not found in template literal"); - _json.type = "string"; - _json.pattern = pattern.source; -}; -var fileProcessor3 = (schema, _ctx, json22, _params) => { - const _json = json22; - const file22 = { - type: "string", - format: "binary", - contentEncoding: "binary" - }; - const { minimum, maximum, mime } = schema._zod.bag; - if (minimum !== void 0) - file22.minLength = minimum; - if (maximum !== void 0) - file22.maxLength = maximum; - if (mime) { - if (mime.length === 1) { - file22.contentMediaType = mime[0]; - Object.assign(_json, file22); - } else { - Object.assign(_json, file22); - _json.anyOf = mime.map((m) => ({ contentMediaType: m })); - } - } else { - Object.assign(_json, file22); - } -}; -var successProcessor3 = (_schema, _ctx, json22, _params) => { - json22.type = "boolean"; -}; -var customProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Custom types cannot be represented in JSON Schema"); - } -}; -var functionProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Function types cannot be represented in JSON Schema"); - } -}; -var transformProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Transforms cannot be represented in JSON Schema"); - } -}; -var mapProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Map cannot be represented in JSON Schema"); - } -}; -var setProcessor3 = (_schema, ctx, _json, _params) => { - if (ctx.unrepresentable === "throw") { - throw new Error("Set cannot be represented in JSON Schema"); - } -}; -var arrayProcessor3 = (schema, ctx, _json, params) => { - const json22 = _json; - const def = schema._zod.def; - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json22.minItems = minimum; - if (typeof maximum === "number") - json22.maxItems = maximum; - json22.type = "array"; - json22.items = process22(def.element, ctx, { ...params, path: [...params.path, "items"] }); -}; -var objectProcessor3 = (schema, ctx, _json, params) => { - const json22 = _json; - const def = schema._zod.def; - json22.type = "object"; - json22.properties = {}; - const shape = def.shape; - for (const key in shape) { - json22.properties[key] = process22(shape[key], ctx, { - ...params, - path: [...params.path, "properties", key] - }); - } - const allKeys = new Set(Object.keys(shape)); - const requiredKeys = new Set([...allKeys].filter((key) => { - const v = def.shape[key]._zod; - if (ctx.io === "input") { - return v.optin === void 0; - } else { - return v.optout === void 0; - } - })); - if (requiredKeys.size > 0) { - json22.required = Array.from(requiredKeys); - } - if (def.catchall?._zod.def.type === "never") { - json22.additionalProperties = false; - } else if (!def.catchall) { - if (ctx.io === "output") - json22.additionalProperties = false; - } else if (def.catchall) { - json22.additionalProperties = process22(def.catchall, ctx, { - ...params, - path: [...params.path, "additionalProperties"] - }); - } -}; -var unionProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - const isExclusive = def.inclusive === false; - const options = def.options.map((x, i) => process22(x, ctx, { - ...params, - path: [...params.path, isExclusive ? "oneOf" : "anyOf", i] - })); - if (isExclusive) { - json22.oneOf = options; - } else { - json22.anyOf = options; - } -}; -var intersectionProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - const a = process22(def.left, ctx, { - ...params, - path: [...params.path, "allOf", 0] - }); - const b = process22(def.right, ctx, { - ...params, - path: [...params.path, "allOf", 1] - }); - const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1; - const allOf = [ - ...isSimpleIntersection(a) ? a.allOf : [a], - ...isSimpleIntersection(b) ? b.allOf : [b] - ]; - json22.allOf = allOf; -}; -var tupleProcessor3 = (schema, ctx, _json, params) => { - const json22 = _json; - const def = schema._zod.def; - json22.type = "array"; - const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items"; - const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems"; - const prefixItems = def.items.map((x, i) => process22(x, ctx, { - ...params, - path: [...params.path, prefixPath, i] - })); - const rest = def.rest ? process22(def.rest, ctx, { - ...params, - path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []] - }) : null; - if (ctx.target === "draft-2020-12") { - json22.prefixItems = prefixItems; - if (rest) { - json22.items = rest; - } - } else if (ctx.target === "openapi-3.0") { - json22.items = { - anyOf: prefixItems - }; - if (rest) { - json22.items.anyOf.push(rest); - } - json22.minItems = prefixItems.length; - if (!rest) { - json22.maxItems = prefixItems.length; - } - } else { - json22.items = prefixItems; - if (rest) { - json22.additionalItems = rest; - } - } - const { minimum, maximum } = schema._zod.bag; - if (typeof minimum === "number") - json22.minItems = minimum; - if (typeof maximum === "number") - json22.maxItems = maximum; -}; -var recordProcessor3 = (schema, ctx, _json, params) => { - const json22 = _json; - const def = schema._zod.def; - json22.type = "object"; - const keyType = def.keyType; - const keyBag = keyType._zod.bag; - const patterns = keyBag?.patterns; - if (def.mode === "loose" && patterns && patterns.size > 0) { - const valueSchema = process22(def.valueType, ctx, { - ...params, - path: [...params.path, "patternProperties", "*"] - }); - json22.patternProperties = {}; - for (const pattern of patterns) { - json22.patternProperties[pattern.source] = valueSchema; - } - } else { - if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") { - json22.propertyNames = process22(def.keyType, ctx, { - ...params, - path: [...params.path, "propertyNames"] - }); - } - json22.additionalProperties = process22(def.valueType, ctx, { - ...params, - path: [...params.path, "additionalProperties"] - }); - } - const keyValues = keyType._zod.values; - if (keyValues) { - const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number"); - if (validKeyValues.length > 0) { - json22.required = validKeyValues; - } - } -}; -var nullableProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - const inner = process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - if (ctx.target === "openapi-3.0") { - seen.ref = def.innerType; - json22.nullable = true; - } else { - json22.anyOf = [inner, { type: "null" }]; - } -}; -var nonoptionalProcessor3 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var defaultProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - json22.default = JSON.parse(JSON.stringify(def.defaultValue)); -}; -var prefaultProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - if (ctx.io === "input") - json22._prefault = JSON.parse(JSON.stringify(def.defaultValue)); -}; -var catchProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - let catchValue; - try { - catchValue = def.catchValue(void 0); - } catch { - throw new Error("Dynamic catch values are not supported in JSON Schema"); + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions" + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}" + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}" + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}" + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + listDockerMigrationConflictingPackagesForAuthenticatedUser: [ + "GET /user/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForOrganization: [ + "GET /orgs/{org}/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForUser: [ + "GET /users/{username}/docker/conflicts" + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ] + }, + privateRegistries: { + createOrgPrivateRegistry: ["POST /orgs/{org}/private-registries"], + deleteOrgPrivateRegistry: [ + "DELETE /orgs/{org}/private-registries/{secret_name}" + ], + getOrgPrivateRegistry: ["GET /orgs/{org}/private-registries/{secret_name}"], + getOrgPublicKey: ["GET /orgs/{org}/private-registries/public-key"], + listOrgPrivateRegistries: ["GET /orgs/{org}/private-registries"], + updateOrgPrivateRegistry: [ + "PATCH /orgs/{org}/private-registries/{secret_name}" + ] + }, + projects: { + addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"], + addItemForUser: [ + "POST /users/{username}/projectsV2/{project_number}/items" + ], + deleteItemForOrg: [ + "DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}" + ], + deleteItemForUser: [ + "DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}" + ], + getFieldForOrg: [ + "GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}" + ], + getFieldForUser: [ + "GET /users/{username}/projectsV2/{project_number}/fields/{field_id}" + ], + getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"], + getForUser: ["GET /users/{username}/projectsV2/{project_number}"], + getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"], + getUserItem: [ + "GET /users/{username}/projectsV2/{project_number}/items/{item_id}" + ], + listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"], + listFieldsForUser: [ + "GET /users/{username}/projectsV2/{project_number}/fields" + ], + listForOrg: ["GET /orgs/{org}/projectsV2"], + listForUser: ["GET /users/{username}/projectsV2"], + listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"], + listItemsForUser: [ + "GET /users/{username}/projectsV2/{project_number}/items" + ], + updateItemForOrg: [ + "PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}" + ], + updateItemForUser: [ + "PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}" + ] + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" + ], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" + ], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" + ], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" + ], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ] + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ] + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}" + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + cancelPagesDeployment: [ + "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" + ], + checkAutomatedSecurityFixes: [ + "GET /repos/{owner}/{repo}/automated-security-fixes" + ], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"], + checkPrivateVulnerabilityReporting: [ + "GET /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts" + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}" + ], + createAttestation: ["POST /repos/{owner}/{repo}/attestations"], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentBranchPolicy: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + createDeploymentProtectionRule: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}" + ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + customPropertiesForReposCreateOrUpdateRepositoryValues: [ + "PATCH /repos/{owner}/{repo}/properties/values" + ], + customPropertiesForReposGetRepositoryValues: [ + "GET /repos/{owner}/{repo}/properties/values" + ], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}" + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}" + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" + ], + deleteDeploymentBranchPolicy: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes" + ], + disableDeploymentProtectionRule: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + disableImmutableReleases: [ + "DELETE /repos/{owner}/{repo}/immutable-releases" + ], + disablePrivateVulnerabilityReporting: [ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts" + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes" + ], + enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"], + enablePrivateVulnerabilityReporting: [ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts" + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes" + ], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + getAllDeploymentProtectionRules: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection" + ], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission" + ], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentBranchPolicy: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}" + ], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesDeployment: [ + "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" + ], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getRepoRuleSuite: [ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + ], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesetHistory: [ + "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history" + ], + getRepoRulesetVersion: [ + "GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}" + ], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" + ], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" + ], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + listAttestations: [ + "GET /repos/{owner}/{repo}/attestations/{subject_digest}" + ], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" + ], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses" + ], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" + ], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentBranchPolicies: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets" + ], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" + ], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}" + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection" + ], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" } + ] + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"] + }, + secretScanning: { + createPushProtectionBypass: [ + "POST /repos/{owner}/{repo}/secret-scanning/push-protection-bypasses" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" + ], + listOrgPatternConfigs: [ + "GET /orgs/{org}/secret-scanning/pattern-configurations" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + updateOrgPatternConfigs: [ + "PATCH /orgs/{org}/secret-scanning/pattern-configurations" + ] + }, + securityAdvisories: { + createFork: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" + ], + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + createRepositoryAdvisoryCveRequest: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" + ], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: [ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ] + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations" + ], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteAttestationsBulk: [ + "POST /users/{username}/attestations/delete-request" + ], + deleteAttestationsById: [ + "DELETE /users/{username}/attestations/{attestation_id}" + ], + deleteAttestationsBySubjectDigest: [ + "DELETE /users/{username}/attestations/digest/{subject_digest}" + ], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: [ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getById: ["GET /user/{account_id}"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: [ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + list: ["GET /users"], + listAttestations: ["GET /users/{username}/attestations/{subject_digest}"], + listAttestationsBulk: [ + "POST /users/{username}/attestations/bulk-list{?per_page,before,after}" + ], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility" + ], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"] } - json22.default = catchValue; -}; -var pipeProcessor3 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out; - process22(innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = innerType; -}; -var readonlyProcessor3 = (schema, ctx, json22, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; - json22.readOnly = true; -}; -var promiseProcessor3 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var optionalProcessor3 = (schema, ctx, _json, params) => { - const def = schema._zod.def; - process22(def.innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = def.innerType; -}; -var lazyProcessor3 = (schema, ctx, _json, params) => { - const innerType = schema._zod.innerType; - process22(innerType, ctx, params); - const seen = ctx.seen.get(schema); - seen.ref = innerType; -}; -var allProcessors3 = { - string: stringProcessor3, - number: numberProcessor3, - boolean: booleanProcessor3, - bigint: bigintProcessor3, - symbol: symbolProcessor3, - null: nullProcessor3, - undefined: undefinedProcessor3, - void: voidProcessor3, - never: neverProcessor3, - any: anyProcessor3, - unknown: unknownProcessor3, - date: dateProcessor3, - enum: enumProcessor3, - literal: literalProcessor3, - nan: nanProcessor3, - template_literal: templateLiteralProcessor3, - file: fileProcessor3, - success: successProcessor3, - custom: customProcessor3, - function: functionProcessor3, - transform: transformProcessor3, - map: mapProcessor3, - set: setProcessor3, - array: arrayProcessor3, - object: objectProcessor3, - union: unionProcessor3, - intersection: intersectionProcessor3, - tuple: tupleProcessor3, - record: recordProcessor3, - nullable: nullableProcessor3, - nonoptional: nonoptionalProcessor3, - default: defaultProcessor3, - prefault: prefaultProcessor3, - catch: catchProcessor3, - pipe: pipeProcessor3, - readonly: readonlyProcessor3, - promise: promiseProcessor3, - optional: optionalProcessor3, - lazy: lazyProcessor3 }; -function toJSONSchema3(input, params) { - if ("_idmap" in input) { - const registry22 = input; - const ctx2 = initializeContext3({ ...params, processors: allProcessors3 }); - const defs = {}; - for (const entry of registry22._idmap.entries()) { - const [_, schema] = entry; - process22(schema, ctx2); - } - const schemas = {}; - const external = { - registry: registry22, - uri: params?.uri, - defs - }; - ctx2.external = external; - for (const entry of registry22._idmap.entries()) { - const [key, schema] = entry; - extractDefs3(ctx2, schema); - schemas[key] = finalize3(ctx2, schema); - } - if (Object.keys(defs).length > 0) { - const defsSegment = ctx2.target === "draft-2020-12" ? "$defs" : "definitions"; - schemas.__shared = { - [defsSegment]: defs - }; +var endpoints_default = Endpoints; + +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint2] of Object.entries(endpoints)) { + const [route, defaults3, decorations] = endpoint2; + const [method, url4] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url: url4 + }, + defaults3 + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); } - return { schemas }; - } - const ctx = initializeContext3({ ...params, processors: allProcessors3 }); - process22(input, ctx); - extractDefs3(ctx, input); - return finalize3(ctx, input); -} -var JSONSchemaGenerator3 = class { - /** @deprecated Access via ctx instead */ - get metadataRegistry() { - return this.ctx.metadataRegistry; - } - /** @deprecated Access via ctx instead */ - get target() { - return this.ctx.target; - } - /** @deprecated Access via ctx instead */ - get unrepresentable() { - return this.ctx.unrepresentable; - } - /** @deprecated Access via ctx instead */ - get override() { - return this.ctx.override; - } - /** @deprecated Access via ctx instead */ - get io() { - return this.ctx.io; - } - /** @deprecated Access via ctx instead */ - get counter() { - return this.ctx.counter; - } - set counter(value) { - this.ctx.counter = value; - } - /** @deprecated Access via ctx instead */ - get seen() { - return this.ctx.seen; - } - constructor(params) { - let normalizedTarget = params?.target ?? "draft-2020-12"; - if (normalizedTarget === "draft-4") - normalizedTarget = "draft-04"; - if (normalizedTarget === "draft-7") - normalizedTarget = "draft-07"; - this.ctx = initializeContext3({ - processors: allProcessors3, - target: normalizedTarget, - ...params?.metadata && { metadata: params.metadata }, - ...params?.unrepresentable && { unrepresentable: params.unrepresentable }, - ...params?.override && { override: params.override }, - ...params?.io && { io: params.io } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations }); } - /** - * Process a schema to prepare it for JSON Schema generation. - * This must be called before emit(). - */ - process(schema, _params = { path: [], schemaPath: [] }) { - return process22(schema, this.ctx, _params); - } - /** - * Emit the final JSON Schema after processing. - * Must call process() first. - */ - emit(schema, _params) { - if (_params) { - if (_params.cycles) - this.ctx.cycles = _params.cycles; - if (_params.reused) - this.ctx.reused = _params.reused; - if (_params.external) - this.ctx.external = _params.external; - } - extractDefs3(this.ctx, schema); - const result = finalize3(this.ctx, schema); - const { "~standard": _, ...plainResult } = result; - return plainResult; - } -}; -var json_schema_exports3 = {}; -var schemas_exports22 = {}; -__export2(schemas_exports22, { - ZodAny: () => ZodAny3, - ZodArray: () => ZodArray3, - ZodBase64: () => ZodBase643, - ZodBase64URL: () => ZodBase64URL3, - ZodBigInt: () => ZodBigInt3, - ZodBigIntFormat: () => ZodBigIntFormat3, - ZodBoolean: () => ZodBoolean3, - ZodCIDRv4: () => ZodCIDRv43, - ZodCIDRv6: () => ZodCIDRv63, - ZodCUID: () => ZodCUID4, - ZodCUID2: () => ZodCUID23, - ZodCatch: () => ZodCatch3, - ZodCodec: () => ZodCodec3, - ZodCustom: () => ZodCustom3, - ZodCustomStringFormat: () => ZodCustomStringFormat3, - ZodDate: () => ZodDate3, - ZodDefault: () => ZodDefault3, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion3, - ZodE164: () => ZodE1643, - ZodEmail: () => ZodEmail3, - ZodEmoji: () => ZodEmoji3, - ZodEnum: () => ZodEnum3, - ZodExactOptional: () => ZodExactOptional3, - ZodFile: () => ZodFile3, - ZodFunction: () => ZodFunction3, - ZodGUID: () => ZodGUID3, - ZodIPv4: () => ZodIPv43, - ZodIPv6: () => ZodIPv63, - ZodIntersection: () => ZodIntersection3, - ZodJWT: () => ZodJWT3, - ZodKSUID: () => ZodKSUID3, - ZodLazy: () => ZodLazy3, - ZodLiteral: () => ZodLiteral3, - ZodMAC: () => ZodMAC3, - ZodMap: () => ZodMap3, - ZodNaN: () => ZodNaN3, - ZodNanoID: () => ZodNanoID3, - ZodNever: () => ZodNever3, - ZodNonOptional: () => ZodNonOptional3, - ZodNull: () => ZodNull3, - ZodNullable: () => ZodNullable3, - ZodNumber: () => ZodNumber3, - ZodNumberFormat: () => ZodNumberFormat3, - ZodObject: () => ZodObject3, - ZodOptional: () => ZodOptional3, - ZodPipe: () => ZodPipe3, - ZodPrefault: () => ZodPrefault3, - ZodPromise: () => ZodPromise3, - ZodReadonly: () => ZodReadonly3, - ZodRecord: () => ZodRecord3, - ZodSet: () => ZodSet3, - ZodString: () => ZodString3, - ZodStringFormat: () => ZodStringFormat3, - ZodSuccess: () => ZodSuccess3, - ZodSymbol: () => ZodSymbol3, - ZodTemplateLiteral: () => ZodTemplateLiteral3, - ZodTransform: () => ZodTransform3, - ZodTuple: () => ZodTuple3, - ZodType: () => ZodType3, - ZodULID: () => ZodULID3, - ZodURL: () => ZodURL3, - ZodUUID: () => ZodUUID3, - ZodUndefined: () => ZodUndefined3, - ZodUnion: () => ZodUnion3, - ZodUnknown: () => ZodUnknown3, - ZodVoid: () => ZodVoid3, - ZodXID: () => ZodXID3, - ZodXor: () => ZodXor3, - _ZodString: () => _ZodString3, - _default: () => _default22, - _function: () => _function3, - any: () => any3, - array: () => array3, - base64: () => base6422, - base64url: () => base64url22, - bigint: () => bigint22, - boolean: () => boolean22, - catch: () => _catch22, - check: () => check3, - cidrv4: () => cidrv422, - cidrv6: () => cidrv622, - codec: () => codec3, - cuid: () => cuid32, - cuid2: () => cuid222, - custom: () => custom3, - date: () => date32, - describe: () => describe22, - discriminatedUnion: () => discriminatedUnion3, - e164: () => e16422, - email: () => email22, - emoji: () => emoji22, - enum: () => _enum22, - exactOptional: () => exactOptional3, - file: () => file3, - float32: () => float323, - float64: () => float643, - function: () => _function3, - guid: () => guid22, - hash: () => hash3, - hex: () => hex22, - hostname: () => hostname22, - httpUrl: () => httpUrl3, - instanceof: () => _instanceof3, - int: () => int3, - int32: () => int323, - int64: () => int643, - intersection: () => intersection3, - ipv4: () => ipv422, - ipv6: () => ipv622, - json: () => json3, - jwt: () => jwt3, - keyof: () => keyof3, - ksuid: () => ksuid22, - lazy: () => lazy3, - literal: () => literal3, - looseObject: () => looseObject3, - looseRecord: () => looseRecord3, - mac: () => mac22, - map: () => map3, - meta: () => meta22, - nan: () => nan3, - nanoid: () => nanoid22, - nativeEnum: () => nativeEnum3, - never: () => never3, - nonoptional: () => nonoptional3, - null: () => _null32, - nullable: () => nullable3, - nullish: () => nullish22, - number: () => number22, - object: () => object3, - optional: () => optional3, - partialRecord: () => partialRecord3, - pipe: () => pipe3, - prefault: () => prefault3, - preprocess: () => preprocess3, - promise: () => promise3, - readonly: () => readonly3, - record: () => record3, - refine: () => refine3, - set: () => set3, - strictObject: () => strictObject3, - string: () => string22, - stringFormat: () => stringFormat3, - stringbool: () => stringbool3, - success: () => success3, - superRefine: () => superRefine3, - symbol: () => symbol3, - templateLiteral: () => templateLiteral3, - transform: () => transform3, - tuple: () => tuple3, - uint32: () => uint323, - uint64: () => uint643, - ulid: () => ulid22, - undefined: () => _undefined32, - union: () => union3, - unknown: () => unknown3, - url: () => url4, - uuid: () => uuid22, - uuidv4: () => uuidv43, - uuidv6: () => uuidv63, - uuidv7: () => uuidv73, - void: () => _void22, - xid: () => xid22, - xor: () => xor3 -}); -var checks_exports22 = {}; -__export2(checks_exports22, { - endsWith: () => _endsWith3, - gt: () => _gt3, - gte: () => _gte3, - includes: () => _includes3, - length: () => _length3, - lowercase: () => _lowercase3, - lt: () => _lt3, - lte: () => _lte3, - maxLength: () => _maxLength3, - maxSize: () => _maxSize3, - mime: () => _mime3, - minLength: () => _minLength3, - minSize: () => _minSize3, - multipleOf: () => _multipleOf3, - negative: () => _negative3, - nonnegative: () => _nonnegative3, - nonpositive: () => _nonpositive3, - normalize: () => _normalize3, - overwrite: () => _overwrite3, - positive: () => _positive3, - property: () => _property3, - regex: () => _regex3, - size: () => _size3, - slugify: () => _slugify3, - startsWith: () => _startsWith3, - toLowerCase: () => _toLowerCase3, - toUpperCase: () => _toUpperCase3, - trim: () => _trim3, - uppercase: () => _uppercase3 -}); -var iso_exports3 = {}; -__export2(iso_exports3, { - ZodISODate: () => ZodISODate3, - ZodISODateTime: () => ZodISODateTime3, - ZodISODuration: () => ZodISODuration3, - ZodISOTime: () => ZodISOTime3, - date: () => date22, - datetime: () => datetime22, - duration: () => duration22, - time: () => time22 -}); -var ZodISODateTime3 = /* @__PURE__ */ $constructor3("ZodISODateTime", (inst, def) => { - $ZodISODateTime3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function datetime22(params) { - return /* @__PURE__ */ _isoDateTime3(ZodISODateTime3, params); -} -var ZodISODate3 = /* @__PURE__ */ $constructor3("ZodISODate", (inst, def) => { - $ZodISODate3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function date22(params) { - return /* @__PURE__ */ _isoDate3(ZodISODate3, params); -} -var ZodISOTime3 = /* @__PURE__ */ $constructor3("ZodISOTime", (inst, def) => { - $ZodISOTime3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function time22(params) { - return /* @__PURE__ */ _isoTime3(ZodISOTime3, params); -} -var ZodISODuration3 = /* @__PURE__ */ $constructor3("ZodISODuration", (inst, def) => { - $ZodISODuration3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function duration22(params) { - return /* @__PURE__ */ _isoDuration3(ZodISODuration3, params); -} -var initializer22 = (inst, issues) => { - $ZodError3.init(inst, issues); - inst.name = "ZodError"; - Object.defineProperties(inst, { - format: { - value: (mapper) => formatError3(inst, mapper) - // enumerable: false, - }, - flatten: { - value: (mapper) => flattenError3(inst, mapper) - // enumerable: false, - }, - addIssue: { - value: (issue22) => { - inst.issues.push(issue22); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer3, 2); - } - // enumerable: false, - }, - addIssues: { - value: (issues2) => { - inst.issues.push(...issues2); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer3, 2); - } - // enumerable: false, - }, - isEmpty: { - get() { - return inst.issues.length === 0; - } - // enumerable: false, - } - }); -}; -var ZodError3 = /* @__PURE__ */ $constructor3("ZodError", initializer22); -var ZodRealError3 = /* @__PURE__ */ $constructor3("ZodError", initializer22, { - Parent: Error -}); -var parse32 = /* @__PURE__ */ _parse3(ZodRealError3); -var parseAsync22 = /* @__PURE__ */ _parseAsync3(ZodRealError3); -var safeParse32 = /* @__PURE__ */ _safeParse3(ZodRealError3); -var safeParseAsync22 = /* @__PURE__ */ _safeParseAsync3(ZodRealError3); -var encode22 = /* @__PURE__ */ _encode3(ZodRealError3); -var decode22 = /* @__PURE__ */ _decode3(ZodRealError3); -var encodeAsync22 = /* @__PURE__ */ _encodeAsync3(ZodRealError3); -var decodeAsync22 = /* @__PURE__ */ _decodeAsync3(ZodRealError3); -var safeEncode22 = /* @__PURE__ */ _safeEncode3(ZodRealError3); -var safeDecode22 = /* @__PURE__ */ _safeDecode3(ZodRealError3); -var safeEncodeAsync22 = /* @__PURE__ */ _safeEncodeAsync3(ZodRealError3); -var safeDecodeAsync22 = /* @__PURE__ */ _safeDecodeAsync3(ZodRealError3); -var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => { - $ZodType3.init(inst, def); - Object.assign(inst["~standard"], { - jsonSchema: { - input: createStandardJSONSchemaMethod3(inst, "input"), - output: createStandardJSONSchemaMethod3(inst, "output") - } - }); - inst.toJSONSchema = createToJSONSchemaMethod3(inst, {}); - inst.def = def; - inst.type = def.type; - Object.defineProperty(inst, "_def", { value: def }); - inst.check = (...checks) => { - return inst.clone(util_exports3.mergeDefs(def, { - checks: [ - ...def.checks ?? [], - ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch) - ] - }), { - parent: true - }); - }; - inst.with = inst.check; - inst.clone = (def2, params) => clone3(inst, def2, params); - inst.brand = () => inst; - inst.register = ((reg, meta32) => { - reg.add(inst, meta32); - return inst; - }); - inst.parse = (data, params) => parse32(inst, data, params, { callee: inst.parse }); - inst.safeParse = (data, params) => safeParse32(inst, data, params); - inst.parseAsync = async (data, params) => parseAsync22(inst, data, params, { callee: inst.parseAsync }); - inst.safeParseAsync = async (data, params) => safeParseAsync22(inst, data, params); - inst.spa = inst.safeParseAsync; - inst.encode = (data, params) => encode22(inst, data, params); - inst.decode = (data, params) => decode22(inst, data, params); - inst.encodeAsync = async (data, params) => encodeAsync22(inst, data, params); - inst.decodeAsync = async (data, params) => decodeAsync22(inst, data, params); - inst.safeEncode = (data, params) => safeEncode22(inst, data, params); - inst.safeDecode = (data, params) => safeDecode22(inst, data, params); - inst.safeEncodeAsync = async (data, params) => safeEncodeAsync22(inst, data, params); - inst.safeDecodeAsync = async (data, params) => safeDecodeAsync22(inst, data, params); - inst.refine = (check22, params) => inst.check(refine3(check22, params)); - inst.superRefine = (refinement) => inst.check(superRefine3(refinement)); - inst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite3(fn)); - inst.optional = () => optional3(inst); - inst.exactOptional = () => exactOptional3(inst); - inst.nullable = () => nullable3(inst); - inst.nullish = () => optional3(nullable3(inst)); - inst.nonoptional = (params) => nonoptional3(inst, params); - inst.array = () => array3(inst); - inst.or = (arg) => union3([inst, arg]); - inst.and = (arg) => intersection3(inst, arg); - inst.transform = (tx) => pipe3(inst, transform3(tx)); - inst.default = (def2) => _default22(inst, def2); - inst.prefault = (def2) => prefault3(inst, def2); - inst.catch = (params) => _catch22(inst, params); - inst.pipe = (target) => pipe3(inst, target); - inst.readonly = () => readonly3(inst); - inst.describe = (description) => { - const cl = inst.clone(); - globalRegistry3.add(cl, { description }); - return cl; - }; - Object.defineProperty(inst, "description", { - get() { - return globalRegistry3.get(inst)?.description; - }, - configurable: true - }); - inst.meta = (...args) => { - if (args.length === 0) { - return globalRegistry3.get(inst); - } - const cl = inst.clone(); - globalRegistry3.add(cl, args[0]); - return cl; - }; - inst.isOptional = () => inst.safeParse(void 0).success; - inst.isNullable = () => inst.safeParse(null).success; - inst.apply = (fn) => fn(inst); - return inst; -}); -var _ZodString3 = /* @__PURE__ */ $constructor3("_ZodString", (inst, def) => { - $ZodString3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => stringProcessor3(inst, ctx, json22, params); - const bag = inst._zod.bag; - inst.format = bag.format ?? null; - inst.minLength = bag.minimum ?? null; - inst.maxLength = bag.maximum ?? null; - inst.regex = (...args) => inst.check(/* @__PURE__ */ _regex3(...args)); - inst.includes = (...args) => inst.check(/* @__PURE__ */ _includes3(...args)); - inst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith3(...args)); - inst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith3(...args)); - inst.min = (...args) => inst.check(/* @__PURE__ */ _minLength3(...args)); - inst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength3(...args)); - inst.length = (...args) => inst.check(/* @__PURE__ */ _length3(...args)); - inst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength3(1, ...args)); - inst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase3(params)); - inst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase3(params)); - inst.trim = () => inst.check(/* @__PURE__ */ _trim3()); - inst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize3(...args)); - inst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase3()); - inst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase3()); - inst.slugify = () => inst.check(/* @__PURE__ */ _slugify3()); -}); -var ZodString3 = /* @__PURE__ */ $constructor3("ZodString", (inst, def) => { - $ZodString3.init(inst, def); - _ZodString3.init(inst, def); - inst.email = (params) => inst.check(/* @__PURE__ */ _email3(ZodEmail3, params)); - inst.url = (params) => inst.check(/* @__PURE__ */ _url3(ZodURL3, params)); - inst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt3(ZodJWT3, params)); - inst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji22(ZodEmoji3, params)); - inst.guid = (params) => inst.check(/* @__PURE__ */ _guid3(ZodGUID3, params)); - inst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid3(ZodUUID3, params)); - inst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv43(ZodUUID3, params)); - inst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv63(ZodUUID3, params)); - inst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv73(ZodUUID3, params)); - inst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid3(ZodNanoID3, params)); - inst.guid = (params) => inst.check(/* @__PURE__ */ _guid3(ZodGUID3, params)); - inst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid4(ZodCUID4, params)); - inst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid23(ZodCUID23, params)); - inst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid3(ZodULID3, params)); - inst.base64 = (params) => inst.check(/* @__PURE__ */ _base643(ZodBase643, params)); - inst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url3(ZodBase64URL3, params)); - inst.xid = (params) => inst.check(/* @__PURE__ */ _xid3(ZodXID3, params)); - inst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid3(ZodKSUID3, params)); - inst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv43(ZodIPv43, params)); - inst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv63(ZodIPv63, params)); - inst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv43(ZodCIDRv43, params)); - inst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv63(ZodCIDRv63, params)); - inst.e164 = (params) => inst.check(/* @__PURE__ */ _e1643(ZodE1643, params)); - inst.datetime = (params) => inst.check(datetime22(params)); - inst.date = (params) => inst.check(date22(params)); - inst.time = (params) => inst.check(time22(params)); - inst.duration = (params) => inst.check(duration22(params)); -}); -function string22(params) { - return /* @__PURE__ */ _string3(ZodString3, params); -} -var ZodStringFormat3 = /* @__PURE__ */ $constructor3("ZodStringFormat", (inst, def) => { - $ZodStringFormat3.init(inst, def); - _ZodString3.init(inst, def); -}); -var ZodEmail3 = /* @__PURE__ */ $constructor3("ZodEmail", (inst, def) => { - $ZodEmail3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function email22(params) { - return /* @__PURE__ */ _email3(ZodEmail3, params); -} -var ZodGUID3 = /* @__PURE__ */ $constructor3("ZodGUID", (inst, def) => { - $ZodGUID3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function guid22(params) { - return /* @__PURE__ */ _guid3(ZodGUID3, params); -} -var ZodUUID3 = /* @__PURE__ */ $constructor3("ZodUUID", (inst, def) => { - $ZodUUID3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function uuid22(params) { - return /* @__PURE__ */ _uuid3(ZodUUID3, params); -} -function uuidv43(params) { - return /* @__PURE__ */ _uuidv43(ZodUUID3, params); -} -function uuidv63(params) { - return /* @__PURE__ */ _uuidv63(ZodUUID3, params); -} -function uuidv73(params) { - return /* @__PURE__ */ _uuidv73(ZodUUID3, params); -} -var ZodURL3 = /* @__PURE__ */ $constructor3("ZodURL", (inst, def) => { - $ZodURL3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function url4(params) { - return /* @__PURE__ */ _url3(ZodURL3, params); -} -function httpUrl3(params) { - return /* @__PURE__ */ _url3(ZodURL3, { - protocol: /^https?$/, - hostname: regexes_exports3.domain, - ...util_exports3.normalizeParams(params) - }); -} -var ZodEmoji3 = /* @__PURE__ */ $constructor3("ZodEmoji", (inst, def) => { - $ZodEmoji3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function emoji22(params) { - return /* @__PURE__ */ _emoji22(ZodEmoji3, params); -} -var ZodNanoID3 = /* @__PURE__ */ $constructor3("ZodNanoID", (inst, def) => { - $ZodNanoID3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function nanoid22(params) { - return /* @__PURE__ */ _nanoid3(ZodNanoID3, params); -} -var ZodCUID4 = /* @__PURE__ */ $constructor3("ZodCUID", (inst, def) => { - $ZodCUID4.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function cuid32(params) { - return /* @__PURE__ */ _cuid4(ZodCUID4, params); -} -var ZodCUID23 = /* @__PURE__ */ $constructor3("ZodCUID2", (inst, def) => { - $ZodCUID23.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function cuid222(params) { - return /* @__PURE__ */ _cuid23(ZodCUID23, params); -} -var ZodULID3 = /* @__PURE__ */ $constructor3("ZodULID", (inst, def) => { - $ZodULID3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function ulid22(params) { - return /* @__PURE__ */ _ulid3(ZodULID3, params); -} -var ZodXID3 = /* @__PURE__ */ $constructor3("ZodXID", (inst, def) => { - $ZodXID3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function xid22(params) { - return /* @__PURE__ */ _xid3(ZodXID3, params); -} -var ZodKSUID3 = /* @__PURE__ */ $constructor3("ZodKSUID", (inst, def) => { - $ZodKSUID3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function ksuid22(params) { - return /* @__PURE__ */ _ksuid3(ZodKSUID3, params); -} -var ZodIPv43 = /* @__PURE__ */ $constructor3("ZodIPv4", (inst, def) => { - $ZodIPv43.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function ipv422(params) { - return /* @__PURE__ */ _ipv43(ZodIPv43, params); -} -var ZodMAC3 = /* @__PURE__ */ $constructor3("ZodMAC", (inst, def) => { - $ZodMAC3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function mac22(params) { - return /* @__PURE__ */ _mac3(ZodMAC3, params); -} -var ZodIPv63 = /* @__PURE__ */ $constructor3("ZodIPv6", (inst, def) => { - $ZodIPv63.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function ipv622(params) { - return /* @__PURE__ */ _ipv63(ZodIPv63, params); -} -var ZodCIDRv43 = /* @__PURE__ */ $constructor3("ZodCIDRv4", (inst, def) => { - $ZodCIDRv43.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function cidrv422(params) { - return /* @__PURE__ */ _cidrv43(ZodCIDRv43, params); -} -var ZodCIDRv63 = /* @__PURE__ */ $constructor3("ZodCIDRv6", (inst, def) => { - $ZodCIDRv63.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function cidrv622(params) { - return /* @__PURE__ */ _cidrv63(ZodCIDRv63, params); -} -var ZodBase643 = /* @__PURE__ */ $constructor3("ZodBase64", (inst, def) => { - $ZodBase643.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function base6422(params) { - return /* @__PURE__ */ _base643(ZodBase643, params); -} -var ZodBase64URL3 = /* @__PURE__ */ $constructor3("ZodBase64URL", (inst, def) => { - $ZodBase64URL3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function base64url22(params) { - return /* @__PURE__ */ _base64url3(ZodBase64URL3, params); -} -var ZodE1643 = /* @__PURE__ */ $constructor3("ZodE164", (inst, def) => { - $ZodE1643.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function e16422(params) { - return /* @__PURE__ */ _e1643(ZodE1643, params); -} -var ZodJWT3 = /* @__PURE__ */ $constructor3("ZodJWT", (inst, def) => { - $ZodJWT3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function jwt3(params) { - return /* @__PURE__ */ _jwt3(ZodJWT3, params); -} -var ZodCustomStringFormat3 = /* @__PURE__ */ $constructor3("ZodCustomStringFormat", (inst, def) => { - $ZodCustomStringFormat3.init(inst, def); - ZodStringFormat3.init(inst, def); -}); -function stringFormat3(format2, fnOrRegex, _params = {}) { - return /* @__PURE__ */ _stringFormat3(ZodCustomStringFormat3, format2, fnOrRegex, _params); -} -function hostname22(_params) { - return /* @__PURE__ */ _stringFormat3(ZodCustomStringFormat3, "hostname", regexes_exports3.hostname, _params); -} -function hex22(_params) { - return /* @__PURE__ */ _stringFormat3(ZodCustomStringFormat3, "hex", regexes_exports3.hex, _params); -} -function hash3(alg, params) { - const enc = params?.enc ?? "hex"; - const format2 = `${alg}_${enc}`; - const regex2 = regexes_exports3[format2]; - if (!regex2) - throw new Error(`Unrecognized hash format: ${format2}`); - return /* @__PURE__ */ _stringFormat3(ZodCustomStringFormat3, format2, regex2, params); -} -var ZodNumber3 = /* @__PURE__ */ $constructor3("ZodNumber", (inst, def) => { - $ZodNumber3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => numberProcessor3(inst, ctx, json22, params); - inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt3(value, params)); - inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt3(value, params)); - inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte3(value, params)); - inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte3(value, params)); - inst.int = (params) => inst.check(int3(params)); - inst.safe = (params) => inst.check(int3(params)); - inst.positive = (params) => inst.check(/* @__PURE__ */ _gt3(0, params)); - inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte3(0, params)); - inst.negative = (params) => inst.check(/* @__PURE__ */ _lt3(0, params)); - inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte3(0, params)); - inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf3(value, params)); - inst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf3(value, params)); - inst.finite = () => inst; - const bag = inst._zod.bag; - inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null; - inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null; - inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5); - inst.isFinite = true; - inst.format = bag.format ?? null; -}); -function number22(params) { - return /* @__PURE__ */ _number3(ZodNumber3, params); -} -var ZodNumberFormat3 = /* @__PURE__ */ $constructor3("ZodNumberFormat", (inst, def) => { - $ZodNumberFormat3.init(inst, def); - ZodNumber3.init(inst, def); -}); -function int3(params) { - return /* @__PURE__ */ _int3(ZodNumberFormat3, params); -} -function float323(params) { - return /* @__PURE__ */ _float323(ZodNumberFormat3, params); -} -function float643(params) { - return /* @__PURE__ */ _float643(ZodNumberFormat3, params); -} -function int323(params) { - return /* @__PURE__ */ _int323(ZodNumberFormat3, params); -} -function uint323(params) { - return /* @__PURE__ */ _uint323(ZodNumberFormat3, params); -} -var ZodBoolean3 = /* @__PURE__ */ $constructor3("ZodBoolean", (inst, def) => { - $ZodBoolean3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => booleanProcessor3(inst, ctx, json22, params); -}); -function boolean22(params) { - return /* @__PURE__ */ _boolean3(ZodBoolean3, params); -} -var ZodBigInt3 = /* @__PURE__ */ $constructor3("ZodBigInt", (inst, def) => { - $ZodBigInt3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => bigintProcessor3(inst, ctx, json22, params); - inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt3(value, params)); - inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt3(value, params)); - inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte3(value, params)); - inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte3(value, params)); - inst.positive = (params) => inst.check(/* @__PURE__ */ _gt3(BigInt(0), params)); - inst.negative = (params) => inst.check(/* @__PURE__ */ _lt3(BigInt(0), params)); - inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte3(BigInt(0), params)); - inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte3(BigInt(0), params)); - inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf3(value, params)); - const bag = inst._zod.bag; - inst.minValue = bag.minimum ?? null; - inst.maxValue = bag.maximum ?? null; - inst.format = bag.format ?? null; -}); -function bigint22(params) { - return /* @__PURE__ */ _bigint3(ZodBigInt3, params); -} -var ZodBigIntFormat3 = /* @__PURE__ */ $constructor3("ZodBigIntFormat", (inst, def) => { - $ZodBigIntFormat3.init(inst, def); - ZodBigInt3.init(inst, def); -}); -function int643(params) { - return /* @__PURE__ */ _int643(ZodBigIntFormat3, params); -} -function uint643(params) { - return /* @__PURE__ */ _uint643(ZodBigIntFormat3, params); -} -var ZodSymbol3 = /* @__PURE__ */ $constructor3("ZodSymbol", (inst, def) => { - $ZodSymbol3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => symbolProcessor3(inst, ctx, json22, params); -}); -function symbol3(params) { - return /* @__PURE__ */ _symbol3(ZodSymbol3, params); -} -var ZodUndefined3 = /* @__PURE__ */ $constructor3("ZodUndefined", (inst, def) => { - $ZodUndefined3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => undefinedProcessor3(inst, ctx, json22, params); -}); -function _undefined32(params) { - return /* @__PURE__ */ _undefined22(ZodUndefined3, params); -} -var ZodNull3 = /* @__PURE__ */ $constructor3("ZodNull", (inst, def) => { - $ZodNull3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => nullProcessor3(inst, ctx, json22, params); -}); -function _null32(params) { - return /* @__PURE__ */ _null22(ZodNull3, params); -} -var ZodAny3 = /* @__PURE__ */ $constructor3("ZodAny", (inst, def) => { - $ZodAny3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => anyProcessor3(inst, ctx, json22, params); -}); -function any3() { - return /* @__PURE__ */ _any3(ZodAny3); -} -var ZodUnknown3 = /* @__PURE__ */ $constructor3("ZodUnknown", (inst, def) => { - $ZodUnknown3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => unknownProcessor3(inst, ctx, json22, params); -}); -function unknown3() { - return /* @__PURE__ */ _unknown3(ZodUnknown3); -} -var ZodNever3 = /* @__PURE__ */ $constructor3("ZodNever", (inst, def) => { - $ZodNever3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => neverProcessor3(inst, ctx, json22, params); -}); -function never3(params) { - return /* @__PURE__ */ _never3(ZodNever3, params); -} -var ZodVoid3 = /* @__PURE__ */ $constructor3("ZodVoid", (inst, def) => { - $ZodVoid3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => voidProcessor3(inst, ctx, json22, params); -}); -function _void22(params) { - return /* @__PURE__ */ _void5(ZodVoid3, params); -} -var ZodDate3 = /* @__PURE__ */ $constructor3("ZodDate", (inst, def) => { - $ZodDate3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => dateProcessor3(inst, ctx, json22, params); - inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte3(value, params)); - inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte3(value, params)); - const c = inst._zod.bag; - inst.minDate = c.minimum ? new Date(c.minimum) : null; - inst.maxDate = c.maximum ? new Date(c.maximum) : null; -}); -function date32(params) { - return /* @__PURE__ */ _date3(ZodDate3, params); -} -var ZodArray3 = /* @__PURE__ */ $constructor3("ZodArray", (inst, def) => { - $ZodArray3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => arrayProcessor3(inst, ctx, json22, params); - inst.element = def.element; - inst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength3(minLength, params)); - inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength3(1, params)); - inst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength3(maxLength, params)); - inst.length = (len, params) => inst.check(/* @__PURE__ */ _length3(len, params)); - inst.unwrap = () => inst.element; -}); -function array3(element, params) { - return /* @__PURE__ */ _array3(ZodArray3, element, params); } -function keyof3(schema) { - const shape = schema._zod.def.shape; - return _enum22(Object.keys(shape)); -} -var ZodObject3 = /* @__PURE__ */ $constructor3("ZodObject", (inst, def) => { - $ZodObjectJIT3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => objectProcessor3(inst, ctx, json22, params); - util_exports3.defineLazy(inst, "shape", () => { - return def.shape; - }); - inst.keyof = () => _enum22(Object.keys(inst._zod.def.shape)); - inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall }); - inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown3() }); - inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown3() }); - inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never3() }); - inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 }); - inst.extend = (incoming) => { - return util_exports3.extend(inst, incoming); - }; - inst.safeExtend = (incoming) => { - return util_exports3.safeExtend(inst, incoming); - }; - inst.merge = (other) => util_exports3.merge(inst, other); - inst.pick = (mask) => util_exports3.pick(inst, mask); - inst.omit = (mask) => util_exports3.omit(inst, mask); - inst.partial = (...args) => util_exports3.partial(ZodOptional3, inst, args[0]); - inst.required = (...args) => util_exports3.required(ZodNonOptional3, inst, args[0]); -}); -function object3(shape, params) { - const def = { - type: "object", - shape: shape ?? {}, - ...util_exports3.normalizeParams(params) - }; - return new ZodObject3(def); -} -function strictObject3(shape, params) { - return new ZodObject3({ - type: "object", - shape, - catchall: never3(), - ...util_exports3.normalizeParams(params) - }); -} -function looseObject3(shape, params) { - return new ZodObject3({ - type: "object", - shape, - catchall: unknown3(), - ...util_exports3.normalizeParams(params) - }); -} -var ZodUnion3 = /* @__PURE__ */ $constructor3("ZodUnion", (inst, def) => { - $ZodUnion3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => unionProcessor3(inst, ctx, json22, params); - inst.options = def.options; -}); -function union3(options, params) { - return new ZodUnion3({ - type: "union", - options, - ...util_exports3.normalizeParams(params) - }); -} -var ZodXor3 = /* @__PURE__ */ $constructor3("ZodXor", (inst, def) => { - ZodUnion3.init(inst, def); - $ZodXor3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => unionProcessor3(inst, ctx, json22, params); - inst.options = def.options; -}); -function xor3(options, params) { - return new ZodXor3({ - type: "union", - options, - inclusive: false, - ...util_exports3.normalizeParams(params) - }); -} -var ZodDiscriminatedUnion3 = /* @__PURE__ */ $constructor3("ZodDiscriminatedUnion", (inst, def) => { - ZodUnion3.init(inst, def); - $ZodDiscriminatedUnion3.init(inst, def); -}); -function discriminatedUnion3(discriminator, options, params) { - return new ZodDiscriminatedUnion3({ - type: "union", - options, - discriminator, - ...util_exports3.normalizeParams(params) - }); -} -var ZodIntersection3 = /* @__PURE__ */ $constructor3("ZodIntersection", (inst, def) => { - $ZodIntersection3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => intersectionProcessor3(inst, ctx, json22, params); -}); -function intersection3(left, right) { - return new ZodIntersection3({ - type: "intersection", - left, - right - }); -} -var ZodTuple3 = /* @__PURE__ */ $constructor3("ZodTuple", (inst, def) => { - $ZodTuple3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => tupleProcessor3(inst, ctx, json22, params); - inst.rest = (rest) => inst.clone({ - ...inst._zod.def, - rest - }); -}); -function tuple3(items, _paramsOrRest, _params) { - const hasRest = _paramsOrRest instanceof $ZodType3; - const params = hasRest ? _params : _paramsOrRest; - const rest = hasRest ? _paramsOrRest : null; - return new ZodTuple3({ - type: "tuple", - items, - rest, - ...util_exports3.normalizeParams(params) - }); -} -var ZodRecord3 = /* @__PURE__ */ $constructor3("ZodRecord", (inst, def) => { - $ZodRecord3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => recordProcessor3(inst, ctx, json22, params); - inst.keyType = def.keyType; - inst.valueType = def.valueType; -}); -function record3(keyType, valueType, params) { - return new ZodRecord3({ - type: "record", - keyType, - valueType, - ...util_exports3.normalizeParams(params) - }); -} -function partialRecord3(keyType, valueType, params) { - const k = clone3(keyType); - k._zod.values = void 0; - return new ZodRecord3({ - type: "record", - keyType: k, - valueType, - ...util_exports3.normalizeParams(params) - }); -} -function looseRecord3(keyType, valueType, params) { - return new ZodRecord3({ - type: "record", - keyType, - valueType, - mode: "loose", - ...util_exports3.normalizeParams(params) - }); -} -var ZodMap3 = /* @__PURE__ */ $constructor3("ZodMap", (inst, def) => { - $ZodMap3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => mapProcessor3(inst, ctx, json22, params); - inst.keyType = def.keyType; - inst.valueType = def.valueType; - inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize3(...args)); - inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize3(1, params)); - inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize3(...args)); - inst.size = (...args) => inst.check(/* @__PURE__ */ _size3(...args)); -}); -function map3(keyType, valueType, params) { - return new ZodMap3({ - type: "map", - keyType, - valueType, - ...util_exports3.normalizeParams(params) - }); -} -var ZodSet3 = /* @__PURE__ */ $constructor3("ZodSet", (inst, def) => { - $ZodSet3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => setProcessor3(inst, ctx, json22, params); - inst.min = (...args) => inst.check(/* @__PURE__ */ _minSize3(...args)); - inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minSize3(1, params)); - inst.max = (...args) => inst.check(/* @__PURE__ */ _maxSize3(...args)); - inst.size = (...args) => inst.check(/* @__PURE__ */ _size3(...args)); -}); -function set3(valueType, params) { - return new ZodSet3({ - type: "set", - valueType, - ...util_exports3.normalizeParams(params) - }); -} -var ZodEnum3 = /* @__PURE__ */ $constructor3("ZodEnum", (inst, def) => { - $ZodEnum3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => enumProcessor3(inst, ctx, json22, params); - inst.enum = def.entries; - inst.options = Object.values(def.entries); - const keys = new Set(Object.keys(def.entries)); - inst.extract = (values, params) => { - const newEntries = {}; - for (const value of values) { - if (keys.has(value)) { - newEntries[value] = def.entries[value]; - } else - throw new Error(`Key ${value} not found in enum`); +var handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; } - return new ZodEnum3({ - ...def, - checks: [], - ...util_exports3.normalizeParams(params), - entries: newEntries - }); - }; - inst.exclude = (values, params) => { - const newEntries = { ...def.entries }; - for (const value of values) { - if (keys.has(value)) { - delete newEntries[value]; - } else - throw new Error(`Key ${value} not found in enum`); + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; } - return new ZodEnum3({ - ...def, - checks: [], - ...util_exports3.normalizeParams(params), - entries: newEntries - }); - }; -}); -function _enum22(values, params) { - const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values; - return new ZodEnum3({ - type: "enum", - entries, - ...util_exports3.normalizeParams(params) - }); -} -function nativeEnum3(entries, params) { - return new ZodEnum3({ - type: "enum", - entries, - ...util_exports3.normalizeParams(params) - }); -} -var ZodLiteral3 = /* @__PURE__ */ $constructor3("ZodLiteral", (inst, def) => { - $ZodLiteral3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => literalProcessor3(inst, ctx, json22, params); - inst.values = new Set(def.values); - Object.defineProperty(inst, "value", { - get() { - if (def.values.length > 1) { - throw new Error("This schema contains multiple valid literal values. Use `.values` instead."); - } - return def.values[0]; + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); } - }); -}); -function literal3(value, params) { - return new ZodLiteral3({ - type: "literal", - values: Array.isArray(value) ? value : [value], - ...util_exports3.normalizeParams(params) - }); + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + } + return newMethods; } -var ZodFile3 = /* @__PURE__ */ $constructor3("ZodFile", (inst, def) => { - $ZodFile3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => fileProcessor3(inst, ctx, json22, params); - inst.min = (size, params) => inst.check(/* @__PURE__ */ _minSize3(size, params)); - inst.max = (size, params) => inst.check(/* @__PURE__ */ _maxSize3(size, params)); - inst.mime = (types, params) => inst.check(/* @__PURE__ */ _mime3(Array.isArray(types) ? types : [types], params)); -}); -function file3(params) { - return /* @__PURE__ */ _file3(ZodFile3, params); -} -var ZodTransform3 = /* @__PURE__ */ $constructor3("ZodTransform", (inst, def) => { - $ZodTransform3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => transformProcessor3(inst, ctx, json22, params); - inst._zod.parse = (payload, _ctx) => { - if (_ctx.direction === "backward") { - throw new $ZodEncodeError3(inst.constructor.name); +function decorate(octokit, scope, methodName, defaults3, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults3); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); } - payload.addIssue = (issue22) => { - if (typeof issue22 === "string") { - payload.issues.push(util_exports3.issue(issue22, payload.value, def)); - } else { - const _issue = issue22; - if (_issue.fatal) - _issue.continue = false; - _issue.code ?? (_issue.code = "custom"); - _issue.input ?? (_issue.input = payload.value); - _issue.inst ?? (_issue.inst = inst); - payload.issues.push(util_exports3.issue(_issue)); + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; + } + delete options2[name]; + } } - }; - const output = def.transform(payload.value, payload); - if (output instanceof Promise) { - return output.then((output2) => { - payload.value = output2; - return payload; - }); + return requestWithDefaults(options2); } - payload.value = output; - return payload; + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} + +// node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api }; -}); -function transform3(fn) { - return new ZodTransform3({ - type: "transform", - transform: fn - }); } -var ZodOptional3 = /* @__PURE__ */ $constructor3("ZodOptional", (inst, def) => { - $ZodOptional3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => optionalProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function optional3(innerType) { - return new ZodOptional3({ - type: "optional", - innerType - }); +restEndpointMethods.VERSION = VERSION7; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; } -var ZodExactOptional3 = /* @__PURE__ */ $constructor3("ZodExactOptional", (inst, def) => { - $ZodExactOptional3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => optionalProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function exactOptional3(innerType) { - return new ZodExactOptional3({ - type: "optional", - innerType - }); +legacyRestEndpointMethods.VERSION = VERSION7; + +// node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +var VERSION8 = "0.0.0-development"; +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = ("total_count" in response.data || "total_commits" in response.data) && !("url" in response.data); + if (!responseNeedsNormalization) return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + const totalCommits = response.data.total_commits; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + delete response.data.total_commits; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + response.data.total_commits = totalCommits; + return response; } -var ZodNullable3 = /* @__PURE__ */ $constructor3("ZodNullable", (inst, def) => { - $ZodNullable3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => nullableProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nullable3(innerType) { - return new ZodNullable3({ - type: "nullable", - innerType - }); +function iterator2(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url4 = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url4) return { done: true }; + try { + const response = await requestMethod({ method, url: url4, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url4 = ((normalizedResponse.headers.link || "").match( + /<([^<>]+)>;\s*rel="next"/ + ) || [])[1]; + if (!url4 && "total_commits" in normalizedResponse.data) { + const parsedUrl = new URL(normalizedResponse.url); + const params = parsedUrl.searchParams; + const page = parseInt(params.get("page") || "1", 10); + const per_page = parseInt(params.get("per_page") || "250", 10); + if (page * per_page < normalizedResponse.data.total_commits) { + params.set("page", String(page + 1)); + url4 = parsedUrl.toString(); + } + } + return { value: normalizedResponse }; + } catch (error99) { + if (error99.status !== 409) throw error99; + url4 = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + }) + }; } -function nullish22(innerType) { - return optional3(nullable3(innerType)); +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator2(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); } -var ZodDefault3 = /* @__PURE__ */ $constructor3("ZodDefault", (inst, def) => { - $ZodDefault3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => defaultProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeDefault = inst.unwrap; -}); -function _default22(innerType, defaultValue) { - return new ZodDefault3({ - type: "default", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : util_exports3.shallowClone(defaultValue); +function gather(octokit, results, iterator22, mapFn) { + return iterator22.next().then((result) => { + if (result.done) { + return results; } - }); -} -var ZodPrefault3 = /* @__PURE__ */ $constructor3("ZodPrefault", (inst, def) => { - $ZodPrefault3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => prefaultProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function prefault3(innerType, defaultValue) { - return new ZodPrefault3({ - type: "prefault", - innerType, - get defaultValue() { - return typeof defaultValue === "function" ? defaultValue() : util_exports3.shallowClone(defaultValue); + let earlyExit = false; + function done() { + earlyExit = true; } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator22, mapFn); }); } -var ZodNonOptional3 = /* @__PURE__ */ $constructor3("ZodNonOptional", (inst, def) => { - $ZodNonOptional3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => nonoptionalProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function nonoptional3(innerType, params) { - return new ZodNonOptional3({ - type: "nonoptional", - innerType, - ...util_exports3.normalizeParams(params) - }); -} -var ZodSuccess3 = /* @__PURE__ */ $constructor3("ZodSuccess", (inst, def) => { - $ZodSuccess3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => successProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function success3(innerType) { - return new ZodSuccess3({ - type: "success", - innerType - }); -} -var ZodCatch3 = /* @__PURE__ */ $constructor3("ZodCatch", (inst, def) => { - $ZodCatch3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => catchProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; - inst.removeCatch = inst.unwrap; -}); -function _catch22(innerType, catchValue) { - return new ZodCatch3({ - type: "catch", - innerType, - catchValue: typeof catchValue === "function" ? catchValue : () => catchValue - }); -} -var ZodNaN3 = /* @__PURE__ */ $constructor3("ZodNaN", (inst, def) => { - $ZodNaN3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => nanProcessor3(inst, ctx, json22, params); -}); -function nan3(params) { - return /* @__PURE__ */ _nan3(ZodNaN3, params); -} -var ZodPipe3 = /* @__PURE__ */ $constructor3("ZodPipe", (inst, def) => { - $ZodPipe3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => pipeProcessor3(inst, ctx, json22, params); - inst.in = def.in; - inst.out = def.out; -}); -function pipe3(in_, out) { - return new ZodPipe3({ - type: "pipe", - in: in_, - out - // ...util.normalizeParams(params), - }); -} -var ZodCodec3 = /* @__PURE__ */ $constructor3("ZodCodec", (inst, def) => { - ZodPipe3.init(inst, def); - $ZodCodec3.init(inst, def); -}); -function codec3(in_, out, params) { - return new ZodCodec3({ - type: "pipe", - in: in_, - out, - transform: params.decode, - reverseTransform: params.encode - }); -} -var ZodReadonly3 = /* @__PURE__ */ $constructor3("ZodReadonly", (inst, def) => { - $ZodReadonly3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => readonlyProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function readonly3(innerType) { - return new ZodReadonly3({ - type: "readonly", - innerType - }); -} -var ZodTemplateLiteral3 = /* @__PURE__ */ $constructor3("ZodTemplateLiteral", (inst, def) => { - $ZodTemplateLiteral3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => templateLiteralProcessor3(inst, ctx, json22, params); -}); -function templateLiteral3(parts, params) { - return new ZodTemplateLiteral3({ - type: "template_literal", - parts, - ...util_exports3.normalizeParams(params) - }); -} -var ZodLazy3 = /* @__PURE__ */ $constructor3("ZodLazy", (inst, def) => { - $ZodLazy3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => lazyProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.getter(); -}); -function lazy3(getter) { - return new ZodLazy3({ - type: "lazy", - getter - }); -} -var ZodPromise3 = /* @__PURE__ */ $constructor3("ZodPromise", (inst, def) => { - $ZodPromise3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => promiseProcessor3(inst, ctx, json22, params); - inst.unwrap = () => inst._zod.def.innerType; -}); -function promise3(innerType) { - return new ZodPromise3({ - type: "promise", - innerType - }); -} -var ZodFunction3 = /* @__PURE__ */ $constructor3("ZodFunction", (inst, def) => { - $ZodFunction3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => functionProcessor3(inst, ctx, json22, params); -}); -function _function3(params) { - return new ZodFunction3({ - type: "function", - input: Array.isArray(params?.input) ? tuple3(params?.input) : params?.input ?? array3(unknown3()), - output: params?.output ?? unknown3() - }); -} -var ZodCustom3 = /* @__PURE__ */ $constructor3("ZodCustom", (inst, def) => { - $ZodCustom3.init(inst, def); - ZodType3.init(inst, def); - inst._zod.processJSONSchema = (ctx, json22, params) => customProcessor3(inst, ctx, json22, params); +var composePaginateRest = Object.assign(paginate, { + iterator: iterator2 }); -function check3(fn) { - const ch = new $ZodCheck3({ - check: "custom" - // ...util.normalizeParams(params), - }); - ch._zod.check = fn; - return ch; -} -function custom3(fn, _params) { - return /* @__PURE__ */ _custom3(ZodCustom3, fn ?? (() => true), _params); -} -function refine3(fn, _params = {}) { - return /* @__PURE__ */ _refine3(ZodCustom3, fn, _params); -} -function superRefine3(fn) { - return /* @__PURE__ */ _superRefine3(fn); -} -var describe22 = describe5; -var meta22 = meta5; -function _instanceof3(cls, params = {}) { - const inst = new ZodCustom3({ - type: "custom", - check: "custom", - fn: (data) => data instanceof cls, - abort: true, - ...util_exports3.normalizeParams(params) - }); - inst._zod.bag.Class = cls; - inst._zod.check = (payload) => { - if (!(payload.value instanceof cls)) { - payload.issues.push({ - code: "invalid_type", - expected: cls.name, - input: payload.value, - inst, - path: [...inst._zod.def.path ?? []] - }); - } +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator2.bind(null, octokit) + }) }; - return inst; -} -var stringbool3 = (...args) => /* @__PURE__ */ _stringbool3({ - Codec: ZodCodec3, - Boolean: ZodBoolean3, - String: ZodString3 -}, ...args); -function json3(params) { - const jsonSchema = lazy3(() => { - return union3([string22(params), number22(), boolean22(), _null32(), array3(jsonSchema), record3(string22(), jsonSchema)]); - }); - return jsonSchema; -} -function preprocess3(fn, schema) { - return pipe3(transform3(fn), schema); -} -var ZodIssueCode3 = { - invalid_type: "invalid_type", - too_big: "too_big", - too_small: "too_small", - invalid_format: "invalid_format", - not_multiple_of: "not_multiple_of", - unrecognized_keys: "unrecognized_keys", - invalid_union: "invalid_union", - invalid_key: "invalid_key", - invalid_element: "invalid_element", - invalid_value: "invalid_value", - custom: "custom" -}; -function setErrorMap3(map22) { - config3({ - customError: map22 - }); -} -function getErrorMap3() { - return config3().customError; } -var ZodFirstPartyTypeKind3; -/* @__PURE__ */ (function(ZodFirstPartyTypeKind22) { -})(ZodFirstPartyTypeKind3 || (ZodFirstPartyTypeKind3 = {})); -var z3 = { - ...schemas_exports22, - ...checks_exports22, - iso: iso_exports3 -}; -var RECOGNIZED_KEYS3 = /* @__PURE__ */ new Set([ - // Schema identification - "$schema", - "$ref", - "$defs", - "definitions", - // Core schema keywords - "$id", - "id", - "$comment", - "$anchor", - "$vocabulary", - "$dynamicRef", - "$dynamicAnchor", - // Type - "type", - "enum", - "const", - // Composition - "anyOf", - "oneOf", - "allOf", - "not", - // Object - "properties", - "required", - "additionalProperties", - "patternProperties", - "propertyNames", - "minProperties", - "maxProperties", - // Array - "items", - "prefixItems", - "additionalItems", - "minItems", - "maxItems", - "uniqueItems", - "contains", - "minContains", - "maxContains", - // String - "minLength", - "maxLength", - "pattern", - "format", - // Number - "minimum", - "maximum", - "exclusiveMinimum", - "exclusiveMaximum", - "multipleOf", - // Already handled metadata - "description", - "default", - // Content - "contentEncoding", - "contentMediaType", - "contentSchema", - // Unsupported (error-throwing) - "unevaluatedItems", - "unevaluatedProperties", - "if", - "then", - "else", - "dependentSchemas", - "dependentRequired", - // OpenAPI - "nullable", - "readOnly" -]); -function detectVersion3(schema, defaultTarget) { - const $schema = schema.$schema; - if ($schema === "https://json-schema.org/draft/2020-12/schema") { - return "draft-2020-12"; - } - if ($schema === "http://json-schema.org/draft-07/schema#") { - return "draft-7"; - } - if ($schema === "http://json-schema.org/draft-04/schema#") { - return "draft-4"; +paginateRest.VERSION = VERSION8; + +// node_modules/@actions/github/lib/utils.js +var context = new Context(); +var baseUrl = getApiBaseUrl(); +var defaults2 = { + baseUrl, + request: { + agent: getProxyAgent(baseUrl), + fetch: getProxyFetch(baseUrl) } - return defaultTarget ?? "draft-2020-12"; -} -function resolveRef3(ref, ctx) { - if (!ref.startsWith("#")) { - throw new Error("External $ref is not supported, only local refs (#/...) are allowed"); +}; +var GitHub = Octokit.plugin(restEndpointMethods, paginateRest).defaults(defaults2); + +// node_modules/@actions/github/lib/github.js +var context2 = new Context(); + +// src/context.ts +var CustomContext = class { + constructor() { + const repoOwnerInput = getInput("repo_owner"); + const repoNameInput = getInput("repo_name"); + const prNumberInput = getInput("pr_number"); + const commitShaInput = getInput("commit_sha"); + this.repo = { + owner: this.isInputAvailable(repoOwnerInput) ? repoOwnerInput : context2.repo.owner, + repo: this.isInputAvailable(repoNameInput) ? repoNameInput : context2.repo.repo + }; + this.issue = { + number: this.isInputAvailable(prNumberInput) ? +prNumberInput : context2.issue?.number + }; + this.sha = this.isInputAvailable(commitShaInput) ? commitShaInput : void 0; } - const path = ref.slice(1).split("/").filter(Boolean); - if (path.length === 0) { - return ctx.rootSchema; + isRepoAvailable() { + return !!this.repo.owner && !!this.repo.repo; } - const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions"; - if (path[0] === defsKey) { - const key = path[1]; - if (!key || !ctx.defs[key]) { - throw new Error(`Reference not found: ${ref}`); - } - return ctx.defs[key]; + isIssueNumberAvailable() { + return !!this.issue.number; } - throw new Error(`Reference not found: ${ref}`); -} -function convertBaseSchema3(schema, ctx) { - if (schema.not !== void 0) { - if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) { - return z3.never(); - } - throw new Error("not is not supported in Zod (except { not: {} } for never)"); + isShaAvailable() { + return !!this.sha; } - if (schema.unevaluatedItems !== void 0) { - throw new Error("unevaluatedItems is not supported"); + isInputAvailable(input) { + return !!input; } - if (schema.unevaluatedProperties !== void 0) { - throw new Error("unevaluatedProperties is not supported"); +}; + +// node_modules/@octokit/plugin-throttling/dist-bundle/index.js +var import_light = __toESM(require_light(), 1); +var VERSION9 = "0.0.0-development"; +var noop4 = () => Promise.resolve(); +function wrapRequest(state, request2, options) { + return state.retryLimiter.schedule(doRequest, state, request2, options); +} +async function doRequest(state, request2, options) { + const { pathname } = new URL(options.url, "http://github.test"); + const isAuth = isAuthRequest(options.method, pathname); + const isWrite = !isAuth && options.method !== "GET" && options.method !== "HEAD"; + const isSearch = options.method === "GET" && pathname.startsWith("/search/"); + const isGraphQL = pathname.startsWith("/graphql"); + const retryCount = ~~request2.retryCount; + const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {}; + if (state.clustering) { + jobOptions.expiration = 1e3 * 60; } - if (schema.if !== void 0 || schema.then !== void 0 || schema.else !== void 0) { - throw new Error("Conditional schemas (if/then/else) are not supported"); + if (isWrite || isGraphQL) { + await state.write.key(state.id).schedule(jobOptions, noop4); } - if (schema.dependentSchemas !== void 0 || schema.dependentRequired !== void 0) { - throw new Error("dependentSchemas and dependentRequired are not supported"); + if (isWrite && state.triggersNotification(pathname)) { + await state.notifications.key(state.id).schedule(jobOptions, noop4); } - if (schema.$ref) { - const refPath = schema.$ref; - if (ctx.refs.has(refPath)) { - return ctx.refs.get(refPath); - } - if (ctx.processing.has(refPath)) { - return z3.lazy(() => { - if (!ctx.refs.has(refPath)) { - throw new Error(`Circular reference not resolved: ${refPath}`); - } - return ctx.refs.get(refPath); + if (isSearch) { + await state.search.key(state.id).schedule(jobOptions, noop4); + } + const req = (isAuth ? state.auth : state.global).key(state.id).schedule(jobOptions, request2, options); + if (isGraphQL) { + const res = await req; + if (res.data.errors != null && res.data.errors.some((error99) => error99.type === "RATE_LIMITED")) { + const error99 = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { + response: res, + data: res.data }); + throw error99; } - ctx.processing.add(refPath); - const resolved = resolveRef3(refPath, ctx); - const zodSchema2 = convertSchema3(resolved, ctx); - ctx.refs.set(refPath, zodSchema2); - ctx.processing.delete(refPath); - return zodSchema2; } - if (schema.enum !== void 0) { - const enumValues = schema.enum; - if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) { - return z3.null(); - } - if (enumValues.length === 0) { - return z3.never(); - } - if (enumValues.length === 1) { - return z3.literal(enumValues[0]); - } - if (enumValues.every((v) => typeof v === "string")) { - return z3.enum(enumValues); - } - const literalSchemas = enumValues.map((v) => z3.literal(v)); - if (literalSchemas.length < 2) { - return literalSchemas[0]; - } - return z3.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]); + return req; +} +function isAuthRequest(method, pathname) { + return method === "PATCH" && // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-a-scoped-access-token + /^\/applications\/[^/]+\/token\/scoped$/.test(pathname) || method === "POST" && // https://docs.github.com/en/rest/apps/oauth-applications?apiVersion=2022-11-28#reset-a-token + (/^\/applications\/[^/]+\/token$/.test(pathname) || // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app + /^\/app\/installations\/[^/]+\/access_tokens$/.test(pathname) || // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps + pathname === "/login/oauth/access_token"); +} +var triggers_notification_paths_default = [ + "/orgs/{org}/invitations", + "/orgs/{org}/invitations/{invitation_id}", + "/orgs/{org}/teams/{team_slug}/discussions", + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "/repos/{owner}/{repo}/collaborators/{username}", + "/repos/{owner}/{repo}/commits/{commit_sha}/comments", + "/repos/{owner}/{repo}/issues", + "/repos/{owner}/{repo}/issues/{issue_number}/comments", + "/repos/{owner}/{repo}/issues/{issue_number}/sub_issue", + "/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority", + "/repos/{owner}/{repo}/pulls", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + "/repos/{owner}/{repo}/pulls/{pull_number}/merge", + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "/repos/{owner}/{repo}/releases", + "/teams/{team_id}/discussions", + "/teams/{team_id}/discussions/{discussion_number}/comments" +]; +function routeMatcher(paths) { + const regexes = paths.map( + (path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + ); + const regex2 = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`; + return new RegExp(regex2, "i"); +} +var regex = routeMatcher(triggers_notification_paths_default); +var triggersNotification = regex.test.bind(regex); +var groups = {}; +var createGroups = function(Bottleneck, common) { + groups.global = new Bottleneck.Group({ + id: "octokit-global", + maxConcurrent: 10, + ...common + }); + groups.auth = new Bottleneck.Group({ + id: "octokit-auth", + maxConcurrent: 1, + ...common + }); + groups.search = new Bottleneck.Group({ + id: "octokit-search", + maxConcurrent: 1, + minTime: 2e3, + ...common + }); + groups.write = new Bottleneck.Group({ + id: "octokit-write", + maxConcurrent: 1, + minTime: 1e3, + ...common + }); + groups.notifications = new Bottleneck.Group({ + id: "octokit-notifications", + maxConcurrent: 1, + minTime: 3e3, + ...common + }); +}; +function throttling(octokit, octokitOptions) { + const { + enabled = true, + Bottleneck = import_light.default, + id = "no-id", + timeout = 1e3 * 60 * 2, + // Redis TTL: 2 minutes + connection + } = octokitOptions.throttle || {}; + if (!enabled) { + return {}; } - if (schema.const !== void 0) { - return z3.literal(schema.const); + const common = { timeout }; + if (typeof connection !== "undefined") { + common.connection = connection; } - const type = schema.type; - if (Array.isArray(type)) { - const typeSchemas = type.map((t) => { - const typeSchema = { ...schema, type: t }; - return convertBaseSchema3(typeSchema, ctx); - }); - if (typeSchemas.length === 0) { - return z3.never(); - } - if (typeSchemas.length === 1) { - return typeSchemas[0]; - } - return z3.union(typeSchemas); + if (groups.global == null) { + createGroups(Bottleneck, common); } - if (!type) { - return z3.any(); + const state = Object.assign( + { + clustering: connection != null, + triggersNotification, + fallbackSecondaryRateRetryAfter: 60, + retryAfterBaseValue: 1e3, + retryLimiter: new Bottleneck(), + id, + ...groups + }, + octokitOptions.throttle + ); + if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { + throw new Error(`octokit/plugin-throttling error: + You must pass the onSecondaryRateLimit and onRateLimit error handlers. + See https://octokit.github.io/rest.js/#throttling + + const octokit = new Octokit({ + throttle: { + onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, + onRateLimit: (retryAfter, options) => {/* ... */} + } + }) + `); } - let zodSchema; - switch (type) { - case "string": { - let stringSchema = z3.string(); - if (schema.format) { - const format2 = schema.format; - if (format2 === "email") { - stringSchema = stringSchema.check(z3.email()); - } else if (format2 === "uri" || format2 === "uri-reference") { - stringSchema = stringSchema.check(z3.url()); - } else if (format2 === "uuid" || format2 === "guid") { - stringSchema = stringSchema.check(z3.uuid()); - } else if (format2 === "date-time") { - stringSchema = stringSchema.check(z3.iso.datetime()); - } else if (format2 === "date") { - stringSchema = stringSchema.check(z3.iso.date()); - } else if (format2 === "time") { - stringSchema = stringSchema.check(z3.iso.time()); - } else if (format2 === "duration") { - stringSchema = stringSchema.check(z3.iso.duration()); - } else if (format2 === "ipv4") { - stringSchema = stringSchema.check(z3.ipv4()); - } else if (format2 === "ipv6") { - stringSchema = stringSchema.check(z3.ipv6()); - } else if (format2 === "mac") { - stringSchema = stringSchema.check(z3.mac()); - } else if (format2 === "cidr") { - stringSchema = stringSchema.check(z3.cidrv4()); - } else if (format2 === "cidr-v6") { - stringSchema = stringSchema.check(z3.cidrv6()); - } else if (format2 === "base64") { - stringSchema = stringSchema.check(z3.base64()); - } else if (format2 === "base64url") { - stringSchema = stringSchema.check(z3.base64url()); - } else if (format2 === "e164") { - stringSchema = stringSchema.check(z3.e164()); - } else if (format2 === "jwt") { - stringSchema = stringSchema.check(z3.jwt()); - } else if (format2 === "emoji") { - stringSchema = stringSchema.check(z3.emoji()); - } else if (format2 === "nanoid") { - stringSchema = stringSchema.check(z3.nanoid()); - } else if (format2 === "cuid") { - stringSchema = stringSchema.check(z3.cuid()); - } else if (format2 === "cuid2") { - stringSchema = stringSchema.check(z3.cuid2()); - } else if (format2 === "ulid") { - stringSchema = stringSchema.check(z3.ulid()); - } else if (format2 === "xid") { - stringSchema = stringSchema.check(z3.xid()); - } else if (format2 === "ksuid") { - stringSchema = stringSchema.check(z3.ksuid()); - } - } - if (typeof schema.minLength === "number") { - stringSchema = stringSchema.min(schema.minLength); - } - if (typeof schema.maxLength === "number") { - stringSchema = stringSchema.max(schema.maxLength); - } - if (schema.pattern) { - stringSchema = stringSchema.regex(new RegExp(schema.pattern)); - } - zodSchema = stringSchema; - break; - } - case "number": - case "integer": { - let numberSchema = type === "integer" ? z3.number().int() : z3.number(); - if (typeof schema.minimum === "number") { - numberSchema = numberSchema.min(schema.minimum); - } - if (typeof schema.maximum === "number") { - numberSchema = numberSchema.max(schema.maximum); - } - if (typeof schema.exclusiveMinimum === "number") { - numberSchema = numberSchema.gt(schema.exclusiveMinimum); - } else if (schema.exclusiveMinimum === true && typeof schema.minimum === "number") { - numberSchema = numberSchema.gt(schema.minimum); - } - if (typeof schema.exclusiveMaximum === "number") { - numberSchema = numberSchema.lt(schema.exclusiveMaximum); - } else if (schema.exclusiveMaximum === true && typeof schema.maximum === "number") { - numberSchema = numberSchema.lt(schema.maximum); - } - if (typeof schema.multipleOf === "number") { - numberSchema = numberSchema.multipleOf(schema.multipleOf); - } - zodSchema = numberSchema; - break; - } - case "boolean": { - zodSchema = z3.boolean(); - break; - } - case "null": { - zodSchema = z3.null(); - break; + const events = {}; + const emitter = new Bottleneck.Events(events); + events.on("secondary-limit", state.onSecondaryRateLimit); + events.on("rate-limit", state.onRateLimit); + events.on( + "error", + (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) + ); + state.retryLimiter.on("failed", async function(error99, info2) { + const [state2, request2, options] = info2.args; + const { pathname } = new URL(options.url, "http://github.test"); + const shouldRetryGraphQL = pathname.startsWith("/graphql") && error99.status !== 401; + if (!(shouldRetryGraphQL || error99.status === 403 || error99.status === 429)) { + return; } - case "object": { - const shape = {}; - const properties = schema.properties || {}; - const requiredSet = new Set(schema.required || []); - for (const [key, propSchema] of Object.entries(properties)) { - const propZodSchema = convertSchema3(propSchema, ctx); - shape[key] = requiredSet.has(key) ? propZodSchema : propZodSchema.optional(); - } - if (schema.propertyNames) { - const keySchema = convertSchema3(schema.propertyNames, ctx); - const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema3(schema.additionalProperties, ctx) : z3.any(); - if (Object.keys(shape).length === 0) { - zodSchema = z3.record(keySchema, valueSchema); - break; - } - const objectSchema2 = z3.object(shape).passthrough(); - const recordSchema = z3.looseRecord(keySchema, valueSchema); - zodSchema = z3.intersection(objectSchema2, recordSchema); - break; - } - if (schema.patternProperties) { - const patternProps = schema.patternProperties; - const patternKeys = Object.keys(patternProps); - const looseRecords = []; - for (const pattern of patternKeys) { - const patternValue = convertSchema3(patternProps[pattern], ctx); - const keySchema = z3.string().regex(new RegExp(pattern)); - looseRecords.push(z3.looseRecord(keySchema, patternValue)); - } - const schemasToIntersect = []; - if (Object.keys(shape).length > 0) { - schemasToIntersect.push(z3.object(shape).passthrough()); - } - schemasToIntersect.push(...looseRecords); - if (schemasToIntersect.length === 0) { - zodSchema = z3.object({}).passthrough(); - } else if (schemasToIntersect.length === 1) { - zodSchema = schemasToIntersect[0]; - } else { - let result = z3.intersection(schemasToIntersect[0], schemasToIntersect[1]); - for (let i = 2; i < schemasToIntersect.length; i++) { - result = z3.intersection(result, schemasToIntersect[i]); - } - zodSchema = result; - } - break; + const retryCount = ~~request2.retryCount; + request2.retryCount = retryCount; + options.request.retryCount = retryCount; + const { wantRetry, retryAfter = 0 } = await (async function() { + if (/\bsecondary rate\b/i.test(error99.message)) { + const retryAfter2 = Number(error99.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; + const wantRetry2 = await emitter.trigger( + "secondary-limit", + retryAfter2, + options, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; } - const objectSchema = z3.object(shape); - if (schema.additionalProperties === false) { - zodSchema = objectSchema.strict(); - } else if (typeof schema.additionalProperties === "object") { - zodSchema = objectSchema.catchall(convertSchema3(schema.additionalProperties, ctx)); - } else { - zodSchema = objectSchema.passthrough(); + if (error99.response.headers != null && error99.response.headers["x-ratelimit-remaining"] === "0" || (error99.response.data?.errors ?? []).some( + (error210) => error210.type === "RATE_LIMITED" + )) { + const rateLimitReset = new Date( + ~~error99.response.headers["x-ratelimit-reset"] * 1e3 + ).getTime(); + const retryAfter2 = Math.max( + // Add one second so we retry _after_ the reset time + // https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#exceeding-the-rate-limit + Math.ceil((rateLimitReset - Date.now()) / 1e3) + 1, + 0 + ); + const wantRetry2 = await emitter.trigger( + "rate-limit", + retryAfter2, + options, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; } - break; + return {}; + })(); + if (wantRetry) { + request2.retryCount++; + return retryAfter * state2.retryAfterBaseValue; } - case "array": { - const prefixItems = schema.prefixItems; - const items = schema.items; - if (prefixItems && Array.isArray(prefixItems)) { - const tupleItems = prefixItems.map((item) => convertSchema3(item, ctx)); - const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema3(items, ctx) : void 0; - if (rest) { - zodSchema = z3.tuple(tupleItems).rest(rest); - } else { - zodSchema = z3.tuple(tupleItems); - } - if (typeof schema.minItems === "number") { - zodSchema = zodSchema.check(z3.minLength(schema.minItems)); - } - if (typeof schema.maxItems === "number") { - zodSchema = zodSchema.check(z3.maxLength(schema.maxItems)); - } - } else if (Array.isArray(items)) { - const tupleItems = items.map((item) => convertSchema3(item, ctx)); - const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema3(schema.additionalItems, ctx) : void 0; - if (rest) { - zodSchema = z3.tuple(tupleItems).rest(rest); - } else { - zodSchema = z3.tuple(tupleItems); - } - if (typeof schema.minItems === "number") { - zodSchema = zodSchema.check(z3.minLength(schema.minItems)); - } - if (typeof schema.maxItems === "number") { - zodSchema = zodSchema.check(z3.maxLength(schema.maxItems)); - } - } else if (items !== void 0) { - const element = convertSchema3(items, ctx); - let arraySchema = z3.array(element); - if (typeof schema.minItems === "number") { - arraySchema = arraySchema.min(schema.minItems); - } - if (typeof schema.maxItems === "number") { - arraySchema = arraySchema.max(schema.maxItems); + }); + octokit.hook.wrap("request", wrapRequest.bind(null, state)); + return {}; +} +throttling.VERSION = VERSION9; +throttling.triggersNotification = triggersNotification; + +// src/octokit.ts +var CustomOctokit = Octokit.plugin(throttling); +function getOctokit(token) { + return new CustomOctokit({ + auth: token, + throttle: { + onRateLimit: (retryAfter, options, _octokit, retryCount) => { + warning( + `Request quota exhausted for request ${options.method} ${options.url}` + ); + if (retryCount < 1) { + info(`Retrying after ${retryAfter} seconds!`); + return true; } - zodSchema = arraySchema; - } else { - zodSchema = z3.array(z3.any()); + }, + onSecondaryRateLimit: (_retryAfter, options) => { + warning( + `SecondaryRateLimit detected for request ${options.method} ${options.url}` + ); } - break; } - default: - throw new Error(`Unsupported type: ${type}`); - } - if (schema.description) { - zodSchema = zodSchema.describe(schema.description); - } - if (schema.default !== void 0) { - zodSchema = zodSchema.default(schema.default); - } - return zodSchema; + }); } -function convertSchema3(schema, ctx) { - if (typeof schema === "boolean") { - return schema ? z3.any() : z3.never(); - } - let baseSchema = convertBaseSchema3(schema, ctx); - const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0; - if (schema.anyOf && Array.isArray(schema.anyOf)) { - const options = schema.anyOf.map((s) => convertSchema3(s, ctx)); - const anyOfUnion = z3.union(options); - baseSchema = hasExplicitType ? z3.intersection(baseSchema, anyOfUnion) : anyOfUnion; - } - if (schema.oneOf && Array.isArray(schema.oneOf)) { - const options = schema.oneOf.map((s) => convertSchema3(s, ctx)); - const oneOfUnion = z3.xor(options); - baseSchema = hasExplicitType ? z3.intersection(baseSchema, oneOfUnion) : oneOfUnion; - } - if (schema.allOf && Array.isArray(schema.allOf)) { - if (schema.allOf.length === 0) { - baseSchema = hasExplicitType ? baseSchema : z3.any(); - } else { - let result = hasExplicitType ? baseSchema : convertSchema3(schema.allOf[0], ctx); - const startIdx = hasExplicitType ? 0 : 1; - for (let i = startIdx; i < schema.allOf.length; i++) { - result = z3.intersection(result, convertSchema3(schema.allOf[i], ctx)); - } - baseSchema = result; - } - } - if (schema.nullable === true && ctx.version === "openapi-3.0") { - baseSchema = z3.nullable(baseSchema); - } - if (schema.readOnly === true) { - baseSchema = z3.readonly(baseSchema); - } - const extraMeta = {}; - const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]; - for (const key of coreMetadataKeys) { - if (key in schema) { - extraMeta[key] = schema[key]; - } - } - const contentMetadataKeys = ["contentEncoding", "contentMediaType", "contentSchema"]; - for (const key of contentMetadataKeys) { - if (key in schema) { - extraMeta[key] = schema[key]; + +// src/post.ts +var RUNNER_TIMEOUT_SEC = 6 * 60 * 60 - 30; +async function post(pr, octokit) { + const tfInstance = getInput("api_url"); + const tfRequestId = getTfRequestId(); + const tfArtifactUrl = getTfArtifactUrl(); + const parsedTimeout = timeoutSchema.safeParse(getInput("timeout")); + let timeout = parsedTimeout.success ? parsedTimeout.data * 2 : 960; + const jobsData = (await octokit.request( + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + { + // use Custom Context to take into account `repo_owner` and `repo_name` inputs + ...pr.context.repo, + run_id: context2.runId } - } - for (const key of Object.keys(schema)) { - if (!RECOGNIZED_KEYS3.has(key)) { - extraMeta[key] = schema[key]; + )).data; + const tooLongRunningJob = jobsData.jobs.find((job) => { + job.status === "in_progress" && job.steps?.some((step) => step.conclusion === "cancelled") && getJobRunningTime(job.started_at) >= RUNNER_TIMEOUT_SEC; + }); + if (tooLongRunningJob) { + notice( + `Job ${tooLongRunningJob.name} is running for too long. Workflow run is going to be canceled by GitHub Actions Public Runner. For more information see: https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration#usage-limits` + ); + if (timeout > RUNNER_TIMEOUT_SEC / 60) { + notice( + `Testing Farm request won't be cancelled, because the timeout is set to ${timeout} minutes. Results can be accessed at ${tfArtifactUrl}.` + ); + return; } } - if (Object.keys(extraMeta).length > 0) { - ctx.registry.add(baseSchema, extraMeta); - } - return baseSchema; -} -function fromJSONSchema3(schema, params) { - if (typeof schema === "boolean") { - return schema ? z3.any() : z3.never(); + const api = new TestingFarmAPI(tfInstance); + if (!tfRequestId) { + throw new Error("POST: Missing Testing Farm request id"); } - const version22 = detectVersion3(schema, params?.defaultTarget); - const defs = schema.$defs || schema.definitions || {}; - const ctx = { - version: version22, - defs, - refs: /* @__PURE__ */ new Map(), - processing: /* @__PURE__ */ new Set(), - rootSchema: schema, - registry: params?.registry ?? globalRegistry3 + const request2 = { + api_key: getInput("api_key", { required: true }) }; - return convertSchema3(schema, ctx); -} -var coerce_exports3 = {}; -__export2(coerce_exports3, { - bigint: () => bigint32, - boolean: () => boolean32, - date: () => date42, - number: () => number32, - string: () => string32 -}); -function string32(params) { - return /* @__PURE__ */ _coercedString3(ZodString3, params); -} -function number32(params) { - return /* @__PURE__ */ _coercedNumber3(ZodNumber3, params); -} -function boolean32(params) { - return /* @__PURE__ */ _coercedBoolean3(ZodBoolean3, params); -} -function bigint32(params) { - return /* @__PURE__ */ _coercedBigint3(ZodBigInt3, params); + notice(`Cancelling Testing Farm request: ${tfRequestId}`); + await api.cancelRequest(tfRequestId, request2, false); + debug(`Request ${tfRequestId} was cancelled`); + pr.isInitialized() && await pr.setStatus( + "success", + "Testing Farm request was cancelled", + tfArtifactUrl ?? void 0 + ); } -function date42(params) { - return /* @__PURE__ */ _coercedDate3(ZodDate3, params); +function getJobRunningTime(startedAt) { + const started = new Date(startedAt); + const now = /* @__PURE__ */ new Date(); + const diff = (now.getTime() - started.getTime()) / 1e3; + notice(`Job is running for ${diff} seconds`); + return diff; } -config3(en_default3()); -var idSchema = external_exports3.string().min(1); -var metadataSchema = external_exports3.object({ - template: external_exports3.object({ - before: external_exports3.string(), - after: external_exports3.string() - }), - id: external_exports3.string() -}); -var requestDetailsSchema2 = external_exports3.object({ - owner: external_exports3.string().min(1), - repo: external_exports3.string().min(1), - headers: external_exports3.object({ - authorization: external_exports3.string().min(1) - }) -}); -var metadataObjectSchema = external_exports3.record( - external_exports3.string(), - external_exports3.union([ - external_exports3.string(), - external_exports3.array(external_exports3.string()), - external_exports3.array(external_exports3.record(external_exports3.string(), external_exports3.any())) - ]) -); -var MetadataController = class { - constructor(uniqueID, settings) { - const verifiedID = idSchema.parse(uniqueID); - this.requestDefaults = requestDetailsSchema2.parse(settings); - this.schema = { - id: verifiedID, - template: { - before: "" - } - }; - this.regexp = new RegExp( - `^${this.schema.template.before}${verifiedID} = (.*)${this.schema.template.after}$`, - "m" - ); - } - async getMetadata(issue22, key) { - const body = (await request2("GET /repos/{owner}/{repo}/issues/{issue_number}", { - ...this.requestDefaults, - issue_number: issue22 - })).data.body || ""; - return parseMetadata(body, key, this.regexp); - } - async setMetadata(issue22, key, value) { - let issueBody = (await request2("GET /repos/{owner}/{repo}/issues/{issue_number}", { - ...this.requestDefaults, - issue_number: issue22 - })).data.body || ""; - let { body, metadata } = getBodyAndMetadata(issueBody, this.regexp); - const parsedMetadata = metadataObjectSchema.parse(metadata); - const newMetadata = assignNewMetadata(parsedMetadata, key, value); - if (JSON.stringify(parsedMetadata) === JSON.stringify(newMetadata)) { - return newMetadata; - } - const trimmedBody = body.trim(); - await request2("PATCH /repos/{owner}/{repo}/issues/{issue_number}", { - ...this.requestDefaults, - issue_number: issue22, - body: `${trimmedBody} +var post_default = post; -${this.schema.template.before}${this.schema.id} = ${JSON.stringify(newMetadata)}${this.schema.template.after}` - }); - return newMetadata; - } -}; +// src/metadata.ts +var import_issue_metadata = __toESM(require_dist2(), 1); // src/schema/metadata.ts var commentIdKey = "comment-id"; @@ -85280,7 +75633,7 @@ var Metadata = class _Metadata { this.lock = metadata.lock; } static async getMetadata(issueNumber, context3) { - const controller = new MetadataController(_Metadata.metadataKey, { + const controller = new import_issue_metadata.default(_Metadata.metadataKey, { ...context3.repo, headers: { authorization: `Bearer ${getInput("github_token", { required: true })}` @@ -85300,8 +75653,8 @@ var Metadata = class _Metadata { // src/pull-request.ts var PullRequest = class { - constructor(number8, sha, context3, octokit, metadata) { - this.number = number8; + constructor(number7, sha, context3, octokit, metadata) { + this.number = number7; this.sha = sha; this.context = context3; this.octokit = octokit; @@ -85316,7 +75669,7 @@ var PullRequest = class { * @param description - The description of the status * @param url - The URL to link to from the status */ - async setStatus(state, description, url5) { + async setStatus(state, description, url4) { const usePullRequestStatuses = getBooleanInput( "update_pull_request_status" ); @@ -85338,7 +75691,7 @@ var PullRequest = class { state, context: `Testing Farm - ${getInput("pull_request_status_name")}`, description: description ? description.slice(0, 140) : description, - target_url: url5 + target_url: url4 } ); debug( @@ -85468,16 +75821,16 @@ async function run() { } else { await post_default(pr, octokit); } - } catch (error100) { + } catch (error99) { let message2; - if (error100 instanceof Error) { - message2 = error100.message; + if (error99 instanceof Error) { + message2 = error99.message; } else { - message2 = JSON.stringify(error100); + message2 = JSON.stringify(error99); } if (pr && pr.isInitialized()) { - const url5 = error100 instanceof TFError ? error100.url : void 0; - await pr.setStatus("error", `${message2}`, url5); + const url4 = error99 instanceof TFError ? error99.url : void 0; + await pr.setStatus("error", `${message2}`, url4); } setFailed(message2); } @@ -85525,15 +75878,4 @@ content-type/dist/index.js: @octokit/request/dist-bundle/index.js: (* v8 ignore next -- @preserve *) (* v8 ignore else -- @preserve *) - -issue-metadata/dist/index.js: - (*! Bundled license information: - - @octokit/request-error/dist-src/index.js: - (* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *) - - @octokit/request/dist-bundle/index.js: - (* v8 ignore next -- @preserve *) - (* v8 ignore else -- @preserve *) - *) */ diff --git a/package.json b/package.json index 6c92874..73162b6 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "@octokit/rest": "22.0.1", "@octokit/types": "16.0.0", "date-fns": "^4.4.0", - "issue-metadata": "0.3.0", + "issue-metadata": "0.2.4", "testing-farm": "1.12.1", "zod": "4.4.3" }, diff --git a/yarn.lock b/yarn.lock index 0c8e039..e66a36e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -404,6 +404,16 @@ __metadata: languageName: node linkType: hard +"@octokit/endpoint@npm:^10.1.4": + version: 10.1.4 + resolution: "@octokit/endpoint@npm:10.1.4" + dependencies: + "@octokit/types": "npm:^14.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/b6f2305fcad33c5756d540972f20822eda7838df80e0a683b4cd8e6dc47edf90ca6fc723423848d029739c57eaf38e68e4d1133482935aaa085609037c0b82fb + languageName: node + linkType: hard + "@octokit/endpoint@npm:^11.0.3": version: 11.0.3 resolution: "@octokit/endpoint@npm:11.0.3" @@ -425,6 +435,13 @@ __metadata: languageName: node linkType: hard +"@octokit/openapi-types@npm:^25.1.0": + version: 25.1.0 + resolution: "@octokit/openapi-types@npm:25.1.0" + checksum: 10/91989a4cec12250e6b3226e9aa931c05c27d46a946725d01e6a831af3890f157210a7032f07641a156c608cc6bf6cf55a28f07179910b644966358d6d559dec6 + languageName: node + linkType: hard + "@octokit/openapi-types@npm:^27.0.0": version: 27.0.0 resolution: "@octokit/openapi-types@npm:27.0.0" @@ -475,6 +492,15 @@ __metadata: languageName: node linkType: hard +"@octokit/request-error@npm:^6.1.8": + version: 6.1.8 + resolution: "@octokit/request-error@npm:6.1.8" + dependencies: + "@octokit/types": "npm:^14.0.0" + checksum: 10/9354d9f6d95147fce0ab90d4a60d1a9b78a382876634d9504e49b3a077eb2857f92bef3aede2d9a6235e65ce9bbe93d72e4e99012e0a307bad6d23d637dfa802 + languageName: node + linkType: hard + "@octokit/request-error@npm:^7.0.2, @octokit/request-error@npm:^7.1.0": version: 7.1.0 resolution: "@octokit/request-error@npm:7.1.0" @@ -484,7 +510,7 @@ __metadata: languageName: node linkType: hard -"@octokit/request@npm:^10.0.6, @octokit/request@npm:^10.0.7, @octokit/request@npm:^10.0.8": +"@octokit/request@npm:^10.0.6, @octokit/request@npm:^10.0.7": version: 10.0.10 resolution: "@octokit/request@npm:10.0.10" dependencies: @@ -498,6 +524,19 @@ __metadata: languageName: node linkType: hard +"@octokit/request@npm:^9.2.2": + version: 9.2.4 + resolution: "@octokit/request@npm:9.2.4" + dependencies: + "@octokit/endpoint": "npm:^10.1.4" + "@octokit/request-error": "npm:^6.1.8" + "@octokit/types": "npm:^14.0.0" + fast-content-type-parse: "npm:^2.0.0" + universal-user-agent: "npm:^7.0.2" + checksum: 10/d640f45490da55ce77887f72e6e82e75606cc6b3ebd1d8f8f211f68aa96a41dc679898f1915195f24ff68b1c72c0e0148b31a35e6d202ee9de7173b9fc8ac0df + languageName: node + linkType: hard + "@octokit/rest@npm:22.0.1": version: 22.0.1 resolution: "@octokit/rest@npm:22.0.1" @@ -519,6 +558,15 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^14.0.0": + version: 14.1.0 + resolution: "@octokit/types@npm:14.1.0" + dependencies: + "@octokit/openapi-types": "npm:^25.1.0" + checksum: 10/ea5549ca6176bd1184427141a77bca88c68f07d252d3ea1db7f9b58ec16b66391218a75a99927efb1e36a2cb00e8ed37a79b71fdc95a1117a9982516156fd997 + languageName: node + linkType: hard + "@oxc-project/types@npm:=0.133.0": version: 0.133.0 resolution: "@oxc-project/types@npm:0.133.0" @@ -1182,6 +1230,13 @@ __metadata: languageName: node linkType: hard +"fast-content-type-parse@npm:^2.0.0": + version: 2.0.1 + resolution: "fast-content-type-parse@npm:2.0.1" + checksum: 10/ec361f5b79254259dadc8192005ceaa54789e63779f144ec3033bd54710f7cb666d47528aa0b12ea29da13f812a0c5f78ce7bc7d779f400bc612f2c65a5972d5 + languageName: node + linkType: hard + "fdir@npm:^6.5.0": version: 6.5.0 resolution: "fdir@npm:6.5.0" @@ -1341,13 +1396,13 @@ __metadata: languageName: node linkType: hard -"issue-metadata@npm:0.3.0": - version: 0.3.0 - resolution: "issue-metadata@npm:0.3.0" +"issue-metadata@npm:0.2.4": + version: 0.2.4 + resolution: "issue-metadata@npm:0.2.4" dependencies: - "@octokit/request": "npm:^10.0.8" - zod: "npm:^4.3.6" - checksum: 10/c1379145cdbaf318c6008d7eea42885c2f2252baba09b226a0daca0bdd1e69386213d9ca960cc8eeac632e00bce70eb0070a82acf4778d0634d566109253b90b + "@octokit/request": "npm:^9.2.2" + zod: "npm:^3.24.2" + checksum: 10/e10f5f69eeaacdc570bb45415085132ad375fedf6f88ee70920ea67ead72da753e610c394ce8b255afbde753b2e3d0a79f31afec2f4e49c1661d563b09aacb21 languageName: node linkType: hard @@ -1822,7 +1877,7 @@ __metadata: "@vitest/coverage-v8": "npm:4.1.8" date-fns: "npm:^4.4.0" esbuild: "npm:^0.28.0" - issue-metadata: "npm:0.3.0" + issue-metadata: "npm:0.2.4" prettier: "npm:3.8.4" testing-farm: "npm:1.12.1" ts-node: "npm:10.9.2" @@ -2142,9 +2197,16 @@ __metadata: languageName: node linkType: hard -"zod@npm:4.4.3, zod@npm:^4.3.6": +"zod@npm:4.4.3": version: 4.4.3 resolution: "zod@npm:4.4.3" checksum: 10/804b9a42aa8f35f2b3c5a8dff906291cb749115f83ee2afe3576d70b5b5c53c965365c7f4967690647a9c54af9838ff232a85ff9577a0a36c44b68bc6cdefe36 languageName: node linkType: hard + +"zod@npm:^3.24.2": + version: 3.25.76 + resolution: "zod@npm:3.25.76" + checksum: 10/f0c963ec40cd96858451d1690404d603d36507c1fc9682f2dae59ab38b578687d542708a7fdbf645f77926f78c9ed558f57c3d3aa226c285f798df0c4da16995 + languageName: node + linkType: hard