From 6716183068de82aed7618688d50aa4f76aff6e0a Mon Sep 17 00:00:00 2001 From: Shawn Morreau Date: Wed, 17 Dec 2025 11:29:27 -0500 Subject: [PATCH] Fix MCP file discovery errors (#9) * fix tool errors *QA --- agents/instructions.ts | 2 + entry | 14207 ++++++++++++++++++--------------------- mcp/checkout.ts | 151 +- mcp/files.ts | 80 +- mcp/server.ts | 2 + modes.ts | 2 +- utils/setup.ts | 24 +- 7 files changed, 6909 insertions(+), 7559 deletions(-) diff --git a/agents/instructions.ts b/agents/instructions.ts index a63bfc0..3d4b07d 100644 --- a/agents/instructions.ts +++ b/agents/instructions.ts @@ -242,6 +242,8 @@ Tool names may be formatted as \`(server name)/(tool name)\`, for example: \`${g ` **Do not attempt to configure git credentials manually** - the ${ghPullfrogMcpName} server handles all authentication internally. +**Efficiency**: Trust the tools - do not repeatedly verify file contents or git status after operations. If a tool reports success, proceed to the next step. Only verify if you encounter an actual error. + **Commenting style**: When posting comments via ${ghPullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionableβ€”do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question." **If you get stuck**: If you cannot complete a task due to missing information, ambiguity, or an unrecoverable error: diff --git a/entry b/entry index a55b350..dca9627 100755 --- a/entry +++ b/entry @@ -110,10 +110,10 @@ var require_command = __commonJS({ process.stdout.write(cmd.toString() + os2.EOL); } exports.issueCommand = issueCommand; - function issue3(name, message = "") { + function issue2(name, message = "") { issueCommand(name, {}, message); } - exports.issue = issue3; + exports.issue = issue2; var CMD_STRING = "::"; var Command = class { constructor(command, properties, message) { @@ -431,18 +431,18 @@ var require_tunnel = __commonJS({ res.statusCode ); socket.destroy(); - var error42 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error42.code = "ECONNRESET"; - options.request.emit("error", error42); + var error41 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error41.code = "ECONNRESET"; + options.request.emit("error", error41); self2.removeSocket(placeholder); return; } if (head.length > 0) { debug2("got illegal response body from proxy"); socket.destroy(); - var error42 = new Error("got illegal response body from proxy"); - error42.code = "ECONNRESET"; - options.request.emit("error", error42); + var error41 = new Error("got illegal response body from proxy"); + error41.code = "ECONNRESET"; + options.request.emit("error", error41); self2.removeSocket(placeholder); return; } @@ -457,9 +457,9 @@ var require_tunnel = __commonJS({ cause.message, cause.stack ); - var error42 = new Error("tunneling socket could not be established, cause=" + cause.message); - error42.code = "ECONNRESET"; - options.request.emit("error", error42); + var error41 = new Error("tunneling socket could not be established, cause=" + cause.message); + error41.code = "ECONNRESET"; + options.request.emit("error", error41); self2.removeSocket(placeholder); } }; @@ -4031,8 +4031,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; + const promise = new Promise((resolve2, reject) => { + res = resolve2; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -5536,8 +5536,8 @@ Content-Type: ${value2.type || "application/octet-stream"}\r }); } }); - const busboyResolve = new Promise((resolve, reject) => { - busboy.on("finish", resolve); + const busboyResolve = new Promise((resolve2, reject) => { + busboy.on("finish", resolve2); busboy.on("error", (err) => reject(new TypeError(err))); }); if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk); @@ -5587,7 +5587,7 @@ Content-Type: ${value2.type || "application/octet-stream"}\r throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); - const errorSteps = (error42) => promise.reject(error42); + const errorSteps = (error41) => promise.reject(error41); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -5873,16 +5873,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error42) { + onError(error41) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error42 }); + channels.error.publish({ request: this, error: error41 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error42); + return this[kHandler].onError(error41); } onFinally() { if (this.errorHandler) { @@ -6071,9 +6071,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -6111,12 +6111,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve(data); + ) : resolve2(data); }); }); } @@ -6254,14 +6254,14 @@ 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: hostname3, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname2, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { if (!tls) { tls = __require("tls"); } servername = servername || options.servername || util3.getServerName(host) || null; - const sessionKey = servername || hostname3; + const sessionKey = servername || hostname2; const session = sessionCache.get(sessionKey) || null; assert2(sessionKey); socket = tls.connect({ @@ -6276,7 +6276,7 @@ var require_connect = __commonJS({ socket: httpSocket, // upgrade socket connection port: port || 443, - host: hostname3 + host: hostname2 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); @@ -6289,7 +6289,7 @@ var require_connect = __commonJS({ ...options, localAddress, port: port || 80, - host: hostname3 + host: hostname2 }); } if (options.keepAlive == null || options.keepAlive) { @@ -6745,8 +6745,8 @@ var require_RedirectHandler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error42) { - this.handler.onError(error42); + onError(error41) { + this.handler.onError(error41); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -7176,16 +7176,16 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve) => { + return new Promise((resolve2) => { if (!this[kSize]) { - resolve(null); + resolve2(null); } else { - this[kClosedResolve] = resolve; + this[kClosedResolve] = resolve2; } }); } async [kDestroy](err) { - return new Promise((resolve) => { + return new Promise((resolve2) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -7196,7 +7196,7 @@ var require_client = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve(); + resolve2(); }; if (this[kHTTP2Session] != null) { util3.destroy(this[kHTTP2Session], err); @@ -7753,20 +7753,20 @@ var require_client = __commonJS({ async function connect(client) { assert2(!client[kConnecting]); assert2(!client[kSocket]); - let { host, hostname: hostname3, protocol, port } = client[kUrl]; - if (hostname3[0] === "[") { - const idx = hostname3.indexOf("]"); + let { host, hostname: hostname2, protocol, port } = client[kUrl]; + if (hostname2[0] === "[") { + const idx = hostname2.indexOf("]"); assert2(idx !== -1); - const ip2 = hostname3.substring(1, idx); + const ip2 = hostname2.substring(1, idx); assert2(net.isIP(ip2)); - hostname3 = ip2; + hostname2 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname3, + hostname: hostname2, protocol, port, servername: client[kServerName], @@ -7776,10 +7776,10 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve, reject) => { + const socket = await new Promise((resolve2, reject) => { client[kConnector]({ host, - hostname: hostname3, + hostname: hostname2, protocol, port, servername: client[kServerName], @@ -7788,7 +7788,7 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve(socket2); + resolve2(socket2); } }); }); @@ -7843,7 +7843,7 @@ var require_client = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname3, + hostname: hostname2, protocol, port, servername: client[kServerName], @@ -7863,7 +7863,7 @@ var require_client = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname3, + hostname: hostname2, protocol, port, servername: client[kServerName], @@ -8412,12 +8412,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve, reject) => { + const waitForDrain = () => new Promise((resolve2, reject) => { assert2(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve; + callback = resolve2; } }); if (client[kHTTPConnVersion] === "h2") { @@ -8762,8 +8762,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { return Promise.all(this[kClients].map((c) => c.close())); } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve; + return new Promise((resolve2) => { + this[kClosedResolve] = resolve2; }); } } @@ -8887,7 +8887,7 @@ var require_pool = __commonJS({ this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error42) => { + this.on("connectionError", (origin2, targets, error41) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -9341,7 +9341,7 @@ var require_readable = __commonJS({ if (this.closed) { return Promise.resolve(null); } - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { const signalListenerCleanup = signal ? util3.addAbortListener(signal, () => { this.destroy(); }) : noop3; @@ -9350,7 +9350,7 @@ var require_readable = __commonJS({ if (signal && signal.aborted) { reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); } else { - resolve(null); + resolve2(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -9372,11 +9372,11 @@ var require_readable = __commonJS({ throw new TypeError("unusable"); } assert2(!stream[kConsume]); - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { stream[kConsume] = { type: type2, stream, - resolve, + resolve: resolve2, reject, length: 0, body: [] @@ -9411,12 +9411,12 @@ var require_readable = __commonJS({ } } function consumeEnd(consume2) { - const { type: type2, body, resolve, stream, length } = consume2; + const { type: type2, body, resolve: resolve2, stream, length } = consume2; try { if (type2 === "text") { - resolve(toUSVString(Buffer.concat(body))); + resolve2(toUSVString(Buffer.concat(body))); } else if (type2 === "json") { - resolve(JSON.parse(Buffer.concat(body))); + resolve2(JSON.parse(Buffer.concat(body))); } else if (type2 === "arrayBuffer") { const dst = new Uint8Array(length); let pos = 0; @@ -9424,12 +9424,12 @@ var require_readable = __commonJS({ dst.set(buf, pos); pos += buf.byteLength; } - resolve(dst.buffer); + resolve2(dst.buffer); } else if (type2 === "blob") { if (!Blob2) { Blob2 = __require("buffer").Blob; } - resolve(new Blob2(body, { type: stream[kContentType] })); + resolve2(new Blob2(body, { type: stream[kContentType] })); } consumeFinish(consume2); } catch (err) { @@ -9684,9 +9684,9 @@ var require_api_request = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -9859,9 +9859,9 @@ var require_api_stream = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -10142,9 +10142,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -10233,9 +10233,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -10367,10 +10367,10 @@ var require_mock_utils = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone3 = headers.slice(); + const clone2 = headers.slice(); const entries = []; - for (let index = 0; index < clone3.length; index += 2) { - entries.push([clone3[index], clone3[index + 1]]); + for (let index = 0; index < clone2.length; index += 2) { + entries.push([clone2[index], clone2[index + 1]]); } return Object.fromEntries(entries); } @@ -10496,13 +10496,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: error42 }, delay: delay2, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error41 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error42 !== null) { + if (error41 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error42); + handler2.onError(error41); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -10540,19 +10540,19 @@ var require_mock_utils = __commonJS({ if (agent2.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error42) { - if (error42 instanceof MockNotMatchedError) { + } catch (error41) { + if (error41 instanceof MockNotMatchedError) { const netConnect = agent2[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error42; + throw error41; } } } else { @@ -10715,11 +10715,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error42) { - if (typeof error42 === "undefined") { + replyWithError(error41) { + if (typeof error41 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error42 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error41 }); return new MockScope(newMockDispatch); } /** @@ -13046,17 +13046,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error42) { + abort(error41) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error42) { - error42 = new DOMException2("The operation was aborted.", "AbortError"); + if (!error41) { + error41 = new DOMException2("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error42; - this.connection?.destroy(error42); - this.emit("terminated", error42); + this.serializedAbortReason = error41; + this.connection?.destroy(error41); + this.emit("terminated", error41); } }; function fetch3(input, init = {}) { @@ -13160,13 +13160,13 @@ var require_fetch = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p, request2, responseObject, error42) { - if (!error42) { - error42 = new DOMException2("The operation was aborted.", "AbortError"); + function abortFetch(p, request2, responseObject, error41) { + if (!error41) { + error41 = new DOMException2("The operation was aborted.", "AbortError"); } - p.reject(error42); + p.reject(error41); if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error42).catch((err) => { + request2.body.stream.cancel(error41).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13178,7 +13178,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error42).catch((err) => { + response.body.stream.cancel(error41).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13857,7 +13857,7 @@ var require_fetch = __commonJS({ async function dispatch({ body }) { const url2 = requestCurrentURL(request2); const agent2 = fetchParams.controller.dispatcher; - return new Promise((resolve, reject) => agent2.dispatch( + return new Promise((resolve2, reject) => agent2.dispatch( { path: url2.pathname + url2.search, origin: url2.origin, @@ -13933,7 +13933,7 @@ var require_fetch = __commonJS({ } } } - resolve({ + resolve2({ status, statusText, headersList: headers[kHeadersList], @@ -13958,13 +13958,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error42) { + onError(error41) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error42); - fetchParams.controller.terminate(error42); - reject(error42); + this.body?.destroy(error41); + fetchParams.controller.terminate(error41); + reject(error41); }, onUpgrade(status, headersList, socket) { if (status !== 101) { @@ -13976,7 +13976,7 @@ var require_fetch = __commonJS({ const val = headersList[n + 1].toString("latin1"); headers[kHeadersList].append(key, val); } - resolve({ + resolve2({ status, statusText: STATUS_CODES[status], headersList: headers[kHeadersList], @@ -14430,8 +14430,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error42) { - fr[kError] = error42; + } catch (error41) { + fr[kError] = error41; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14440,13 +14440,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error42) { + } catch (error41) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error42; + fr[kError] = error41; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -14494,7 +14494,7 @@ var require_util4 = __commonJS({ if (encoding === "failure") { encoding = "UTF-8"; } - return decode2(bytes, encoding); + return decode(bytes, encoding); } case "ArrayBuffer": { const sequence = combineByteSequences(bytes); @@ -14511,7 +14511,7 @@ var require_util4 = __commonJS({ } } } - function decode2(ioQueue, encoding) { + function decode(ioQueue, encoding) { const bytes = combineByteSequences(ioQueue); const BOMEncoding = BOMSniffing(bytes); let slice = 0; @@ -15550,9 +15550,9 @@ var require_util6 = __commonJS({ throw new Error("Invalid cookie domain"); } } - function toIMFDate(date4) { - if (typeof date4 === "number") { - date4 = new Date(date4); + function toIMFDate(date2) { + if (typeof date2 === "number") { + date2 = new Date(date2); } const days = [ "Sun", @@ -15577,13 +15577,13 @@ var require_util6 = __commonJS({ "Nov", "Dec" ]; - const dayName = days[date4.getUTCDay()]; - const day = date4.getUTCDate().toString().padStart(2, "0"); - const month = months2[date4.getUTCMonth()]; - const year = date4.getUTCFullYear(); - const hour = date4.getUTCHours().toString().padStart(2, "0"); - const minute = date4.getUTCMinutes().toString().padStart(2, "0"); - const second = date4.getUTCSeconds().toString().padStart(2, "0"); + const dayName = days[date2.getUTCDay()]; + const day = date2.getUTCDate().toString().padStart(2, "0"); + const month = months2[date2.getUTCMonth()]; + const year = date2.getUTCFullYear(); + const hour = date2.getUTCHours().toString().padStart(2, "0"); + const minute = date2.getUTCMinutes().toString().padStart(2, "0"); + const second = date2.getUTCSeconds().toString().padStart(2, "0"); return `${dayName}, ${day} ${month} ${year} ${hour}:${minute}:${second} GMT`; } function validateCookieMaxAge(maxAge) { @@ -16446,11 +16446,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error42) { + function onSocketError(error41) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error42); + channels.socketError.publish(error41); } this.destroy(); } @@ -17330,11 +17330,11 @@ var require_lib = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -17350,7 +17350,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -17436,26 +17436,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve(output.toString()); + resolve2(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve2) => __awaiter(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve(Buffer.concat(chunks)); + resolve2(Buffer.concat(chunks)); }); })); }); @@ -17664,14 +17664,14 @@ var require_lib = __commonJS({ */ requestRaw(info2, data) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve(res); + resolve2(res); } } this.requestRawWithCallback(info2, data, callbackForResult); @@ -17853,12 +17853,12 @@ var require_lib = __commonJS({ return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve) => setTimeout(() => resolve(), ms)); + return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); }); } _processResponse(res, options) { return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17866,7 +17866,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve(response); + resolve2(response); } function dateTimeDeserializer(key, value2) { if (typeof value2 === "string") { @@ -17905,7 +17905,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve(response); + resolve2(response); } })); }); @@ -17922,11 +17922,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -17942,7 +17942,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18026,11 +18026,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -18046,7 +18046,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18082,12 +18082,12 @@ var require_oidc_utils = __commonJS({ var _a; return __awaiter(this, void 0, void 0, function* () { const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error42) => { + const res = yield httpclient.getJson(id_token_url).catch((error41) => { throw new Error(`Failed to get ID Token. - Error Code : ${error42.statusCode} + Error Code : ${error41.statusCode} - Error Message: ${error42.message}`); + Error Message: ${error41.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { @@ -18108,8 +18108,8 @@ var require_oidc_utils = __commonJS({ const id_token = yield _OidcClient.getCall(id_token_url); (0, core_1.setSecret)(id_token); return id_token; - } catch (error42) { - throw new Error(`Error message: ${error42.message}`); + } catch (error41) { + throw new Error(`Error message: ${error41.message}`); } }); } @@ -18124,11 +18124,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -18144,7 +18144,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18490,11 +18490,11 @@ var require_io_util = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -18510,7 +18510,7 @@ var require_io_util = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18663,11 +18663,11 @@ var require_io = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -18683,7 +18683,7 @@ var require_io = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18911,11 +18911,11 @@ var require_toolrunner = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -18931,7 +18931,7 @@ var require_toolrunner = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19159,7 +19159,7 @@ var require_toolrunner = __commonJS({ this.toolPath = path4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve2, reject) => __awaiter(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19231,7 +19231,7 @@ var require_toolrunner = __commonJS({ this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); state.CheckComplete(); }); - state.on("done", (error42, exitCode) => { + state.on("done", (error41, exitCode) => { if (stdbuffer.length > 0) { this.emit("stdline", stdbuffer); } @@ -19239,10 +19239,10 @@ var require_toolrunner = __commonJS({ this.emit("errline", errbuffer); } cp.removeAllListeners(); - if (error42) { - reject(error42); + if (error41) { + reject(error41); } else { - resolve(exitCode); + resolve2(exitCode); } }); if (this.options.input) { @@ -19335,14 +19335,14 @@ var require_toolrunner = __commonJS({ this.emit("debug", message); } _setResult() { - let error42; + let error41; if (this.processExited) { if (this.processError) { - error42 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + error41 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error42 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + error41 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); } else if (this.processStderr && this.options.failOnStdErr) { - error42 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + error41 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } } if (this.timeout) { @@ -19350,7 +19350,7 @@ var require_toolrunner = __commonJS({ this.timeout = null; } this.done = true; - this.emit("done", error42, this.processExitCode); + this.emit("done", error41, this.processExitCode); } static HandleTimeout(state) { if (state.done) { @@ -19395,11 +19395,11 @@ var require_exec = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -19415,7 +19415,7 @@ var require_exec = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19506,11 +19506,11 @@ var require_platform = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -19526,7 +19526,7 @@ var require_platform = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19539,7 +19539,7 @@ var require_platform = __commonJS({ var os_1 = __importDefault(__require("os")); var exec = __importStar(require_exec()); var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout: version3 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + const { stdout: version2 } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { @@ -19547,7 +19547,7 @@ var require_platform = __commonJS({ }); return { name: name.trim(), - version: version3.trim() + version: version2.trim() }; }); var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { @@ -19555,21 +19555,21 @@ var require_platform = __commonJS({ const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { silent: true }); - const version3 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; + const version2 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; return { name, - version: version3 + version: version2 }; }); var getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); - const [name, version3] = stdout.trim().split("\n"); + const [name, version2] = stdout.trim().split("\n"); return { name, - version: version3 + version: version2 }; }); exports.platform = os_1.default.platform(); @@ -19625,11 +19625,11 @@ var require_core = __commonJS({ }; var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value2) { - return value2 instanceof P ? value2 : new P(function(resolve) { - resolve(value2); + return value2 instanceof P ? value2 : new P(function(resolve2) { + resolve2(value2); }); } - return new (P || (P = Promise))(function(resolve, reject) { + return new (P || (P = Promise))(function(resolve2, reject) { function fulfilled(value2) { try { step(generator.next(value2)); @@ -19645,7 +19645,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19733,7 +19733,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); exports.setCommandEcho = setCommandEcho; function setFailed2(message) { process.exitCode = ExitCode.Failure; - error42(message); + error41(message); } exports.setFailed = setFailed2; function isDebug() { @@ -19744,10 +19744,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); (0, command_1.issueCommand)("debug", {}, message); } exports.debug = debug2; - function error42(message, properties = {}) { + function error41(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } - exports.error = error42; + exports.error = error41; function warning2(message, properties = {}) { (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } @@ -19840,7 +19840,7 @@ var require_strip_ansi = __commonJS({ "../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports, module) { "use strict"; var ansiRegex = require_ansi_regex(); - module.exports = (string4) => typeof string4 === "string" ? string4.replace(ansiRegex(), "") : string4; + module.exports = (string3) => typeof string3 === "string" ? string3.replace(ansiRegex(), "") : string3; } }); @@ -19894,18 +19894,18 @@ var require_string_width = __commonJS({ var stripAnsi = require_strip_ansi(); var isFullwidthCodePoint = require_is_fullwidth_code_point(); var emojiRegex5 = require_emoji_regex(); - var stringWidth = (string4) => { - if (typeof string4 !== "string" || string4.length === 0) { + var stringWidth = (string3) => { + if (typeof string3 !== "string" || string3.length === 0) { return 0; } - string4 = stripAnsi(string4); - if (string4.length === 0) { + string3 = stripAnsi(string3); + if (string3.length === 0) { return 0; } - string4 = string4.replace(emojiRegex5(), " "); + string3 = string3.replace(emojiRegex5(), " "); let width = 0; - for (let i = 0; i < string4.length; i++) { - const code = string4.codePointAt(i); + for (let i = 0; i < string3.length; i++) { + const code = string3.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } @@ -20570,9 +20570,9 @@ var require_conversions = __commonJS({ return [r, g, b]; }; convert.rgb.hex = function(args3) { - const integer4 = ((Math.round(args3[0]) & 255) << 16) + ((Math.round(args3[1]) & 255) << 8) + (Math.round(args3[2]) & 255); - const string4 = integer4.toString(16).toUpperCase(); - return "000000".substring(string4.length) + string4; + const integer3 = ((Math.round(args3[0]) & 255) << 16) + ((Math.round(args3[1]) & 255) << 8) + (Math.round(args3[2]) & 255); + const string3 = integer3.toString(16).toUpperCase(); + return "000000".substring(string3.length) + string3; }; convert.hex.rgb = function(args3) { const match2 = args3.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); @@ -20585,10 +20585,10 @@ var require_conversions = __commonJS({ return char + char; }).join(""); } - const integer4 = parseInt(colorString, 16); - const r = integer4 >> 16 & 255; - const g = integer4 >> 8 & 255; - const b = integer4 & 255; + const integer3 = parseInt(colorString, 16); + const r = integer3 >> 16 & 255; + const g = integer3 >> 8 & 255; + const b = integer3 & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { @@ -20751,9 +20751,9 @@ var require_conversions = __commonJS({ }; convert.gray.hex = function(gray) { const val = Math.round(gray[0] / 100 * 255) & 255; - const integer4 = (val << 16) + (val << 8) + val; - const string4 = integer4.toString(16).toUpperCase(); - return "000000".substring(string4.length) + string4; + const integer3 = (val << 16) + (val << 8) + val; + const string3 = integer3.toString(16).toUpperCase(); + return "000000".substring(string3.length) + string3; }; convert.rgb.gray = function(rgb) { const val = (rgb[0] + rgb[1] + rgb[2]) / 3; @@ -21079,8 +21079,8 @@ var require_slice_ansi = __commonJS({ } return output.join(""); }; - module.exports = (string4, begin, end) => { - const characters = [...string4]; + module.exports = (string3, begin, end) => { + const characters = [...string3]; const ansiCodes = []; let stringEnd = typeof end === "number" ? end : characters.length; let isInsideEscape = false; @@ -21090,7 +21090,7 @@ var require_slice_ansi = __commonJS({ for (const [index, character] of characters.entries()) { let leftEscape = false; if (ESCAPES.includes(character)) { - const code = /\d[^m]*/.exec(string4.slice(index, index + 18)); + const code = /\d[^m]*/.exec(string3.slice(index, index + 18)); ansiCode = code && code.length > 0 ? code[0] : void 0; if (visible < stringEnd) { isInsideEscape = true; @@ -21302,8 +21302,8 @@ var require_utils3 = __commonJS({ }, 0); }; exports.sumArray = sumArray; - var extractTruncates = (config3) => { - return config3.columns.map(({ truncate }) => { + var extractTruncates = (config2) => { + return config2.columns.map(({ truncate }) => { return truncate; }); }; @@ -21405,12 +21405,12 @@ var require_alignTableData = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.alignTableData = void 0; var alignString_1 = require_alignString(); - var alignTableData = (rows, config3) => { + var alignTableData = (rows, config2) => { return rows.map((row, rowIndex) => { return row.map((cell, cellIndex) => { var _a; - const { width, alignment } = config3.columns[cellIndex]; - const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const { width, alignment } = config2.columns[cellIndex]; + const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: rowIndex }, { mapped: true }); @@ -21543,18 +21543,18 @@ var require_calculateRowHeights = __commonJS({ exports.calculateRowHeights = void 0; var calculateCellHeight_1 = require_calculateCellHeight(); var utils_1 = require_utils3(); - var calculateRowHeights = (rows, config3) => { + var calculateRowHeights = (rows, config2) => { const rowHeights = []; for (const [rowIndex, row] of rows.entries()) { let rowHeight = 1; row.forEach((cell, cellIndex) => { var _a; - const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: rowIndex }); if (!containingRange) { - const cellHeight = (0, calculateCellHeight_1.calculateCellHeight)(cell, config3.columns[cellIndex].width, config3.columns[cellIndex].wrapWord); + const cellHeight = (0, calculateCellHeight_1.calculateCellHeight)(cell, config2.columns[cellIndex].width, config2.columns[cellIndex].wrapWord); rowHeight = Math.max(rowHeight, cellHeight); return; } @@ -21564,7 +21564,7 @@ var require_calculateRowHeights = __commonJS({ const totalHorizontalBorderHeight = bottomRight.row - topLeft.row; const totalHiddenHorizontalBorderHeight = (0, utils_1.sequence)(topLeft.row + 1, bottomRight.row).filter((horizontalBorderIndex) => { var _a2; - return !((_a2 = config3.drawHorizontalLine) === null || _a2 === void 0 ? void 0 : _a2.call(config3, horizontalBorderIndex, rows.length)); + return !((_a2 = config2.drawHorizontalLine) === null || _a2 === void 0 ? void 0 : _a2.call(config2, horizontalBorderIndex, rows.length)); }).length; const cellHeight = height - totalOccupiedSpanningCellHeight - totalHorizontalBorderHeight + totalHiddenHorizontalBorderHeight; rowHeight = Math.max(rowHeight, cellHeight); @@ -21844,8 +21844,8 @@ var require_drawRow = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.drawRow = void 0; var drawContent_1 = require_drawContent(); - var drawRow = (row, config3) => { - const { border, drawVerticalLine, rowIndex, spanningCellManager } = config3; + var drawRow = (row, config2) => { + const { border, drawVerticalLine, rowIndex, spanningCellManager } = config2; return (0, drawContent_1.drawContent)({ contents: row, drawSeparator: drawVerticalLine, @@ -24448,17 +24448,17 @@ var require_validateConfig = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.validateConfig = void 0; var validators_1 = __importDefault(require_validators()); - var validateConfig = (schemaId, config3) => { + var validateConfig = (schemaId, config2) => { const validate2 = validators_1.default[schemaId]; - if (!validate2(config3) && validate2.errors) { - const errors = validate2.errors.map((error42) => { + if (!validate2(config2) && validate2.errors) { + const errors = validate2.errors.map((error41) => { return { - message: error42.message, - params: error42.params, - schemaPath: error42.schemaPath + message: error41.message, + params: error41.params, + schemaPath: error41.schemaPath }; }); - console.log("config", config3); + console.log("config", config2); console.log("errors", errors); throw new Error("Invalid config."); } @@ -24489,18 +24489,18 @@ var require_makeStreamConfig = __commonJS({ }; }); }; - var makeStreamConfig = (config3) => { - (0, validateConfig_1.validateConfig)("streamConfig.json", config3); - if (config3.columnDefault.width === void 0) { + var makeStreamConfig = (config2) => { + (0, validateConfig_1.validateConfig)("streamConfig.json", config2); + if (config2.columnDefault.width === void 0) { throw new Error("Must provide config.columnDefault.width when creating a stream."); } return { drawVerticalLine: () => { return true; }, - ...config3, - border: (0, utils_1.makeBorderConfig)(config3.border), - columns: makeColumnsConfig(config3.columnCount, config3.columns, config3.columnDefault) + ...config2, + border: (0, utils_1.makeBorderConfig)(config2.border), + columns: makeColumnsConfig(config2.columnCount, config2.columns, config2.columnDefault) }; }; exports.makeStreamConfig = makeStreamConfig; @@ -24533,7 +24533,7 @@ var require_mapDataUsingRowHeights = __commonJS({ ]; }; exports.padCellVertically = padCellVertically; - var mapDataUsingRowHeights = (unmappedRows, rowHeights, config3) => { + var mapDataUsingRowHeights = (unmappedRows, rowHeights, config2) => { const nColumns = unmappedRows[0].length; const mappedRows = unmappedRows.map((unmappedRow, unmappedRowIndex) => { const outputRowHeight = rowHeights[unmappedRowIndex]; @@ -24542,7 +24542,7 @@ var require_mapDataUsingRowHeights = __commonJS({ }); unmappedRow.forEach((cell, cellIndex) => { var _a; - const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: unmappedRowIndex }); @@ -24552,8 +24552,8 @@ var require_mapDataUsingRowHeights = __commonJS({ }); return; } - const cellLines = (0, wrapCell_1.wrapCell)(cell, config3.columns[cellIndex].width, config3.columns[cellIndex].wrapWord); - const paddedCellLines = (0, exports.padCellVertically)(cellLines, outputRowHeight, config3.columns[cellIndex].verticalAlignment); + const cellLines = (0, wrapCell_1.wrapCell)(cell, config2.columns[cellIndex].width, config2.columns[cellIndex].wrapWord); + const paddedCellLines = (0, exports.padCellVertically)(cellLines, outputRowHeight, config2.columns[cellIndex].verticalAlignment); paddedCellLines.forEach((cellLine, cellLineIndex) => { outputRow[cellLineIndex][cellIndex] = cellLine; }); @@ -24576,18 +24576,18 @@ var require_padTableData = __commonJS({ return " ".repeat(paddingLeft) + input + " ".repeat(paddingRight); }; exports.padString = padString; - var padTableData = (rows, config3) => { + var padTableData = (rows, config2) => { return rows.map((cells, rowIndex) => { return cells.map((cell, cellIndex) => { var _a; - const containingRange = (_a = config3.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ + const containingRange = (_a = config2.spanningCellManager) === null || _a === void 0 ? void 0 : _a.getContainingRange({ col: cellIndex, row: rowIndex }, { mapped: true }); if (containingRange) { return cell; } - const { paddingLeft, paddingRight } = config3.columns[cellIndex]; + const { paddingLeft, paddingRight } = config2.columns[cellIndex]; return (0, exports.padString)(cell, paddingLeft, paddingRight); }); }); @@ -24664,8 +24664,8 @@ var require_lodash = __commonJS({ })(); var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; var asciiSize = baseProperty("length"); - function asciiToArray(string4) { - return string4.split(""); + function asciiToArray(string3) { + return string3.split(""); } function baseProperty(key) { return function(object2) { @@ -24677,24 +24677,24 @@ var require_lodash = __commonJS({ return func(value2); }; } - function hasUnicode(string4) { - return reHasUnicode.test(string4); + function hasUnicode(string3) { + return reHasUnicode.test(string3); } - function stringSize(string4) { - return hasUnicode(string4) ? unicodeSize(string4) : asciiSize(string4); + function stringSize(string3) { + return hasUnicode(string3) ? unicodeSize(string3) : asciiSize(string3); } - function stringToArray(string4) { - return hasUnicode(string4) ? unicodeToArray(string4) : asciiToArray(string4); + function stringToArray(string3) { + return hasUnicode(string3) ? unicodeToArray(string3) : asciiToArray(string3); } - function unicodeSize(string4) { + function unicodeSize(string3) { var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string4)) { + while (reUnicode.test(string3)) { result++; } return result; } - function unicodeToArray(string4) { - return string4.match(reUnicode) || []; + function unicodeToArray(string3) { + return string3.match(reUnicode) || []; } var objectProto6 = Object.prototype; var objectToString2 = objectProto6.toString; @@ -24702,7 +24702,7 @@ var require_lodash = __commonJS({ var symbolProto = Symbol3 ? Symbol3.prototype : void 0; var symbolToString = symbolProto ? symbolProto.toString : void 0; function baseIsRegExp(value2) { - return isObject5(value2) && objectToString2.call(value2) == regexpTag; + return isObject4(value2) && objectToString2.call(value2) == regexpTag; } function baseSlice(array, start, end) { var index = -1, length = array.length; @@ -24736,7 +24736,7 @@ var require_lodash = __commonJS({ end = end === void 0 ? length : end; return !start && end >= length ? array : baseSlice(array, start, end); } - function isObject5(value2) { + function isObject4(value2) { var type2 = typeof value2; return !!value2 && (type2 == "object" || type2 == "function"); } @@ -24769,9 +24769,9 @@ var require_lodash = __commonJS({ if (isSymbol(value2)) { return NAN; } - if (isObject5(value2)) { + if (isObject4(value2)) { var other = typeof value2.valueOf == "function" ? value2.valueOf() : value2; - value2 = isObject5(other) ? other + "" : other; + value2 = isObject4(other) ? other + "" : other; } if (typeof value2 != "string") { return value2 === 0 ? value2 : +value2; @@ -24783,27 +24783,27 @@ var require_lodash = __commonJS({ function toString2(value2) { return value2 == null ? "" : baseToString2(value2); } - function truncate(string4, options) { + function truncate(string3, options) { var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; - if (isObject5(options)) { + if (isObject4(options)) { var separator2 = "separator" in options ? options.separator : separator2; length = "length" in options ? toInteger(options.length) : length; omission = "omission" in options ? baseToString2(options.omission) : omission; } - string4 = toString2(string4); - var strLength = string4.length; - if (hasUnicode(string4)) { - var strSymbols = stringToArray(string4); + string3 = toString2(string3); + var strLength = string3.length; + if (hasUnicode(string3)) { + var strSymbols = stringToArray(string3); strLength = strSymbols.length; } if (length >= strLength) { - return string4; + return string3; } var end = length - stringSize(omission); if (end < 1) { return omission; } - var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string4.slice(0, end); + var result = strSymbols ? castSlice(strSymbols, 0, end).join("") : string3.slice(0, end); if (separator2 === void 0) { return result + omission; } @@ -24811,7 +24811,7 @@ var require_lodash = __commonJS({ end += result.length - end; } if (isRegExp(separator2)) { - if (string4.slice(end).search(separator2)) { + if (string3.slice(end).search(separator2)) { var match2, substring = result; if (!separator2.global) { separator2 = RegExp(separator2.source, toString2(reFlags.exec(separator2)) + "g"); @@ -24822,7 +24822,7 @@ var require_lodash = __commonJS({ } result = result.slice(0, newEnd === void 0 ? end : newEnd); } - } else if (string4.indexOf(baseToString2(separator2), end) != end) { + } else if (string3.indexOf(baseToString2(separator2), end) != end) { var index = result.lastIndexOf(separator2); if (index > -1) { result = result.slice(0, index); @@ -24878,60 +24878,60 @@ var require_createStream = __commonJS({ var stringifyTableData_1 = require_stringifyTableData(); var truncateTableData_1 = require_truncateTableData(); var utils_1 = require_utils3(); - var prepareData = (data, config3) => { + var prepareData = (data, config2) => { let rows = (0, stringifyTableData_1.stringifyTableData)(data); - rows = (0, truncateTableData_1.truncateTableData)(rows, (0, utils_1.extractTruncates)(config3)); - const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config3); - rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config3); - rows = (0, alignTableData_1.alignTableData)(rows, config3); - rows = (0, padTableData_1.padTableData)(rows, config3); + rows = (0, truncateTableData_1.truncateTableData)(rows, (0, utils_1.extractTruncates)(config2)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config2); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config2); + rows = (0, alignTableData_1.alignTableData)(rows, config2); + rows = (0, padTableData_1.padTableData)(rows, config2); return rows; }; - var create = (row, columnWidths, config3) => { - const rows = prepareData([row], config3); + var create = (row, columnWidths, config2) => { + const rows = prepareData([row], config2); const body = rows.map((literalRow) => { - return (0, drawRow_1.drawRow)(literalRow, config3); + return (0, drawRow_1.drawRow)(literalRow, config2); }).join(""); let output; output = ""; - output += (0, drawBorder_1.drawBorderTop)(columnWidths, config3); + output += (0, drawBorder_1.drawBorderTop)(columnWidths, config2); output += body; - output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config3); + output += (0, drawBorder_1.drawBorderBottom)(columnWidths, config2); output = output.trimEnd(); process.stdout.write(output); }; - var append3 = (row, columnWidths, config3) => { - const rows = prepareData([row], config3); + var append3 = (row, columnWidths, config2) => { + const rows = prepareData([row], config2); const body = rows.map((literalRow) => { - return (0, drawRow_1.drawRow)(literalRow, config3); + return (0, drawRow_1.drawRow)(literalRow, config2); }).join(""); let output = ""; - const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config3); + const bottom = (0, drawBorder_1.drawBorderBottom)(columnWidths, config2); if (bottom !== "\n") { output = "\r\x1B[K"; } - output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config3); + output += (0, drawBorder_1.drawBorderJoin)(columnWidths, config2); output += body; output += bottom; output = output.trimEnd(); process.stdout.write(output); }; var createStream = (userConfig) => { - const config3 = (0, makeStreamConfig_1.makeStreamConfig)(userConfig); - const columnWidths = Object.values(config3.columns).map((column) => { + const config2 = (0, makeStreamConfig_1.makeStreamConfig)(userConfig); + const columnWidths = Object.values(config2.columns).map((column) => { return column.width + column.paddingLeft + column.paddingRight; }); let empty = true; return { write: (row) => { - if (row.length !== config3.columnCount) { + if (row.length !== config2.columnCount) { throw new Error("Row cell count does not match the config.columnCount."); } if (empty) { empty = false; - create(row, columnWidths, config3); + create(row, columnWidths, config2); } else { - append3(row, columnWidths, config3); + append3(row, columnWidths, config2); } } }; @@ -24946,8 +24946,8 @@ var require_calculateOutputColumnWidths = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.calculateOutputColumnWidths = void 0; - var calculateOutputColumnWidths = (config3) => { - return config3.columns.map((col) => { + var calculateOutputColumnWidths = (config2) => { + return config2.columns.map((col) => { return col.paddingLeft + col.width + col.paddingRight; }); }; @@ -24965,12 +24965,12 @@ var require_drawTable = __commonJS({ var drawContent_1 = require_drawContent(); var drawRow_1 = require_drawRow(); var utils_1 = require_utils3(); - var drawTable = (rows, outputColumnWidths, rowHeights, config3) => { - const { drawHorizontalLine, singleLine } = config3; + var drawTable = (rows, outputColumnWidths, rowHeights, config2) => { + const { drawHorizontalLine, singleLine } = config2; const contents = (0, utils_1.groupBySizes)(rows, rowHeights).map((group2, groupIndex) => { return group2.map((row) => { return (0, drawRow_1.drawRow)(row, { - ...config3, + ...config2, rowIndex: groupIndex }); }).join(""); @@ -24986,10 +24986,10 @@ var require_drawTable = __commonJS({ elementType: "row", rowIndex: -1, separatorGetter: (0, drawBorder_1.createTableBorderGetter)(outputColumnWidths, { - ...config3, + ...config2, rowCount: contents.length }), - spanningCellManager: config3.spanningCellManager + spanningCellManager: config2.spanningCellManager }); }; exports.drawTable = drawTable; @@ -25002,10 +25002,10 @@ var require_injectHeaderConfig = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.injectHeaderConfig = void 0; - var injectHeaderConfig = (rows, config3) => { + var injectHeaderConfig = (rows, config2) => { var _a; - let spanningCellConfig = (_a = config3.spanningCells) !== null && _a !== void 0 ? _a : []; - const headerConfig = config3.header; + let spanningCellConfig = (_a = config2.spanningCells) !== null && _a !== void 0 ? _a : []; + const headerConfig = config2.header; const adjustedRows = [...rows]; if (headerConfig) { spanningCellConfig = spanningCellConfig.map(({ row, ...rest }) => { @@ -25232,8 +25232,8 @@ var require_spanningCellManager = __commonJS({ }; var createSpanningCellManager = (parameters) => { const { spanningCellConfigs, columnsConfig } = parameters; - const ranges = spanningCellConfigs.map((config3) => { - return (0, makeRangeConfig_1.makeRangeConfig)(config3, columnsConfig); + const ranges = spanningCellConfigs.map((config2) => { + return (0, makeRangeConfig_1.makeRangeConfig)(config2, columnsConfig); }); const rangeCache = {}; let rowHeights = []; @@ -25295,8 +25295,8 @@ var require_validateSpanningCellConfig = __commonJS({ }; var validateSpanningCellConfig = (rows, configs) => { const [nRow, nCol] = [rows.length, rows[0].length]; - configs.forEach((config3, configIndex) => { - const { colSpan, rowSpan } = config3; + configs.forEach((config2, configIndex) => { + const { colSpan, rowSpan } = config2; if (colSpan === void 0 && rowSpan === void 0) { throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${configIndex}]`); } @@ -25358,25 +25358,25 @@ var require_makeTableConfig = __commonJS({ }; }); }; - var makeTableConfig = (rows, config3 = {}, injectedSpanningCellConfig) => { + var makeTableConfig = (rows, config2 = {}, injectedSpanningCellConfig) => { var _a, _b, _c, _d, _e; - (0, validateConfig_1.validateConfig)("config.json", config3); - (0, validateSpanningCellConfig_1.validateSpanningCellConfig)(rows, (_a = config3.spanningCells) !== null && _a !== void 0 ? _a : []); - const spanningCellConfigs = (_b = injectedSpanningCellConfig !== null && injectedSpanningCellConfig !== void 0 ? injectedSpanningCellConfig : config3.spanningCells) !== null && _b !== void 0 ? _b : []; - const columnsConfig = makeColumnsConfig(rows, config3.columns, config3.columnDefault, spanningCellConfigs); - const drawVerticalLine = (_c = config3.drawVerticalLine) !== null && _c !== void 0 ? _c : (() => { + (0, validateConfig_1.validateConfig)("config.json", config2); + (0, validateSpanningCellConfig_1.validateSpanningCellConfig)(rows, (_a = config2.spanningCells) !== null && _a !== void 0 ? _a : []); + const spanningCellConfigs = (_b = injectedSpanningCellConfig !== null && injectedSpanningCellConfig !== void 0 ? injectedSpanningCellConfig : config2.spanningCells) !== null && _b !== void 0 ? _b : []; + const columnsConfig = makeColumnsConfig(rows, config2.columns, config2.columnDefault, spanningCellConfigs); + const drawVerticalLine = (_c = config2.drawVerticalLine) !== null && _c !== void 0 ? _c : (() => { return true; }); - const drawHorizontalLine = (_d = config3.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { + const drawHorizontalLine = (_d = config2.drawHorizontalLine) !== null && _d !== void 0 ? _d : (() => { return true; }); return { - ...config3, - border: (0, utils_1.makeBorderConfig)(config3.border), + ...config2, + border: (0, utils_1.makeBorderConfig)(config2.border), columns: columnsConfig, drawHorizontalLine, drawVerticalLine, - singleLine: (_e = config3.singleLine) !== null && _e !== void 0 ? _e : false, + singleLine: (_e = config2.singleLine) !== null && _e !== void 0 ? _e : false, spanningCellManager: (0, spanningCellManager_1.createSpanningCellManager)({ columnsConfig, drawHorizontalLine, @@ -25448,16 +25448,16 @@ var require_table = __commonJS({ (0, validateTableData_1.validateTableData)(data); let rows = (0, stringifyTableData_1.stringifyTableData)(data); const [injectedRows, injectedSpanningCellConfig] = (0, injectHeaderConfig_1.injectHeaderConfig)(rows, userConfig); - const config3 = (0, makeTableConfig_1.makeTableConfig)(injectedRows, userConfig, injectedSpanningCellConfig); - rows = (0, truncateTableData_1.truncateTableData)(injectedRows, (0, utils_1.extractTruncates)(config3)); - const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config3); - config3.spanningCellManager.setRowHeights(rowHeights); - config3.spanningCellManager.setRowIndexMapping(rowHeights); - rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config3); - rows = (0, alignTableData_1.alignTableData)(rows, config3); - rows = (0, padTableData_1.padTableData)(rows, config3); - const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config3); - return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config3); + const config2 = (0, makeTableConfig_1.makeTableConfig)(injectedRows, userConfig, injectedSpanningCellConfig); + rows = (0, truncateTableData_1.truncateTableData)(injectedRows, (0, utils_1.extractTruncates)(config2)); + const rowHeights = (0, calculateRowHeights_1.calculateRowHeights)(rows, config2); + config2.spanningCellManager.setRowHeights(rowHeights); + config2.spanningCellManager.setRowIndexMapping(rowHeights); + rows = (0, mapDataUsingRowHeights_1.mapDataUsingRowHeights)(rows, rowHeights, config2); + rows = (0, alignTableData_1.alignTableData)(rows, config2); + rows = (0, padTableData_1.padTableData)(rows, config2); + const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config2); + return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config2); }; exports.table = table2; } @@ -25518,7 +25518,7 @@ var require_fast_content_type_parse = __commonJS({ var defaultContentType = { type: "", parameters: new NullObject() }; Object.freeze(defaultContentType.parameters); Object.freeze(defaultContentType); - function parse6(header) { + function parse4(header) { if (typeof header !== "string") { throw new TypeError("argument header is required and must be a string"); } @@ -25556,7 +25556,7 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - function safeParse5(header) { + function safeParse3(header) { if (typeof header !== "string") { return defaultContentType; } @@ -25594,13 +25594,4119 @@ var require_fast_content_type_parse = __commonJS({ } return result; } - module.exports.default = { parse: parse6, safeParse: safeParse5 }; - module.exports.parse = parse6; - module.exports.safeParse = safeParse5; + module.exports.default = { parse: parse4, safeParse: safeParse3 }; + module.exports.parse = parse4; + module.exports.safeParse = safeParse3; module.exports.defaultContentType = defaultContentType; } }); +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +var util2, objectUtil2, ZodParsedType2, getParsedType2; +var init_util = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js"() { + (function(util3) { + util3.assertEqual = (_) => { + }; + function assertIs2(_arg) { + } + util3.assertIs = assertIs2; + function assertNever2(_x) { + throw new Error(); + } + util3.assertNever = assertNever2; + util3.arrayToEnum = (items) => { + const obj = {}; + for (const item of items) { + obj[item] = item; + } + return obj; + }; + util3.getValidEnumValues = (obj) => { + const validKeys = util3.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); + const filtered = {}; + for (const k of validKeys) { + filtered[k] = obj[k]; + } + return util3.objectValues(filtered); + }; + util3.objectValues = (obj) => { + return util3.objectKeys(obj).map(function(e) { + return obj[e]; + }); + }; + util3.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { + const keys = []; + for (const key in object2) { + if (Object.prototype.hasOwnProperty.call(object2, key)) { + keys.push(key); + } + } + return keys; + }; + util3.find = (arr, checker) => { + for (const item of arr) { + if (checker(item)) + return item; + } + return void 0; + }; + util3.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; + function joinValues2(array, separator2 = " | ") { + return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); + } + util3.joinValues = joinValues2; + util3.jsonStringifyReplacer = (_, value2) => { + if (typeof value2 === "bigint") { + return value2.toString(); + } + return value2; + }; + })(util2 || (util2 = {})); + (function(objectUtil4) { + objectUtil4.mergeShapes = (first, second) => { + return { + ...first, + ...second + // second overwrites first + }; + }; + })(objectUtil2 || (objectUtil2 = {})); + ZodParsedType2 = util2.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" + ]); + getParsedType2 = (data) => { + const t = typeof data; + switch (t) { + case "undefined": + return ZodParsedType2.undefined; + case "string": + return ZodParsedType2.string; + case "number": + return Number.isNaN(data) ? ZodParsedType2.nan : ZodParsedType2.number; + case "boolean": + return ZodParsedType2.boolean; + case "function": + return ZodParsedType2.function; + case "bigint": + return ZodParsedType2.bigint; + case "symbol": + return ZodParsedType2.symbol; + case "object": + if (Array.isArray(data)) { + return ZodParsedType2.array; + } + if (data === null) { + return ZodParsedType2.null; + } + if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { + return ZodParsedType2.promise; + } + if (typeof Map !== "undefined" && data instanceof Map) { + return ZodParsedType2.map; + } + if (typeof Set !== "undefined" && data instanceof Set) { + return ZodParsedType2.set; + } + if (typeof Date !== "undefined" && data instanceof Date) { + return ZodParsedType2.date; + } + return ZodParsedType2.object; + default: + return ZodParsedType2.unknown; + } + }; + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +var ZodIssueCode2, quotelessJson2, ZodError2; +var init_ZodError = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js"() { + init_util(); + ZodIssueCode2 = util2.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" + ]); + quotelessJson2 = (obj) => { + const json3 = JSON.stringify(obj, null, 2); + return json3.replace(/"([^"]+)":/g, "$1:"); + }; + ZodError2 = 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(issue2) { + return issue2.message; + }; + const fieldErrors = { _errors: [] }; + const processError = (error41) => { + for (const issue2 of error41.issues) { + if (issue2.code === "invalid_union") { + issue2.unionErrors.map(processError); + } else if (issue2.code === "invalid_return_type") { + processError(issue2.returnTypeError); + } else if (issue2.code === "invalid_arguments") { + processError(issue2.argumentsError); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); + } else { + let curr = fieldErrors; + let i = 0; + while (i < issue2.path.length) { + const el = issue2.path[i]; + const terminal = i === issue2.path.length - 1; + if (!terminal) { + curr[el] = curr[el] || { _errors: [] }; + } else { + curr[el] = curr[el] || { _errors: [] }; + curr[el]._errors.push(mapper(issue2)); + } + curr = curr[el]; + i++; + } + } + } + }; + processError(this); + return fieldErrors; + } + static assert(value2) { + if (!(value2 instanceof _ZodError)) { + throw new Error(`Not a ZodError: ${value2}`); + } + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, util2.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(mapper = (issue2) => issue2.message) { + const fieldErrors = {}; + const formErrors = []; + for (const sub of this.issues) { + if (sub.path.length > 0) { + const firstEl = sub.path[0]; + fieldErrors[firstEl] = fieldErrors[firstEl] || []; + fieldErrors[firstEl].push(mapper(sub)); + } else { + formErrors.push(mapper(sub)); + } + } + return { formErrors, fieldErrors }; + } + get formErrors() { + return this.flatten(); + } + }; + ZodError2.create = (issues) => { + const error41 = new ZodError2(issues); + return error41; + }; + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +var errorMap2, en_default2; +var init_en = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js"() { + init_ZodError(); + init_util(); + errorMap2 = (issue2, _ctx) => { + let message; + switch (issue2.code) { + case ZodIssueCode2.invalid_type: + if (issue2.received === ZodParsedType2.undefined) { + message = "Required"; + } else { + message = `Expected ${issue2.expected}, received ${issue2.received}`; + } + break; + case ZodIssueCode2.invalid_literal: + message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util2.jsonStringifyReplacer)}`; + break; + case ZodIssueCode2.unrecognized_keys: + message = `Unrecognized key(s) in object: ${util2.joinValues(issue2.keys, ", ")}`; + break; + case ZodIssueCode2.invalid_union: + message = `Invalid input`; + break; + case ZodIssueCode2.invalid_union_discriminator: + message = `Invalid discriminator value. Expected ${util2.joinValues(issue2.options)}`; + break; + case ZodIssueCode2.invalid_enum_value: + message = `Invalid enum value. Expected ${util2.joinValues(issue2.options)}, received '${issue2.received}'`; + break; + case ZodIssueCode2.invalid_arguments: + message = `Invalid function arguments`; + break; + case ZodIssueCode2.invalid_return_type: + message = `Invalid function return type`; + break; + case ZodIssueCode2.invalid_date: + message = `Invalid date`; + break; + case ZodIssueCode2.invalid_string: + if (typeof issue2.validation === "object") { + if ("includes" in issue2.validation) { + message = `Invalid input: must include "${issue2.validation.includes}"`; + if (typeof issue2.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; + } + } else if ("startsWith" in issue2.validation) { + message = `Invalid input: must start with "${issue2.validation.startsWith}"`; + } else if ("endsWith" in issue2.validation) { + message = `Invalid input: must end with "${issue2.validation.endsWith}"`; + } else { + util2.assertNever(issue2.validation); + } + } else if (issue2.validation !== "regex") { + message = `Invalid ${issue2.validation}`; + } else { + message = "Invalid"; + } + break; + case ZodIssueCode2.too_small: + if (issue2.type === "array") + message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; + else if (issue2.type === "string") + message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; + else if (issue2.type === "number") + message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; + else if (issue2.type === "bigint") + message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; + else if (issue2.type === "date") + message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; + else + message = "Invalid input"; + break; + case ZodIssueCode2.too_big: + if (issue2.type === "array") + message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; + else if (issue2.type === "string") + message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; + else if (issue2.type === "number") + message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; + else if (issue2.type === "bigint") + message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; + else if (issue2.type === "date") + message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; + else + message = "Invalid input"; + break; + case ZodIssueCode2.custom: + message = `Invalid input`; + break; + case ZodIssueCode2.invalid_intersection_types: + message = `Intersection results could not be merged`; + break; + case ZodIssueCode2.not_multiple_of: + message = `Number must be a multiple of ${issue2.multipleOf}`; + break; + case ZodIssueCode2.not_finite: + message = "Number must be finite"; + break; + default: + message = _ctx.defaultError; + util2.assertNever(issue2); + } + return { message }; + }; + en_default2 = errorMap2; + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +function setErrorMap2(map) { + overrideErrorMap2 = map; +} +function getErrorMap2() { + return overrideErrorMap2; +} +var overrideErrorMap2; +var init_errors = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js"() { + init_en(); + overrideErrorMap2 = en_default2; + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +function addIssueToContext2(ctx, issueData) { + const overrideMap = getErrorMap2(); + const issue2 = makeIssue2({ + 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 === en_default2 ? void 0 : en_default2 + // then global default map + ].filter((x) => !!x) + }); + ctx.common.issues.push(issue2); +} +var makeIssue2, EMPTY_PATH2, ParseStatus2, INVALID2, DIRTY2, OK2, isAborted2, isDirty2, isValid2, isAsync2; +var init_parseUtil = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js"() { + init_errors(); + init_en(); + makeIssue2 = (params) => { + const { data, path: path4, errorMaps, issueData } = params; + const fullPath = [...path4, ...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 map of maps) { + errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; + } + return { + ...issueData, + path: fullPath, + message: errorMessage + }; + }; + EMPTY_PATH2 = []; + ParseStatus2 = 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 INVALID2; + 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 value2 = await pair.value; + syncPairs.push({ + key, + value: value2 + }); + } + return _ParseStatus.mergeObjectSync(status, syncPairs); + } + static mergeObjectSync(status, pairs) { + const finalObject = {}; + for (const pair of pairs) { + const { key, value: value2 } = pair; + if (key.status === "aborted") + return INVALID2; + if (value2.status === "aborted") + return INVALID2; + if (key.status === "dirty") + status.dirty(); + if (value2.status === "dirty") + status.dirty(); + if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) { + finalObject[key.value] = value2.value; + } + } + return { status: status.value, value: finalObject }; + } + }; + INVALID2 = Object.freeze({ + status: "aborted" + }); + DIRTY2 = (value2) => ({ status: "dirty", value: value2 }); + OK2 = (value2) => ({ status: "valid", value: value2 }); + isAborted2 = (x) => x.status === "aborted"; + isDirty2 = (x) => x.status === "dirty"; + isValid2 = (x) => x.status === "valid"; + isAsync2 = (x) => typeof Promise !== "undefined" && x instanceof Promise; + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js +var init_typeAliases = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js"() { + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +var errorUtil2; +var init_errorUtil = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js"() { + (function(errorUtil4) { + errorUtil4.errToObj = (message) => typeof message === "string" ? { message } : message || {}; + errorUtil4.toString = (message) => typeof message === "string" ? message : message?.message; + })(errorUtil2 || (errorUtil2 = {})); + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +function processCreateParams3(params) { + if (!params) + return {}; + const { errorMap: errorMap4, invalid_type_error, required_error, description } = params; + if (errorMap4 && (invalid_type_error || required_error)) { + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + } + if (errorMap4) + return { errorMap: errorMap4, description }; + const customMap = (iss, ctx) => { + const { message } = params; + if (iss.code === "invalid_enum_value") { + return { message: message ?? ctx.defaultError }; + } + if (typeof ctx.data === "undefined") { + return { message: message ?? required_error ?? ctx.defaultError }; + } + if (iss.code !== "invalid_type") + return { message: ctx.defaultError }; + return { message: message ?? invalid_type_error ?? ctx.defaultError }; + }; + return { errorMap: customMap, description }; +} +function timeRegexSource2(args3) { + let secondsRegexSource = `[0-5]\\d`; + if (args3.precision) { + secondsRegexSource = `${secondsRegexSource}\\.\\d{${args3.precision}}`; + } else if (args3.precision == null) { + secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; + } + const secondsQuantifier = args3.precision ? "+" : "?"; + return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; +} +function timeRegex2(args3) { + return new RegExp(`^${timeRegexSource2(args3)}$`); +} +function datetimeRegex2(args3) { + let regex3 = `${dateRegexSource2}T${timeRegexSource2(args3)}`; + const opts = []; + opts.push(args3.local ? `Z?` : `Z`); + if (args3.offset) + opts.push(`([+-]\\d{2}:?\\d{2})`); + regex3 = `${regex3}(${opts.join("|")})`; + return new RegExp(`^${regex3}$`); +} +function isValidIP2(ip2, version2) { + if ((version2 === "v4" || !version2) && ipv4Regex2.test(ip2)) { + return true; + } + if ((version2 === "v6" || !version2) && ipv6Regex2.test(ip2)) { + return true; + } + return false; +} +function isValidJWT2(jwt, alg) { + if (!jwtRegex2.test(jwt)) + return false; + try { + const [header] = jwt.split("."); + if (!header) + return false; + const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base643)); + if (typeof decoded !== "object" || decoded === null) + return false; + if ("typ" in decoded && decoded?.typ !== "JWT") + return false; + if (!decoded.alg) + return false; + if (alg && decoded.alg !== alg) + return false; + return true; + } catch { + return false; + } +} +function isValidCidr2(ip2, version2) { + if ((version2 === "v4" || !version2) && ipv4CidrRegex2.test(ip2)) { + return true; + } + if ((version2 === "v6" || !version2) && ipv6CidrRegex2.test(ip2)) { + return true; + } + return false; +} +function floatSafeRemainder2(val, step) { + const valDecCount = (val.toString().split(".")[1] || "").length; + const stepDecCount = (step.toString().split(".")[1] || "").length; + 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; +} +function deepPartialify2(schema2) { + if (schema2 instanceof ZodObject2) { + const newShape = {}; + for (const key in schema2.shape) { + const fieldSchema = schema2.shape[key]; + newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema)); + } + return new ZodObject2({ + ...schema2._def, + shape: () => newShape + }); + } else if (schema2 instanceof ZodArray2) { + return new ZodArray2({ + ...schema2._def, + type: deepPartialify2(schema2.element) + }); + } else if (schema2 instanceof ZodOptional2) { + return ZodOptional2.create(deepPartialify2(schema2.unwrap())); + } else if (schema2 instanceof ZodNullable2) { + return ZodNullable2.create(deepPartialify2(schema2.unwrap())); + } else if (schema2 instanceof ZodTuple2) { + return ZodTuple2.create(schema2.items.map((item) => deepPartialify2(item))); + } else { + return schema2; + } +} +function mergeValues2(a, b) { + const aType = getParsedType2(a); + const bType = getParsedType2(b); + if (a === b) { + return { valid: true, data: a }; + } else if (aType === ZodParsedType2.object && bType === ZodParsedType2.object) { + const bKeys = util2.objectKeys(b); + const sharedKeys = util2.objectKeys(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 }; + } + newObj[key] = sharedValue.data; + } + return { valid: true, data: newObj }; + } else if (aType === ZodParsedType2.array && bType === ZodParsedType2.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 = mergeValues2(itemA, itemB); + if (!sharedValue.valid) { + return { valid: false }; + } + newArray.push(sharedValue.data); + } + return { valid: true, data: newArray }; + } else if (aType === ZodParsedType2.date && bType === ZodParsedType2.date && +a === +b) { + return { valid: true, data: a }; + } else { + return { valid: false }; + } +} +function createZodEnum2(values, params) { + return new ZodEnum2({ + values, + typeName: ZodFirstPartyTypeKind2.ZodEnum, + ...processCreateParams3(params) + }); +} +function cleanParams2(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 custom2(check, _params = {}, fatal) { + if (check) + return ZodAny2.create().superRefine((data, ctx) => { + const r = check(data); + if (r instanceof Promise) { + return r.then((r2) => { + if (!r2) { + const params = cleanParams2(_params, data); + const _fatal = params.fatal ?? fatal ?? true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + }); + } + if (!r) { + const params = cleanParams2(_params, data); + const _fatal = params.fatal ?? fatal ?? true; + ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); + } + return; + }); + return ZodAny2.create(); +} +var ParseInputLazyPath2, handleResult2, ZodType2, cuidRegex2, cuid2Regex2, ulidRegex2, uuidRegex2, nanoidRegex2, jwtRegex2, durationRegex2, emailRegex2, _emojiRegex2, emojiRegex2, ipv4Regex2, ipv4CidrRegex2, ipv6Regex2, ipv6CidrRegex2, base64Regex2, base64urlRegex2, dateRegexSource2, dateRegex2, ZodString2, ZodNumber2, ZodBigInt2, ZodBoolean2, ZodDate2, ZodSymbol2, ZodUndefined2, ZodNull2, ZodAny2, ZodUnknown2, ZodNever2, ZodVoid2, ZodArray2, ZodObject2, ZodUnion2, getDiscriminator2, ZodDiscriminatedUnion2, ZodIntersection2, ZodTuple2, ZodRecord2, ZodMap2, ZodSet2, ZodFunction2, ZodLazy2, ZodLiteral2, ZodEnum2, ZodNativeEnum2, ZodPromise2, ZodEffects2, ZodOptional2, ZodNullable2, ZodDefault2, ZodCatch2, ZodNaN2, BRAND2, ZodBranded2, ZodPipeline2, ZodReadonly2, late2, ZodFirstPartyTypeKind2, instanceOfType2, stringType2, numberType2, nanType2, bigIntType2, booleanType2, dateType2, symbolType2, undefinedType2, nullType2, anyType2, unknownType2, neverType2, voidType2, arrayType2, objectType2, strictObjectType2, unionType2, discriminatedUnionType2, intersectionType2, tupleType2, recordType2, mapType2, setType2, functionType2, lazyType2, literalType2, enumType2, nativeEnumType2, promiseType2, effectsType2, optionalType2, nullableType2, preprocessType2, pipelineType2, ostring2, onumber2, oboolean2, coerce2, NEVER2; +var init_types = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js"() { + init_ZodError(); + init_errors(); + init_errorUtil(); + init_parseUtil(); + init_util(); + ParseInputLazyPath2 = class { + constructor(parent, value2, path4, key) { + this._cachedPath = []; + this.parent = parent; + this.data = value2; + this._path = path4; + this._key = key; + } + get path() { + if (!this._cachedPath.length) { + if (Array.isArray(this._key)) { + this._cachedPath.push(...this._path, ...this._key); + } else { + this._cachedPath.push(...this._path, this._key); + } + } + return this._cachedPath; + } + }; + handleResult2 = (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 error41 = new ZodError2(ctx.common.issues); + this._error = error41; + return this._error; + } + }; + } + }; + ZodType2 = class { + get description() { + return this._def.description; + } + _getType(input) { + return getParsedType2(input.data); + } + _getOrReturnCtx(input, ctx) { + return ctx || { + common: input.parent.common, + data: input.data, + parsedType: getParsedType2(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + }; + } + _processInputParams(input) { + return { + status: new ParseStatus2(), + ctx: { + common: input.parent.common, + data: input.data, + parsedType: getParsedType2(input.data), + schemaErrorMap: this._def.errorMap, + path: input.path, + parent: input.parent + } + }; + } + _parseSync(input) { + const result = this._parse(input); + if (isAsync2(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) { + const ctx = { + common: { + issues: [], + async: params?.async ?? false, + contextualErrorMap: params?.errorMap + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType2(data) + }; + const result = this._parseSync({ data, path: ctx.path, parent: ctx }); + return handleResult2(ctx, result); + } + "~validate"(data) { + const ctx = { + common: { + issues: [], + async: !!this["~standard"].async + }, + path: [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType2(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 (err?.message?.toLowerCase()?.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?.errorMap, + async: true + }, + path: params?.path || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data, + parsedType: getParsedType2(data) + }; + const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); + const result = await (isAsync2(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); + return handleResult2(ctx, result); + } + refine(check, message) { + const getIssueProperties = (val) => { + if (typeof message === "string" || typeof message === "undefined") { + return { message }; + } else if (typeof message === "function") { + return message(val); + } else { + return message; + } + }; + return this._refinement((val, ctx) => { + const result = check(val); + const setError = () => ctx.addIssue({ + code: ZodIssueCode2.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(check, refinementData) { + return this._refinement((val, ctx) => { + if (!check(val)) { + ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); + return false; + } else { + return true; + } + }); + } + _refinement(refinement) { + return new ZodEffects2({ + schema: this, + typeName: ZodFirstPartyTypeKind2.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 ZodOptional2.create(this, this._def); + } + nullable() { + return ZodNullable2.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return ZodArray2.create(this); + } + promise() { + return ZodPromise2.create(this, this._def); + } + or(option) { + return ZodUnion2.create([this, option], this._def); + } + and(incoming) { + return ZodIntersection2.create(this, incoming, this._def); + } + transform(transform) { + return new ZodEffects2({ + ...processCreateParams3(this._def), + schema: this, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + effect: { type: "transform", transform } + }); + } + default(def) { + const defaultValueFunc = typeof def === "function" ? def : () => def; + return new ZodDefault2({ + ...processCreateParams3(this._def), + innerType: this, + defaultValue: defaultValueFunc, + typeName: ZodFirstPartyTypeKind2.ZodDefault + }); + } + brand() { + return new ZodBranded2({ + typeName: ZodFirstPartyTypeKind2.ZodBranded, + type: this, + ...processCreateParams3(this._def) + }); + } + catch(def) { + const catchValueFunc = typeof def === "function" ? def : () => def; + return new ZodCatch2({ + ...processCreateParams3(this._def), + innerType: this, + catchValue: catchValueFunc, + typeName: ZodFirstPartyTypeKind2.ZodCatch + }); + } + describe(description) { + const This = this.constructor; + return new This({ + ...this._def, + description + }); + } + pipe(target) { + return ZodPipeline2.create(this, target); + } + readonly() { + return ZodReadonly2.create(this); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } + }; + cuidRegex2 = /^c[^\s-]{8,}$/i; + cuid2Regex2 = /^[0-9a-z]+$/; + ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; + uuidRegex2 = /^[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; + nanoidRegex2 = /^[a-z0-9_-]{21}$/i; + jwtRegex2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; + durationRegex2 = /^[-+]?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)?)??$/; + emailRegex2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; + _emojiRegex2 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; + ipv4Regex2 = /^(?:(?: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])$/; + ipv4CidrRegex2 = /^(?:(?: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])$/; + ipv6Regex2 = /^(([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]))$/; + ipv6CidrRegex2 = /^(([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])$/; + base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; + base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; + dateRegexSource2 = `((\\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])))`; + dateRegex2 = new RegExp(`^${dateRegexSource2}$`); + ZodString2 = class _ZodString extends ZodType2 { + _parse(input) { + if (this._def.coerce) { + input.data = String(input.data); + } + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.string) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.string, + received: ctx2.parsedType + }); + return INVALID2; + } + const status = new ParseStatus2(); + let ctx = void 0; + for (const check of this._def.checks) { + if (check.kind === "min") { + if (input.data.length < check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: check.value, + type: "string", + inclusive: true, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + if (input.data.length > check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: check.value, + type: "string", + inclusive: true, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "length") { + const tooBig = input.data.length > check.value; + const tooSmall = input.data.length < check.value; + if (tooBig || tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + if (tooBig) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: check.value, + type: "string", + inclusive: true, + exact: true, + message: check.message + }); + } else if (tooSmall) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: check.value, + type: "string", + inclusive: true, + exact: true, + message: check.message + }); + } + status.dirty(); + } + } else if (check.kind === "email") { + if (!emailRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "email", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "emoji") { + if (!emojiRegex2) { + emojiRegex2 = new RegExp(_emojiRegex2, "u"); + } + if (!emojiRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "emoji", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "uuid") { + if (!uuidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "uuid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "nanoid") { + if (!nanoidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "nanoid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cuid") { + if (!cuidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "cuid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cuid2") { + if (!cuid2Regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "cuid2", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "ulid") { + if (!ulidRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "ulid", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "url") { + try { + new URL(input.data); + } catch { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "url", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "regex") { + check.regex.lastIndex = 0; + const testResult = check.regex.test(input.data); + if (!testResult) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "regex", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "trim") { + input.data = input.data.trim(); + } else if (check.kind === "includes") { + if (!input.data.includes(check.value, check.position)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: { includes: check.value, position: check.position }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "toLowerCase") { + input.data = input.data.toLowerCase(); + } else if (check.kind === "toUpperCase") { + input.data = input.data.toUpperCase(); + } else if (check.kind === "startsWith") { + if (!input.data.startsWith(check.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: { startsWith: check.value }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "endsWith") { + if (!input.data.endsWith(check.value)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: { endsWith: check.value }, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "datetime") { + const regex3 = datetimeRegex2(check); + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: "datetime", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "date") { + const regex3 = dateRegex2; + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: "date", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "time") { + const regex3 = timeRegex2(check); + if (!regex3.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_string, + validation: "time", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "duration") { + if (!durationRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "duration", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "ip") { + if (!isValidIP2(input.data, check.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "ip", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "jwt") { + if (!isValidJWT2(input.data, check.alg)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "jwt", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "cidr") { + if (!isValidCidr2(input.data, check.version)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "cidr", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "base64") { + if (!base64Regex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "base64", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "base64url") { + if (!base64urlRegex2.test(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + validation: "base64url", + code: ZodIssueCode2.invalid_string, + message: check.message + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + _regex(regex3, validation, message) { + return this.refinement((data) => regex3.test(data), { + validation, + code: ZodIssueCode2.invalid_string, + ...errorUtil2.errToObj(message) + }); + } + _addCheck(check) { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + email(message) { + return this._addCheck({ kind: "email", ...errorUtil2.errToObj(message) }); + } + url(message) { + return this._addCheck({ kind: "url", ...errorUtil2.errToObj(message) }); + } + emoji(message) { + return this._addCheck({ kind: "emoji", ...errorUtil2.errToObj(message) }); + } + uuid(message) { + return this._addCheck({ kind: "uuid", ...errorUtil2.errToObj(message) }); + } + nanoid(message) { + return this._addCheck({ kind: "nanoid", ...errorUtil2.errToObj(message) }); + } + cuid(message) { + return this._addCheck({ kind: "cuid", ...errorUtil2.errToObj(message) }); + } + cuid2(message) { + return this._addCheck({ kind: "cuid2", ...errorUtil2.errToObj(message) }); + } + ulid(message) { + return this._addCheck({ kind: "ulid", ...errorUtil2.errToObj(message) }); + } + base64(message) { + return this._addCheck({ kind: "base64", ...errorUtil2.errToObj(message) }); + } + base64url(message) { + return this._addCheck({ + kind: "base64url", + ...errorUtil2.errToObj(message) + }); + } + jwt(options) { + return this._addCheck({ kind: "jwt", ...errorUtil2.errToObj(options) }); + } + ip(options) { + return this._addCheck({ kind: "ip", ...errorUtil2.errToObj(options) }); + } + cidr(options) { + return this._addCheck({ kind: "cidr", ...errorUtil2.errToObj(options) }); + } + datetime(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "datetime", + precision: null, + offset: false, + local: false, + message: options + }); + } + return this._addCheck({ + kind: "datetime", + precision: typeof options?.precision === "undefined" ? null : options?.precision, + offset: options?.offset ?? false, + local: options?.local ?? false, + ...errorUtil2.errToObj(options?.message) + }); + } + date(message) { + return this._addCheck({ kind: "date", message }); + } + time(options) { + if (typeof options === "string") { + return this._addCheck({ + kind: "time", + precision: null, + message: options + }); + } + return this._addCheck({ + kind: "time", + precision: typeof options?.precision === "undefined" ? null : options?.precision, + ...errorUtil2.errToObj(options?.message) + }); + } + duration(message) { + return this._addCheck({ kind: "duration", ...errorUtil2.errToObj(message) }); + } + regex(regex3, message) { + return this._addCheck({ + kind: "regex", + regex: regex3, + ...errorUtil2.errToObj(message) + }); + } + includes(value2, options) { + return this._addCheck({ + kind: "includes", + value: value2, + position: options?.position, + ...errorUtil2.errToObj(options?.message) + }); + } + startsWith(value2, message) { + return this._addCheck({ + kind: "startsWith", + value: value2, + ...errorUtil2.errToObj(message) + }); + } + endsWith(value2, message) { + return this._addCheck({ + kind: "endsWith", + value: value2, + ...errorUtil2.errToObj(message) + }); + } + min(minLength, message) { + return this._addCheck({ + kind: "min", + value: minLength, + ...errorUtil2.errToObj(message) + }); + } + max(maxLength, message) { + return this._addCheck({ + kind: "max", + value: maxLength, + ...errorUtil2.errToObj(message) + }); + } + length(len, message) { + return this._addCheck({ + kind: "length", + value: len, + ...errorUtil2.errToObj(message) + }); + } + /** + * Equivalent to `.min(1)` + */ + nonempty(message) { + return this.min(1, errorUtil2.errToObj(message)); + } + trim() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }); + } + toLowerCase() { + return new _ZodString({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }); + } + toUpperCase() { + return new _ZodString({ + ...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; + } + }; + ZodString2.create = (params) => { + return new ZodString2({ + checks: [], + typeName: ZodFirstPartyTypeKind2.ZodString, + coerce: params?.coerce ?? false, + ...processCreateParams3(params) + }); + }; + ZodNumber2 = class _ZodNumber extends ZodType2 { + 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 parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.number) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.number, + received: ctx2.parsedType + }); + return INVALID2; + } + let ctx = void 0; + const status = new ParseStatus2(); + for (const check of this._def.checks) { + if (check.kind === "int") { + if (!util2.isInteger(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: "integer", + received: "float", + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "min") { + const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: check.value, + type: "number", + inclusive: check.inclusive, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: check.value, + type: "number", + inclusive: check.inclusive, + exact: false, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "multipleOf") { + if (floatSafeRemainder2(input.data, check.value) !== 0) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.not_multiple_of, + multipleOf: check.value, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "finite") { + if (!Number.isFinite(input.data)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.not_finite, + message: check.message + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + gte(value2, message) { + return this.setLimit("min", value2, true, errorUtil2.toString(message)); + } + gt(value2, message) { + return this.setLimit("min", value2, false, errorUtil2.toString(message)); + } + lte(value2, message) { + return this.setLimit("max", value2, true, errorUtil2.toString(message)); + } + lt(value2, message) { + return this.setLimit("max", value2, false, errorUtil2.toString(message)); + } + setLimit(kind, value2, inclusive, message) { + return new _ZodNumber({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value: value2, + inclusive, + message: errorUtil2.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodNumber({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + int(message) { + return this._addCheck({ + kind: "int", + message: errorUtil2.toString(message) + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: false, + message: errorUtil2.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: false, + message: errorUtil2.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: true, + message: errorUtil2.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: true, + message: errorUtil2.toString(message) + }); + } + multipleOf(value2, message) { + return this._addCheck({ + kind: "multipleOf", + value: value2, + message: errorUtil2.toString(message) + }); + } + finite(message) { + return this._addCheck({ + kind: "finite", + message: errorUtil2.toString(message) + }); + } + safe(message) { + return this._addCheck({ + kind: "min", + inclusive: true, + value: Number.MIN_SAFE_INTEGER, + message: errorUtil2.toString(message) + })._addCheck({ + kind: "max", + inclusive: true, + value: Number.MAX_SAFE_INTEGER, + message: errorUtil2.toString(message) + }); + } + 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" && util2.isInteger(ch.value)); + } + get isFinite() { + let max = null; + let 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); + } + }; + ZodNumber2.create = (params) => { + return new ZodNumber2({ + checks: [], + typeName: ZodFirstPartyTypeKind2.ZodNumber, + coerce: params?.coerce || false, + ...processCreateParams3(params) + }); + }; + ZodBigInt2 = class _ZodBigInt extends ZodType2 { + constructor() { + super(...arguments); + this.min = this.gte; + this.max = this.lte; + } + _parse(input) { + if (this._def.coerce) { + try { + input.data = BigInt(input.data); + } catch { + return this._getInvalidInput(input); + } + } + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.bigint) { + return this._getInvalidInput(input); + } + let ctx = void 0; + const status = new ParseStatus2(); + for (const check of this._def.checks) { + if (check.kind === "min") { + const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; + if (tooSmall) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + type: "bigint", + minimum: check.value, + inclusive: check.inclusive, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "max") { + const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; + if (tooBig) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + type: "bigint", + maximum: check.value, + inclusive: check.inclusive, + message: check.message + }); + status.dirty(); + } + } else if (check.kind === "multipleOf") { + if (input.data % check.value !== BigInt(0)) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.not_multiple_of, + multipleOf: check.value, + message: check.message + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { status: status.value, value: input.data }; + } + _getInvalidInput(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.bigint, + received: ctx.parsedType + }); + return INVALID2; + } + gte(value2, message) { + return this.setLimit("min", value2, true, errorUtil2.toString(message)); + } + gt(value2, message) { + return this.setLimit("min", value2, false, errorUtil2.toString(message)); + } + lte(value2, message) { + return this.setLimit("max", value2, true, errorUtil2.toString(message)); + } + lt(value2, message) { + return this.setLimit("max", value2, false, errorUtil2.toString(message)); + } + setLimit(kind, value2, inclusive, message) { + return new _ZodBigInt({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind, + value: value2, + inclusive, + message: errorUtil2.toString(message) + } + ] + }); + } + _addCheck(check) { + return new _ZodBigInt({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + positive(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: false, + message: errorUtil2.toString(message) + }); + } + negative(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: false, + message: errorUtil2.toString(message) + }); + } + nonpositive(message) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: true, + message: errorUtil2.toString(message) + }); + } + nonnegative(message) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: true, + message: errorUtil2.toString(message) + }); + } + multipleOf(value2, message) { + return this._addCheck({ + kind: "multipleOf", + value: value2, + message: errorUtil2.toString(message) + }); + } + 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; + } + }; + ZodBigInt2.create = (params) => { + return new ZodBigInt2({ + checks: [], + typeName: ZodFirstPartyTypeKind2.ZodBigInt, + coerce: params?.coerce ?? false, + ...processCreateParams3(params) + }); + }; + ZodBoolean2 = class extends ZodType2 { + _parse(input) { + if (this._def.coerce) { + input.data = Boolean(input.data); + } + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.boolean) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.boolean, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } + }; + ZodBoolean2.create = (params) => { + return new ZodBoolean2({ + typeName: ZodFirstPartyTypeKind2.ZodBoolean, + coerce: params?.coerce || false, + ...processCreateParams3(params) + }); + }; + ZodDate2 = class _ZodDate extends ZodType2 { + _parse(input) { + if (this._def.coerce) { + input.data = new Date(input.data); + } + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.date) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.date, + received: ctx2.parsedType + }); + return INVALID2; + } + if (Number.isNaN(input.data.getTime())) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_date + }); + return INVALID2; + } + const status = new ParseStatus2(); + let ctx = void 0; + for (const check of this._def.checks) { + if (check.kind === "min") { + if (input.data.getTime() < check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + message: check.message, + inclusive: true, + exact: false, + minimum: check.value, + type: "date" + }); + status.dirty(); + } + } else if (check.kind === "max") { + if (input.data.getTime() > check.value) { + ctx = this._getOrReturnCtx(input, ctx); + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + message: check.message, + inclusive: true, + exact: false, + maximum: check.value, + type: "date" + }); + status.dirty(); + } + } else { + util2.assertNever(check); + } + } + return { + status: status.value, + value: new Date(input.data.getTime()) + }; + } + _addCheck(check) { + return new _ZodDate({ + ...this._def, + checks: [...this._def.checks, check] + }); + } + min(minDate, message) { + return this._addCheck({ + kind: "min", + value: minDate.getTime(), + message: errorUtil2.toString(message) + }); + } + max(maxDate, message) { + return this._addCheck({ + kind: "max", + value: maxDate.getTime(), + message: errorUtil2.toString(message) + }); + } + 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; + } + 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; + } + }; + ZodDate2.create = (params) => { + return new ZodDate2({ + checks: [], + coerce: params?.coerce || false, + typeName: ZodFirstPartyTypeKind2.ZodDate, + ...processCreateParams3(params) + }); + }; + ZodSymbol2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.symbol) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.symbol, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } + }; + ZodSymbol2.create = (params) => { + return new ZodSymbol2({ + typeName: ZodFirstPartyTypeKind2.ZodSymbol, + ...processCreateParams3(params) + }); + }; + ZodUndefined2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.undefined, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } + }; + ZodUndefined2.create = (params) => { + return new ZodUndefined2({ + typeName: ZodFirstPartyTypeKind2.ZodUndefined, + ...processCreateParams3(params) + }); + }; + ZodNull2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.null) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.null, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } + }; + ZodNull2.create = (params) => { + return new ZodNull2({ + typeName: ZodFirstPartyTypeKind2.ZodNull, + ...processCreateParams3(params) + }); + }; + ZodAny2 = class extends ZodType2 { + constructor() { + super(...arguments); + this._any = true; + } + _parse(input) { + return OK2(input.data); + } + }; + ZodAny2.create = (params) => { + return new ZodAny2({ + typeName: ZodFirstPartyTypeKind2.ZodAny, + ...processCreateParams3(params) + }); + }; + ZodUnknown2 = class extends ZodType2 { + constructor() { + super(...arguments); + this._unknown = true; + } + _parse(input) { + return OK2(input.data); + } + }; + ZodUnknown2.create = (params) => { + return new ZodUnknown2({ + typeName: ZodFirstPartyTypeKind2.ZodUnknown, + ...processCreateParams3(params) + }); + }; + ZodNever2 = class extends ZodType2 { + _parse(input) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.never, + received: ctx.parsedType + }); + return INVALID2; + } + }; + ZodNever2.create = (params) => { + return new ZodNever2({ + typeName: ZodFirstPartyTypeKind2.ZodNever, + ...processCreateParams3(params) + }); + }; + ZodVoid2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.undefined) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.void, + received: ctx.parsedType + }); + return INVALID2; + } + return OK2(input.data); + } + }; + ZodVoid2.create = (params) => { + return new ZodVoid2({ + typeName: ZodFirstPartyTypeKind2.ZodVoid, + ...processCreateParams3(params) + }); + }; + ZodArray2 = class _ZodArray extends ZodType2 { + _parse(input) { + const { ctx, status } = this._processInputParams(input); + const def = this._def; + if (ctx.parsedType !== ZodParsedType2.array) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.array, + received: ctx.parsedType + }); + return INVALID2; + } + if (def.exactLength !== null) { + const tooBig = ctx.data.length > def.exactLength.value; + const tooSmall = ctx.data.length < def.exactLength.value; + if (tooBig || tooSmall) { + addIssueToContext2(ctx, { + code: tooBig ? ZodIssueCode2.too_big : ZodIssueCode2.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) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.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) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.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 ParseInputLazyPath2(ctx, item, ctx.path, i)); + })).then((result2) => { + return ParseStatus2.mergeArray(status, result2); + }); + } + const result = [...ctx.data].map((item, i) => { + return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i)); + }); + return ParseStatus2.mergeArray(status, result); + } + get element() { + return this._def.type; + } + min(minLength, message) { + return new _ZodArray({ + ...this._def, + minLength: { value: minLength, message: errorUtil2.toString(message) } + }); + } + max(maxLength, message) { + return new _ZodArray({ + ...this._def, + maxLength: { value: maxLength, message: errorUtil2.toString(message) } + }); + } + length(len, message) { + return new _ZodArray({ + ...this._def, + exactLength: { value: len, message: errorUtil2.toString(message) } + }); + } + nonempty(message) { + return this.min(1, message); + } + }; + ZodArray2.create = (schema2, params) => { + return new ZodArray2({ + type: schema2, + minLength: null, + maxLength: null, + exactLength: null, + typeName: ZodFirstPartyTypeKind2.ZodArray, + ...processCreateParams3(params) + }); + }; + ZodObject2 = class _ZodObject extends ZodType2 { + 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 = util2.objectKeys(shape); + this._cached = { shape, keys }; + return this._cached; + } + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.object) { + const ctx2 = this._getOrReturnCtx(input); + addIssueToContext2(ctx2, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.object, + received: ctx2.parsedType + }); + return INVALID2; + } + const { status, ctx } = this._processInputParams(input); + const { shape, keys: shapeKeys } = this._getCached(); + const extraKeys = []; + if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) { + for (const key in ctx.data) { + if (!shapeKeys.includes(key)) { + extraKeys.push(key); + } + } + } + const pairs = []; + for (const key of shapeKeys) { + const keyValidator = shape[key]; + const value2 = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: keyValidator._parse(new ParseInputLazyPath2(ctx, value2, ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (this._def.catchall instanceof ZodNever2) { + 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) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.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 value2 = ctx.data[key]; + pairs.push({ + key: { status: "valid", value: key }, + value: catchall._parse( + new ParseInputLazyPath2(ctx, value2, 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 value2 = await pair.value; + syncPairs.push({ + key, + value: value2, + alwaysSet: pair.alwaysSet + }); + } + return syncPairs; + }).then((syncPairs) => { + return ParseStatus2.mergeObjectSync(status, syncPairs); + }); + } else { + return ParseStatus2.mergeObjectSync(status, pairs); + } + } + get shape() { + return this._def.shape(); + } + strict(message) { + errorUtil2.errToObj; + return new _ZodObject({ + ...this._def, + unknownKeys: "strict", + ...message !== void 0 ? { + errorMap: (issue2, ctx) => { + const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; + if (issue2.code === "unrecognized_keys") + return { + message: errorUtil2.errToObj(message).message ?? defaultError + }; + return { + message: defaultError + }; + } + } : {} + }); + } + strip() { + return new _ZodObject({ + ...this._def, + unknownKeys: "strip" + }); + } + passthrough() { + return new _ZodObject({ + ...this._def, + unknownKeys: "passthrough" + }); + } + // 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 + }) + }); + } + /** + * 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: ZodFirstPartyTypeKind2.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, schema2) { + return this.augment({ [key]: schema2 }); + } + // 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 + }); + } + pick(mask) { + const shape = {}; + for (const key of util2.objectKeys(mask)) { + if (mask[key] && this.shape[key]) { + shape[key] = this.shape[key]; + } + } + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + omit(mask) { + const shape = {}; + for (const key of util2.objectKeys(this.shape)) { + if (!mask[key]) { + shape[key] = this.shape[key]; + } + } + return new _ZodObject({ + ...this._def, + shape: () => shape + }); + } + /** + * @deprecated + */ + deepPartial() { + return deepPartialify2(this); + } + partial(mask) { + const newShape = {}; + for (const key of util2.objectKeys(this.shape)) { + const fieldSchema = this.shape[key]; + if (mask && !mask[key]) { + newShape[key] = fieldSchema; + } else { + newShape[key] = fieldSchema.optional(); + } + } + return new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + required(mask) { + const newShape = {}; + for (const key of util2.objectKeys(this.shape)) { + if (mask && !mask[key]) { + newShape[key] = this.shape[key]; + } else { + const fieldSchema = this.shape[key]; + let newField = fieldSchema; + while (newField instanceof ZodOptional2) { + newField = newField._def.innerType; + } + newShape[key] = newField; + } + } + return new _ZodObject({ + ...this._def, + shape: () => newShape + }); + } + keyof() { + return createZodEnum2(util2.objectKeys(this.shape)); + } + }; + ZodObject2.create = (shape, params) => { + return new ZodObject2({ + shape: () => shape, + unknownKeys: "strip", + catchall: ZodNever2.create(), + typeName: ZodFirstPartyTypeKind2.ZodObject, + ...processCreateParams3(params) + }); + }; + ZodObject2.strictCreate = (shape, params) => { + return new ZodObject2({ + shape: () => shape, + unknownKeys: "strict", + catchall: ZodNever2.create(), + typeName: ZodFirstPartyTypeKind2.ZodObject, + ...processCreateParams3(params) + }); + }; + ZodObject2.lazycreate = (shape, params) => { + return new ZodObject2({ + shape, + unknownKeys: "strip", + catchall: ZodNever2.create(), + typeName: ZodFirstPartyTypeKind2.ZodObject, + ...processCreateParams3(params) + }); + }; + ZodUnion2 = class extends ZodType2 { + _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 ZodError2(result.ctx.common.issues)); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_union, + unionErrors + }); + return INVALID2; + } + 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 ZodError2(issues2)); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_union, + unionErrors + }); + return INVALID2; + } + } + get options() { + return this._def.options; + } + }; + ZodUnion2.create = (types, params) => { + return new ZodUnion2({ + options: types, + typeName: ZodFirstPartyTypeKind2.ZodUnion, + ...processCreateParams3(params) + }); + }; + getDiscriminator2 = (type2) => { + if (type2 instanceof ZodLazy2) { + return getDiscriminator2(type2.schema); + } else if (type2 instanceof ZodEffects2) { + return getDiscriminator2(type2.innerType()); + } else if (type2 instanceof ZodLiteral2) { + return [type2.value]; + } else if (type2 instanceof ZodEnum2) { + return type2.options; + } else if (type2 instanceof ZodNativeEnum2) { + return util2.objectValues(type2.enum); + } else if (type2 instanceof ZodDefault2) { + return getDiscriminator2(type2._def.innerType); + } else if (type2 instanceof ZodUndefined2) { + return [void 0]; + } else if (type2 instanceof ZodNull2) { + return [null]; + } else if (type2 instanceof ZodOptional2) { + return [void 0, ...getDiscriminator2(type2.unwrap())]; + } else if (type2 instanceof ZodNullable2) { + return [null, ...getDiscriminator2(type2.unwrap())]; + } else if (type2 instanceof ZodBranded2) { + return getDiscriminator2(type2.unwrap()); + } else if (type2 instanceof ZodReadonly2) { + return getDiscriminator2(type2.unwrap()); + } else if (type2 instanceof ZodCatch2) { + return getDiscriminator2(type2._def.innerType); + } else { + return []; + } + }; + ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.object) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.object, + received: ctx.parsedType + }); + return INVALID2; + } + const discriminator = this.discriminator; + const discriminatorValue = ctx.data[discriminator]; + const option = this.optionsMap.get(discriminatorValue); + if (!option) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [discriminator] + }); + return INVALID2; + } + 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 + }); + } + } + 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 type2 of options) { + const discriminatorValues = getDiscriminator2(type2.shape[discriminator]); + if (!discriminatorValues.length) { + throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); + } + for (const value2 of discriminatorValues) { + if (optionsMap.has(value2)) { + throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value2)}`); + } + optionsMap.set(value2, type2); + } + } + return new _ZodDiscriminatedUnion({ + typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion, + discriminator, + options, + optionsMap, + ...processCreateParams3(params) + }); + } + }; + ZodIntersection2 = class extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + const handleParsed = (parsedLeft, parsedRight) => { + if (isAborted2(parsedLeft) || isAborted2(parsedRight)) { + return INVALID2; + } + const merged = mergeValues2(parsedLeft.value, parsedRight.value); + if (!merged.valid) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_intersection_types + }); + return INVALID2; + } + if (isDirty2(parsedLeft) || isDirty2(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 + })); + } + } + }; + ZodIntersection2.create = (left, right, params) => { + return new ZodIntersection2({ + left, + right, + typeName: ZodFirstPartyTypeKind2.ZodIntersection, + ...processCreateParams3(params) + }); + }; + ZodTuple2 = class _ZodTuple extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.array) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.array, + received: ctx.parsedType + }); + return INVALID2; + } + if (ctx.data.length < this._def.items.length) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_small, + minimum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + return INVALID2; + } + const rest = this._def.rest; + if (!rest && ctx.data.length > this._def.items.length) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.too_big, + maximum: this._def.items.length, + inclusive: true, + exact: false, + type: "array" + }); + status.dirty(); + } + const items = [...ctx.data].map((item, itemIndex) => { + const schema2 = this._def.items[itemIndex] || this._def.rest; + if (!schema2) + return null; + return schema2._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex)); + }).filter((x) => !!x); + if (ctx.common.async) { + return Promise.all(items).then((results) => { + return ParseStatus2.mergeArray(status, results); + }); + } else { + return ParseStatus2.mergeArray(status, items); + } + } + get items() { + return this._def.items; + } + rest(rest) { + return new _ZodTuple({ + ...this._def, + rest + }); + } + }; + ZodTuple2.create = (schemas, params) => { + if (!Array.isArray(schemas)) { + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + } + return new ZodTuple2({ + items: schemas, + typeName: ZodFirstPartyTypeKind2.ZodTuple, + rest: null, + ...processCreateParams3(params) + }); + }; + ZodRecord2 = class _ZodRecord extends ZodType2 { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.object) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.object, + received: ctx.parsedType + }); + return INVALID2; + } + const pairs = []; + const keyType = this._def.keyType; + const valueType = this._def.valueType; + for (const key in ctx.data) { + pairs.push({ + key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)), + value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)), + alwaysSet: key in ctx.data + }); + } + if (ctx.common.async) { + return ParseStatus2.mergeObjectAsync(status, pairs); + } else { + return ParseStatus2.mergeObjectSync(status, pairs); + } + } + get element() { + return this._def.valueType; + } + static create(first, second, third) { + if (second instanceof ZodType2) { + return new _ZodRecord({ + keyType: first, + valueType: second, + typeName: ZodFirstPartyTypeKind2.ZodRecord, + ...processCreateParams3(third) + }); + } + return new _ZodRecord({ + keyType: ZodString2.create(), + valueType: first, + typeName: ZodFirstPartyTypeKind2.ZodRecord, + ...processCreateParams3(second) + }); + } + }; + ZodMap2 = class extends ZodType2 { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.map) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.map, + received: ctx.parsedType + }); + return INVALID2; + } + const keyType = this._def.keyType; + const valueType = this._def.valueType; + const pairs = [...ctx.data.entries()].map(([key, value2], index) => { + return { + key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index, "key"])), + value: valueType._parse(new ParseInputLazyPath2(ctx, value2, 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 value2 = await pair.value; + if (key.status === "aborted" || value2.status === "aborted") { + return INVALID2; + } + if (key.status === "dirty" || value2.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value2.value); + } + return { status: status.value, value: finalMap }; + }); + } else { + const finalMap = /* @__PURE__ */ new Map(); + for (const pair of pairs) { + const key = pair.key; + const value2 = pair.value; + if (key.status === "aborted" || value2.status === "aborted") { + return INVALID2; + } + if (key.status === "dirty" || value2.status === "dirty") { + status.dirty(); + } + finalMap.set(key.value, value2.value); + } + return { status: status.value, value: finalMap }; + } + } + }; + ZodMap2.create = (keyType, valueType, params) => { + return new ZodMap2({ + valueType, + keyType, + typeName: ZodFirstPartyTypeKind2.ZodMap, + ...processCreateParams3(params) + }); + }; + ZodSet2 = class _ZodSet extends ZodType2 { + _parse(input) { + const { status, ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.set) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.set, + received: ctx.parsedType + }); + return INVALID2; + } + const def = this._def; + if (def.minSize !== null) { + if (ctx.data.size < def.minSize.value) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.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) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.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 INVALID2; + 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 ParseInputLazyPath2(ctx, item, ctx.path, i))); + if (ctx.common.async) { + return Promise.all(elements).then((elements2) => finalizeSet(elements2)); + } else { + return finalizeSet(elements); + } + } + min(minSize, message) { + return new _ZodSet({ + ...this._def, + minSize: { value: minSize, message: errorUtil2.toString(message) } + }); + } + max(maxSize, message) { + return new _ZodSet({ + ...this._def, + maxSize: { value: maxSize, message: errorUtil2.toString(message) } + }); + } + size(size, message) { + return this.min(size, message).max(size, message); + } + nonempty(message) { + return this.min(1, message); + } + }; + ZodSet2.create = (valueType, params) => { + return new ZodSet2({ + valueType, + minSize: null, + maxSize: null, + typeName: ZodFirstPartyTypeKind2.ZodSet, + ...processCreateParams3(params) + }); + }; + ZodFunction2 = class _ZodFunction extends ZodType2 { + constructor() { + super(...arguments); + this.validate = this.implement; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.function) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.function, + received: ctx.parsedType + }); + return INVALID2; + } + function makeArgsIssue(args3, error41) { + return makeIssue2({ + data: args3, + path: ctx.path, + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), + issueData: { + code: ZodIssueCode2.invalid_arguments, + argumentsError: error41 + } + }); + } + function makeReturnsIssue(returns, error41) { + return makeIssue2({ + data: returns, + path: ctx.path, + errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), + issueData: { + code: ZodIssueCode2.invalid_return_type, + returnTypeError: error41 + } + }); + } + const params = { errorMap: ctx.common.contextualErrorMap }; + const fn2 = ctx.data; + if (this._def.returns instanceof ZodPromise2) { + const me = this; + return OK2(async function(...args3) { + const error41 = new ZodError2([]); + const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { + error41.addIssue(makeArgsIssue(args3, e)); + throw error41; + }); + const result = await Reflect.apply(fn2, this, parsedArgs); + const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { + error41.addIssue(makeReturnsIssue(result, e)); + throw error41; + }); + return parsedReturns; + }); + } else { + const me = this; + return OK2(function(...args3) { + const parsedArgs = me._def.args.safeParse(args3, params); + if (!parsedArgs.success) { + throw new ZodError2([makeArgsIssue(args3, parsedArgs.error)]); + } + const result = Reflect.apply(fn2, this, parsedArgs.data); + const parsedReturns = me._def.returns.safeParse(result, params); + if (!parsedReturns.success) { + throw new ZodError2([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: ZodTuple2.create(items).rest(ZodUnknown2.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(args3, returns, params) { + return new _ZodFunction({ + args: args3 ? args3 : ZodTuple2.create([]).rest(ZodUnknown2.create()), + returns: returns || ZodUnknown2.create(), + typeName: ZodFirstPartyTypeKind2.ZodFunction, + ...processCreateParams3(params) + }); + } + }; + ZodLazy2 = class extends ZodType2 { + 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 }); + } + }; + ZodLazy2.create = (getter, params) => { + return new ZodLazy2({ + getter, + typeName: ZodFirstPartyTypeKind2.ZodLazy, + ...processCreateParams3(params) + }); + }; + ZodLiteral2 = class extends ZodType2 { + _parse(input) { + if (input.data !== this._def.value) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + received: ctx.data, + code: ZodIssueCode2.invalid_literal, + expected: this._def.value + }); + return INVALID2; + } + return { status: "valid", value: input.data }; + } + get value() { + return this._def.value; + } + }; + ZodLiteral2.create = (value2, params) => { + return new ZodLiteral2({ + value: value2, + typeName: ZodFirstPartyTypeKind2.ZodLiteral, + ...processCreateParams3(params) + }); + }; + ZodEnum2 = class _ZodEnum extends ZodType2 { + _parse(input) { + if (typeof input.data !== "string") { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext2(ctx, { + expected: util2.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode2.invalid_type + }); + return INVALID2; + } + if (!this._cache) { + this._cache = new Set(this._def.values); + } + if (!this._cache.has(input.data)) { + const ctx = this._getOrReturnCtx(input); + const expectedValues = this._def.values; + addIssueToContext2(ctx, { + received: ctx.data, + code: ZodIssueCode2.invalid_enum_value, + options: expectedValues + }); + return INVALID2; + } + return OK2(input.data); + } + get options() { + return this._def.values; + } + get enum() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + get Values() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + get Enum() { + const enumValues2 = {}; + for (const val of this._def.values) { + enumValues2[val] = val; + } + return enumValues2; + } + 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 + }); + } + }; + ZodEnum2.create = createZodEnum2; + ZodNativeEnum2 = class extends ZodType2 { + _parse(input) { + const nativeEnumValues = util2.getValidEnumValues(this._def.values); + const ctx = this._getOrReturnCtx(input); + if (ctx.parsedType !== ZodParsedType2.string && ctx.parsedType !== ZodParsedType2.number) { + const expectedValues = util2.objectValues(nativeEnumValues); + addIssueToContext2(ctx, { + expected: util2.joinValues(expectedValues), + received: ctx.parsedType, + code: ZodIssueCode2.invalid_type + }); + return INVALID2; + } + if (!this._cache) { + this._cache = new Set(util2.getValidEnumValues(this._def.values)); + } + if (!this._cache.has(input.data)) { + const expectedValues = util2.objectValues(nativeEnumValues); + addIssueToContext2(ctx, { + received: ctx.data, + code: ZodIssueCode2.invalid_enum_value, + options: expectedValues + }); + return INVALID2; + } + return OK2(input.data); + } + get enum() { + return this._def.values; + } + }; + ZodNativeEnum2.create = (values, params) => { + return new ZodNativeEnum2({ + values, + typeName: ZodFirstPartyTypeKind2.ZodNativeEnum, + ...processCreateParams3(params) + }); + }; + ZodPromise2 = class extends ZodType2 { + unwrap() { + return this._def.type; + } + _parse(input) { + const { ctx } = this._processInputParams(input); + if (ctx.parsedType !== ZodParsedType2.promise && ctx.common.async === false) { + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.promise, + received: ctx.parsedType + }); + return INVALID2; + } + const promisified = ctx.parsedType === ZodParsedType2.promise ? ctx.data : Promise.resolve(ctx.data); + return OK2(promisified.then((data) => { + return this._def.type.parseAsync(data, { + path: ctx.path, + errorMap: ctx.common.contextualErrorMap + }); + })); + } + }; + ZodPromise2.create = (schema2, params) => { + return new ZodPromise2({ + type: schema2, + typeName: ZodFirstPartyTypeKind2.ZodPromise, + ...processCreateParams3(params) + }); + }; + ZodEffects2 = class extends ZodType2 { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.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) => { + addIssueToContext2(ctx, arg); + if (arg.fatal) { + status.abort(); + } else { + status.dirty(); + } + }, + get path() { + return ctx.path; + } + }; + 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 INVALID2; + const result = await this._def.schema._parseAsync({ + data: processed2, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID2; + if (result.status === "dirty") + return DIRTY2(result.value); + if (status.value === "dirty") + return DIRTY2(result.value); + return result; + }); + } else { + if (status.value === "aborted") + return INVALID2; + const result = this._def.schema._parseSync({ + data: processed, + path: ctx.path, + parent: ctx + }); + if (result.status === "aborted") + return INVALID2; + if (result.status === "dirty") + return DIRTY2(result.value); + if (status.value === "dirty") + return DIRTY2(result.value); + return result; + } + } + 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 INVALID2; + 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 INVALID2; + 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 INVALID2; + 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 INVALID2; + return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ + status: status.value, + value: result + })); + }); + } + } + util2.assertNever(effect); + } + }; + ZodEffects2.create = (schema2, effect, params) => { + return new ZodEffects2({ + schema: schema2, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + effect, + ...processCreateParams3(params) + }); + }; + ZodEffects2.createWithPreprocess = (preprocess, schema2, params) => { + return new ZodEffects2({ + schema: schema2, + effect: { type: "preprocess", transform: preprocess }, + typeName: ZodFirstPartyTypeKind2.ZodEffects, + ...processCreateParams3(params) + }); + }; + ZodOptional2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 === ZodParsedType2.undefined) { + return OK2(void 0); + } + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } + }; + ZodOptional2.create = (type2, params) => { + return new ZodOptional2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodOptional, + ...processCreateParams3(params) + }); + }; + ZodNullable2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 === ZodParsedType2.null) { + return OK2(null); + } + return this._def.innerType._parse(input); + } + unwrap() { + return this._def.innerType; + } + }; + ZodNullable2.create = (type2, params) => { + return new ZodNullable2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodNullable, + ...processCreateParams3(params) + }); + }; + ZodDefault2 = class extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + let data = ctx.data; + if (ctx.parsedType === ZodParsedType2.undefined) { + data = this._def.defaultValue(); + } + return this._def.innerType._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + removeDefault() { + return this._def.innerType; + } + }; + ZodDefault2.create = (type2, params) => { + return new ZodDefault2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodDefault, + defaultValue: typeof params.default === "function" ? params.default : () => params.default, + ...processCreateParams3(params) + }); + }; + ZodCatch2 = class extends ZodType2 { + _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 + } + }); + if (isAsync2(result)) { + return result.then((result2) => { + return { + status: "valid", + value: result2.status === "valid" ? result2.value : this._def.catchValue({ + get error() { + return new ZodError2(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + }); + } else { + return { + status: "valid", + value: result.status === "valid" ? result.value : this._def.catchValue({ + get error() { + return new ZodError2(newCtx.common.issues); + }, + input: newCtx.data + }) + }; + } + } + removeCatch() { + return this._def.innerType; + } + }; + ZodCatch2.create = (type2, params) => { + return new ZodCatch2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodCatch, + catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, + ...processCreateParams3(params) + }); + }; + ZodNaN2 = class extends ZodType2 { + _parse(input) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType2.nan) { + const ctx = this._getOrReturnCtx(input); + addIssueToContext2(ctx, { + code: ZodIssueCode2.invalid_type, + expected: ZodParsedType2.nan, + received: ctx.parsedType + }); + return INVALID2; + } + return { status: "valid", value: input.data }; + } + }; + ZodNaN2.create = (params) => { + return new ZodNaN2({ + typeName: ZodFirstPartyTypeKind2.ZodNaN, + ...processCreateParams3(params) + }); + }; + BRAND2 = Symbol("zod_brand"); + ZodBranded2 = class extends ZodType2 { + _parse(input) { + const { ctx } = this._processInputParams(input); + const data = ctx.data; + return this._def.type._parse({ + data, + path: ctx.path, + parent: ctx + }); + } + unwrap() { + return this._def.type; + } + }; + ZodPipeline2 = class _ZodPipeline extends ZodType2 { + _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 INVALID2; + if (inResult.status === "dirty") { + status.dirty(); + return DIRTY2(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 INVALID2; + 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: ZodFirstPartyTypeKind2.ZodPipeline + }); + } + }; + ZodReadonly2 = class extends ZodType2 { + _parse(input) { + const result = this._def.innerType._parse(input); + const freeze = (data) => { + if (isValid2(data)) { + data.value = Object.freeze(data.value); + } + return data; + }; + return isAsync2(result) ? result.then((data) => freeze(data)) : freeze(result); + } + unwrap() { + return this._def.innerType; + } + }; + ZodReadonly2.create = (type2, params) => { + return new ZodReadonly2({ + innerType: type2, + typeName: ZodFirstPartyTypeKind2.ZodReadonly, + ...processCreateParams3(params) + }); + }; + late2 = { + object: ZodObject2.lazycreate + }; + (function(ZodFirstPartyTypeKind4) { + ZodFirstPartyTypeKind4["ZodString"] = "ZodString"; + ZodFirstPartyTypeKind4["ZodNumber"] = "ZodNumber"; + ZodFirstPartyTypeKind4["ZodNaN"] = "ZodNaN"; + ZodFirstPartyTypeKind4["ZodBigInt"] = "ZodBigInt"; + ZodFirstPartyTypeKind4["ZodBoolean"] = "ZodBoolean"; + ZodFirstPartyTypeKind4["ZodDate"] = "ZodDate"; + ZodFirstPartyTypeKind4["ZodSymbol"] = "ZodSymbol"; + ZodFirstPartyTypeKind4["ZodUndefined"] = "ZodUndefined"; + ZodFirstPartyTypeKind4["ZodNull"] = "ZodNull"; + ZodFirstPartyTypeKind4["ZodAny"] = "ZodAny"; + ZodFirstPartyTypeKind4["ZodUnknown"] = "ZodUnknown"; + ZodFirstPartyTypeKind4["ZodNever"] = "ZodNever"; + ZodFirstPartyTypeKind4["ZodVoid"] = "ZodVoid"; + ZodFirstPartyTypeKind4["ZodArray"] = "ZodArray"; + ZodFirstPartyTypeKind4["ZodObject"] = "ZodObject"; + ZodFirstPartyTypeKind4["ZodUnion"] = "ZodUnion"; + ZodFirstPartyTypeKind4["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; + ZodFirstPartyTypeKind4["ZodIntersection"] = "ZodIntersection"; + ZodFirstPartyTypeKind4["ZodTuple"] = "ZodTuple"; + ZodFirstPartyTypeKind4["ZodRecord"] = "ZodRecord"; + ZodFirstPartyTypeKind4["ZodMap"] = "ZodMap"; + ZodFirstPartyTypeKind4["ZodSet"] = "ZodSet"; + ZodFirstPartyTypeKind4["ZodFunction"] = "ZodFunction"; + ZodFirstPartyTypeKind4["ZodLazy"] = "ZodLazy"; + ZodFirstPartyTypeKind4["ZodLiteral"] = "ZodLiteral"; + ZodFirstPartyTypeKind4["ZodEnum"] = "ZodEnum"; + ZodFirstPartyTypeKind4["ZodEffects"] = "ZodEffects"; + ZodFirstPartyTypeKind4["ZodNativeEnum"] = "ZodNativeEnum"; + ZodFirstPartyTypeKind4["ZodOptional"] = "ZodOptional"; + ZodFirstPartyTypeKind4["ZodNullable"] = "ZodNullable"; + ZodFirstPartyTypeKind4["ZodDefault"] = "ZodDefault"; + ZodFirstPartyTypeKind4["ZodCatch"] = "ZodCatch"; + ZodFirstPartyTypeKind4["ZodPromise"] = "ZodPromise"; + ZodFirstPartyTypeKind4["ZodBranded"] = "ZodBranded"; + ZodFirstPartyTypeKind4["ZodPipeline"] = "ZodPipeline"; + ZodFirstPartyTypeKind4["ZodReadonly"] = "ZodReadonly"; + })(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); + instanceOfType2 = (cls, params = { + message: `Input not instance of ${cls.name}` + }) => custom2((data) => data instanceof cls, params); + stringType2 = ZodString2.create; + numberType2 = ZodNumber2.create; + nanType2 = ZodNaN2.create; + bigIntType2 = ZodBigInt2.create; + booleanType2 = ZodBoolean2.create; + dateType2 = ZodDate2.create; + symbolType2 = ZodSymbol2.create; + undefinedType2 = ZodUndefined2.create; + nullType2 = ZodNull2.create; + anyType2 = ZodAny2.create; + unknownType2 = ZodUnknown2.create; + neverType2 = ZodNever2.create; + voidType2 = ZodVoid2.create; + arrayType2 = ZodArray2.create; + objectType2 = ZodObject2.create; + strictObjectType2 = ZodObject2.strictCreate; + unionType2 = ZodUnion2.create; + discriminatedUnionType2 = ZodDiscriminatedUnion2.create; + intersectionType2 = ZodIntersection2.create; + tupleType2 = ZodTuple2.create; + recordType2 = ZodRecord2.create; + mapType2 = ZodMap2.create; + setType2 = ZodSet2.create; + functionType2 = ZodFunction2.create; + lazyType2 = ZodLazy2.create; + literalType2 = ZodLiteral2.create; + enumType2 = ZodEnum2.create; + nativeEnumType2 = ZodNativeEnum2.create; + promiseType2 = ZodPromise2.create; + effectsType2 = ZodEffects2.create; + optionalType2 = ZodOptional2.create; + nullableType2 = ZodNullable2.create; + preprocessType2 = ZodEffects2.createWithPreprocess; + pipelineType2 = ZodPipeline2.create; + ostring2 = () => stringType2().optional(); + onumber2 = () => numberType2().optional(); + oboolean2 = () => booleanType2().optional(); + coerce2 = { + string: ((arg) => ZodString2.create({ ...arg, coerce: true })), + number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })), + boolean: ((arg) => ZodBoolean2.create({ + ...arg, + coerce: true + })), + bigint: ((arg) => ZodBigInt2.create({ ...arg, coerce: true })), + date: ((arg) => ZodDate2.create({ ...arg, coerce: true })) + }; + NEVER2 = INVALID2; + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js +var external_exports = {}; +__export(external_exports, { + BRAND: () => BRAND2, + DIRTY: () => DIRTY2, + EMPTY_PATH: () => EMPTY_PATH2, + INVALID: () => INVALID2, + NEVER: () => NEVER2, + OK: () => OK2, + ParseStatus: () => ParseStatus2, + Schema: () => ZodType2, + ZodAny: () => ZodAny2, + ZodArray: () => ZodArray2, + ZodBigInt: () => ZodBigInt2, + ZodBoolean: () => ZodBoolean2, + ZodBranded: () => ZodBranded2, + ZodCatch: () => ZodCatch2, + ZodDate: () => ZodDate2, + ZodDefault: () => ZodDefault2, + ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, + ZodEffects: () => ZodEffects2, + ZodEnum: () => ZodEnum2, + ZodError: () => ZodError2, + ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2, + ZodFunction: () => ZodFunction2, + ZodIntersection: () => ZodIntersection2, + ZodIssueCode: () => ZodIssueCode2, + ZodLazy: () => ZodLazy2, + ZodLiteral: () => ZodLiteral2, + ZodMap: () => ZodMap2, + ZodNaN: () => ZodNaN2, + ZodNativeEnum: () => ZodNativeEnum2, + ZodNever: () => ZodNever2, + ZodNull: () => ZodNull2, + ZodNullable: () => ZodNullable2, + ZodNumber: () => ZodNumber2, + ZodObject: () => ZodObject2, + ZodOptional: () => ZodOptional2, + ZodParsedType: () => ZodParsedType2, + ZodPipeline: () => ZodPipeline2, + ZodPromise: () => ZodPromise2, + ZodReadonly: () => ZodReadonly2, + ZodRecord: () => ZodRecord2, + ZodSchema: () => ZodType2, + ZodSet: () => ZodSet2, + ZodString: () => ZodString2, + ZodSymbol: () => ZodSymbol2, + ZodTransformer: () => ZodEffects2, + ZodTuple: () => ZodTuple2, + ZodType: () => ZodType2, + ZodUndefined: () => ZodUndefined2, + ZodUnion: () => ZodUnion2, + ZodUnknown: () => ZodUnknown2, + ZodVoid: () => ZodVoid2, + addIssueToContext: () => addIssueToContext2, + any: () => anyType2, + array: () => arrayType2, + bigint: () => bigIntType2, + boolean: () => booleanType2, + coerce: () => coerce2, + custom: () => custom2, + date: () => dateType2, + datetimeRegex: () => datetimeRegex2, + defaultErrorMap: () => en_default2, + discriminatedUnion: () => discriminatedUnionType2, + effect: () => effectsType2, + enum: () => enumType2, + function: () => functionType2, + getErrorMap: () => getErrorMap2, + getParsedType: () => getParsedType2, + instanceof: () => instanceOfType2, + intersection: () => intersectionType2, + isAborted: () => isAborted2, + isAsync: () => isAsync2, + isDirty: () => isDirty2, + isValid: () => isValid2, + late: () => late2, + lazy: () => lazyType2, + literal: () => literalType2, + makeIssue: () => makeIssue2, + map: () => mapType2, + nan: () => nanType2, + nativeEnum: () => nativeEnumType2, + never: () => neverType2, + null: () => nullType2, + nullable: () => nullableType2, + number: () => numberType2, + object: () => objectType2, + objectUtil: () => objectUtil2, + oboolean: () => oboolean2, + onumber: () => onumber2, + optional: () => optionalType2, + ostring: () => ostring2, + pipeline: () => pipelineType2, + preprocess: () => preprocessType2, + promise: () => promiseType2, + quotelessJson: () => quotelessJson2, + record: () => recordType2, + set: () => setType2, + setErrorMap: () => setErrorMap2, + strictObject: () => strictObjectType2, + string: () => stringType2, + symbol: () => symbolType2, + transformer: () => effectsType2, + tuple: () => tupleType2, + undefined: () => undefinedType2, + union: () => unionType2, + unknown: () => unknownType2, + util: () => util2, + void: () => voidType2 +}); +var init_external = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js"() { + init_errors(); + init_parseUtil(); + init_typeAliases(); + init_util(); + init_types(); + init_ZodError(); + } +}); + +// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js +var init_zod = __esm({ + "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js"() { + init_external(); + init_external(); + } +}); + // ../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js var require_uri_all2 = __commonJS({ "../node_modules/.pnpm/uri-js@4.4.1/node_modules/uri-js/dist/es5/uri.all.js"(exports, module) { @@ -25738,26 +29844,26 @@ var require_uri_all2 = __commonJS({ } return result; } - function mapDomain(string4, fn2) { - var parts = string4.split("@"); + function mapDomain(string3, fn2) { + var parts = string3.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string4 = parts[1]; + string3 = parts[1]; } - string4 = string4.replace(regexSeparators, "."); - var labels = string4.split("."); + string3 = string3.replace(regexSeparators, "."); + var labels = string3.split("."); var encoded = map(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string4) { + function ucs2decode(string3) { var output = []; var counter = 0; - var length = string4.length; + var length = string3.length; while (counter < length) { - var value2 = string4.charCodeAt(counter++); + var value2 = string3.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string4.charCodeAt(counter++); + var extra = string3.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); } else { @@ -25802,7 +29908,7 @@ var require_uri_all2 = __commonJS({ } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode2 = function decode3(input) { + var decode = function decode2(input) { var output = []; var inputLength = input.length; var i = 0; @@ -25855,7 +29961,7 @@ var require_uri_all2 = __commonJS({ } return String.fromCodePoint.apply(String, output); }; - var encode3 = function encode4(input) { + var encode2 = function encode3(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -25975,13 +30081,13 @@ var require_uri_all2 = __commonJS({ return output.join(""); }; var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string4) { - return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; + return mapDomain(input, function(string3) { + return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; }); }; var toASCII = function toASCII2(input) { - return mapDomain(input, function(string4) { - return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4; + return mapDomain(input, function(string3) { + return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; }); }; var punycode = { @@ -26002,8 +30108,8 @@ var require_uri_all2 = __commonJS({ "decode": ucs2decode, "encode": ucs2encode }, - "decode": decode2, - "encode": encode3, + "decode": decode, + "encode": encode2, "toASCII": toASCII, "toUnicode": toUnicode }; @@ -26124,7 +30230,7 @@ var require_uri_all2 = __commonJS({ } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse6(uriString) { + function parse4(uriString) { var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; @@ -26288,51 +30394,51 @@ var require_uri_all2 = __commonJS({ } return uriTokens.join(""); } - function resolveComponents(base2, relative) { + function resolveComponents(base2, relative2) { var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { - base2 = parse6(serialize(base2, options), options); - relative = parse6(serialize(relative, options), options); + base2 = parse4(serialize(base2, options), options); + relative2 = parse4(serialize(relative2, options), options); } options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; + if (!options.tolerant && relative2.scheme) { + target.scheme = relative2.scheme; + target.userinfo = relative2.userinfo; + target.host = relative2.host; + target.port = relative2.port; + target.path = removeDotSegments(relative2.path || ""); + target.query = relative2.query; } else { - if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; + if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) { + target.userinfo = relative2.userinfo; + target.host = relative2.host; + target.port = relative2.port; + target.path = removeDotSegments(relative2.path || ""); + target.query = relative2.query; } else { - if (!relative.path) { + if (!relative2.path) { target.path = base2.path; - if (relative.query !== void 0) { - target.query = relative.query; + if (relative2.query !== void 0) { + target.query = relative2.query; } else { target.query = base2.query; } } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); + if (relative2.path.charAt(0) === "/") { + target.path = removeDotSegments(relative2.path); } else { if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { - target.path = "/" + relative.path; + target.path = "/" + relative2.path; } else if (!base2.path) { - target.path = relative.path; + target.path = relative2.path; } else { - target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; + target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative2.path; } target.path = removeDotSegments(target.path); } - target.query = relative.query; + target.query = relative2.query; } target.userinfo = base2.userinfo; target.host = base2.host; @@ -26340,29 +30446,29 @@ var require_uri_all2 = __commonJS({ } target.scheme = base2.scheme; } - target.fragment = relative.fragment; + target.fragment = relative2.fragment; return target; } - function resolve(baseURI, relativeURI, options) { + function resolve2(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize2(uri, options) { if (typeof uri === "string") { - uri = serialize(parse6(uri, options), options); + uri = serialize(parse4(uri, options), options); } else if (typeOf(uri) === "object") { - uri = parse6(serialize(uri, options), options); + uri = parse4(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { - uriA = serialize(parse6(uriA, options), options); + uriA = serialize(parse4(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { - uriB = serialize(parse6(uriB, options), options); + uriB = serialize(parse4(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } @@ -26377,7 +30483,7 @@ var require_uri_all2 = __commonJS({ var handler2 = { scheme: "http", domainHost: true, - parse: function parse7(components, options) { + parse: function parse5(components, options) { if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } @@ -26406,7 +30512,7 @@ var require_uri_all2 = __commonJS({ var handler$2 = { scheme: "ws", domainHost: true, - parse: function parse7(components, options) { + parse: function parse5(components, options) { var wsComponents = components; wsComponents.secure = isSecure(wsComponents); wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); @@ -26579,7 +30685,7 @@ var require_uri_all2 = __commonJS({ var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; var handler$6 = { scheme: "urn:uuid", - parse: function parse7(urnComponents, options) { + parse: function parse5(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = void 0; @@ -26604,11 +30710,11 @@ var require_uri_all2 = __commonJS({ exports2.SCHEMES = SCHEMES; exports2.pctEncChar = pctEncChar; exports2.pctDecChars = pctDecChars; - exports2.parse = parse6; + exports2.parse = parse4; exports2.removeDotSegments = removeDotSegments; exports2.serialize = serialize; exports2.resolveComponents = resolveComponents; - exports2.resolve = resolve; + exports2.resolve = resolve2; exports2.normalize = normalize2; exports2.equal = equal; exports2.escapeComponent = escapeComponent; @@ -26926,18 +31032,18 @@ var require_resolve2 = __commonJS({ var util3 = require_util9(); var SchemaObject = require_schema_obj2(); var traverse = require_json_schema_traverse2(); - module.exports = resolve; - resolve.normalizeId = normalizeId; - resolve.fullPath = getFullPath; - resolve.url = resolveUrl; - resolve.ids = resolveIds; - resolve.inlineRef = inlineRef; - resolve.schema = resolveSchema; - function resolve(compile, root2, ref) { + module.exports = resolve2; + resolve2.normalizeId = normalizeId; + resolve2.fullPath = getFullPath; + resolve2.url = resolveUrl; + resolve2.ids = resolveIds; + resolve2.inlineRef = inlineRef; + resolve2.schema = resolveSchema; + function resolve2(compile, root2, ref) { var refVal = this._refs[ref]; if (typeof refVal == "string") { if (this._refs[refVal]) refVal = this._refs[refVal]; - else return resolve.call(this, compile, root2, refVal); + else return resolve2.call(this, compile, root2, refVal); } refVal = refVal || this._schemas[ref]; if (refVal instanceof SchemaObject) { @@ -27142,7 +31248,7 @@ var require_resolve2 = __commonJS({ var require_error_classes2 = __commonJS({ "../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/error_classes.js"(exports, module) { "use strict"; - var resolve = require_resolve2(); + var resolve2 = require_resolve2(); module.exports = { Validation: errorSubclass(ValidationError), MissingRef: errorSubclass(MissingRefError) @@ -27157,8 +31263,8 @@ var require_error_classes2 = __commonJS({ }; function MissingRefError(baseId, ref, message) { this.message = message || MissingRefError.message(baseId, ref); - this.missingRef = resolve.url(baseId, ref); - this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); + this.missingRef = resolve2.url(baseId, ref); + this.missingSchema = resolve2.normalizeId(resolve2.fullPath(this.missingRef)); } function errorSubclass(Subclass) { Subclass.prototype = Object.create(Error.prototype); @@ -27686,7 +31792,7 @@ var require_validate2 = __commonJS({ var require_compile2 = __commonJS({ "../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/compile/index.js"(exports, module) { "use strict"; - var resolve = require_resolve2(); + var resolve2 = require_resolve2(); var util3 = require_util9(); var errorClasses = require_error_classes2(); var stableStringify = require_fast_json_stable_stringify2(); @@ -27744,7 +31850,7 @@ var require_compile2 = __commonJS({ RULES, validate: validateGenerator, util: util3, - resolve, + resolve: resolve2, resolveRef, usePattern, useDefault, @@ -27804,7 +31910,7 @@ var require_compile2 = __commonJS({ return validate2; } function resolveRef(baseId2, ref, isRoot) { - ref = resolve.url(baseId2, ref); + ref = resolve2.url(baseId2, ref); var refIndex = refs[ref]; var _refVal, refCode; if (refIndex !== void 0) { @@ -27821,11 +31927,11 @@ var require_compile2 = __commonJS({ } } refCode = addLocalRef(ref); - var v2 = resolve.call(self2, localCompile, root2, ref); + var v2 = resolve2.call(self2, localCompile, root2, ref); if (v2 === void 0) { var localSchema = localRefs && localRefs[ref]; if (localSchema) { - v2 = resolve.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root2, localRefs, baseId2); + v2 = resolve2.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root2, localRefs, baseId2); } } if (v2 === void 0) { @@ -28036,8 +32142,8 @@ var require_formats2 = __commonJS({ "relative-json-pointer": RELATIVE_JSON_POINTER }; formats.full = { - date: date4, - time: time4, + date: date2, + time: time2, "date-time": date_time, uri, "uri-reference": URIREF, @@ -28056,7 +32162,7 @@ var require_formats2 = __commonJS({ function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date4(str) { + function date2(str) { var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; @@ -28064,7 +32170,7 @@ var require_formats2 = __commonJS({ var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time4(str, full) { + function time2(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; @@ -28076,7 +32182,7 @@ var require_formats2 = __commonJS({ var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); + return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -31435,7 +35541,7 @@ var require_ajv2 = __commonJS({ "../node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js"(exports, module) { "use strict"; var compileSchema = require_compile2(); - var resolve = require_resolve2(); + var resolve2 = require_resolve2(); var Cache = require_cache3(); var SchemaObject = require_schema_obj2(); var stableStringify = require_fast_json_stable_stringify2(); @@ -31517,7 +35623,7 @@ var require_ajv2 = __commonJS({ var id = this._getId(schema2); if (id !== void 0 && typeof id != "string") throw new Error("schema id must be string"); - key = resolve.normalizeId(key || id); + key = resolve2.normalizeId(key || id); checkUnique(this, key); this._schemas[key] = this._addSchema(schema2, _skipValidation, _meta, true); return this; @@ -31561,7 +35667,7 @@ var require_ajv2 = __commonJS({ } } function _getSchemaFragment(self2, ref) { - var res = resolve.schema.call(self2, { schema: {} }, ref); + var res = resolve2.schema.call(self2, { schema: {} }, ref); if (res) { var schema2 = res.schema, root2 = res.root, baseId = res.baseId; var v = compileSchema.call(self2, schema2, root2, void 0, baseId); @@ -31577,7 +35683,7 @@ var require_ajv2 = __commonJS({ } } function _getSchemaObj(self2, keyRef) { - keyRef = resolve.normalizeId(keyRef); + keyRef = resolve2.normalizeId(keyRef); return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; } function removeSchema(schemaKeyRef) { @@ -31604,7 +35710,7 @@ var require_ajv2 = __commonJS({ this._cache.del(cacheKey); var id = this._getId(schemaKeyRef); if (id) { - id = resolve.normalizeId(id); + id = resolve2.normalizeId(id); delete this._schemas[id]; delete this._refs[id]; } @@ -31625,16 +35731,16 @@ var require_ajv2 = __commonJS({ throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached5 = this._cache.get(cacheKey); - if (cached5) return cached5; + var cached4 = this._cache.get(cacheKey); + if (cached4) return cached4; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; - var id = resolve.normalizeId(this._getId(schema2)); + var id = resolve2.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); var willValidate = this._opts.validateSchema !== false && !skipValidation; var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) + if (willValidate && !(recursiveMeta = id && id == resolve2.normalizeId(schema2.$schema))) this.validateSchema(schema2, true); - var localRefs = resolve.ids.call(this, schema2); + var localRefs = resolve2.ids.call(this, schema2); var schemaObj = new SchemaObject({ id, schema: schema2, @@ -33377,14 +37483,14 @@ var require_diagnostics = __commonJS({ "undici:client:beforeConnect", (evt) => { const { - connectParams: { version: version3, protocol, port, host } + connectParams: { version: version2, protocol, port, host } } = evt; debugLog( "connecting to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version3 + version2 ); } ); @@ -33392,14 +37498,14 @@ var require_diagnostics = __commonJS({ "undici:client:connected", (evt) => { const { - connectParams: { version: version3, protocol, port, host } + connectParams: { version: version2, protocol, port, host } } = evt; debugLog( "connected to %s%s using %s%s", host, port ? `:${port}` : "", protocol, - version3 + version2 ); } ); @@ -33407,16 +37513,16 @@ var require_diagnostics = __commonJS({ "undici:client:connectError", (evt) => { const { - connectParams: { version: version3, protocol, port, host }, - error: error42 + connectParams: { version: version2, protocol, port, host }, + error: error41 } = evt; debugLog( "connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, - version3, - error42.message + version2, + error41.message ); } ); @@ -33466,14 +37572,14 @@ var require_diagnostics = __commonJS({ (evt) => { const { request: { method, path: path4, origin }, - error: error42 + error: error41 } = evt; debugLog( "request to %s %s%s errored - %s", method, origin, path4, - error42.message + error41.message ); } ); @@ -33779,16 +37885,16 @@ var require_request3 = __commonJS({ this.onError(err); } } - onError(error42) { + onError(error41) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error42 }); + channels.error.publish({ request: this, error: error41 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error42); + return this[kHandler].onError(error41); } onFinally() { if (this.errorHandler) { @@ -34109,9 +38215,9 @@ var require_dispatcher_base2 = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -34149,12 +38255,12 @@ var require_dispatcher_base2 = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve(data); + ) : resolve2(data); }); }); } @@ -34258,14 +38364,14 @@ var require_connect2 = __commonJS({ const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); timeout = timeout == null ? 1e4 : timeout; allowH2 = allowH2 != null ? allowH2 : false; - return function connect({ hostname: hostname3, host, protocol, port, servername, localAddress, httpSocket }, callback) { + return function connect({ hostname: hostname2, 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 || hostname3; + const sessionKey = servername || hostname2; assert2(sessionKey); const session = customSession || sessionCache.get(sessionKey) || null; port = port || 443; @@ -34280,7 +38386,7 @@ var require_connect2 = __commonJS({ socket: httpSocket, // upgrade socket connection port, - host: hostname3 + host: hostname2 }); socket.on("session", function(session2) { sessionCache.set(sessionKey, session2); @@ -34294,14 +38400,14 @@ var require_connect2 = __commonJS({ ...options, localAddress, port, - host: hostname3 + host: hostname2 }); } if (options.keepAlive == null || options.keepAlive) { const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; socket.setKeepAlive(true, keepAliveInitialDelay); } - const clearConnectTimeout = util3.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname3, port }); + const clearConnectTimeout = util3.setupConnectTimeout(new WeakRef(socket), { timeout, hostname: hostname2, port }); socket.setNoDelay(true).once(protocol === "https:" ? "secureConnect" : "connect", function() { queueMicrotask(clearConnectTimeout); if (callback) { @@ -37402,8 +41508,8 @@ var require_promise = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; + const promise = new Promise((resolve2, reject) => { + res = resolve2; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -38716,12 +42822,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve, reject) => { + const waitForDrain = () => new Promise((resolve2, reject) => { assert2(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve; + callback = resolve2; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -39119,8 +43225,8 @@ var require_client_h2 = __commonJS({ } } let stream = null; - const { hostname: hostname3, port } = client[kUrl]; - headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname3}${port ? `:${port}` : ""}`; + const { hostname: hostname2, port } = client[kUrl]; + headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname2}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; const abort = (err) => { if (request2.aborted || request2.completed) { @@ -39377,8 +43483,8 @@ var require_client_h2 = __commonJS({ } request2.onRequestSent(); client[kResume](); - } catch (error42) { - abort(error42); + } catch (error41) { + abort(error41); } } function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) { @@ -39436,12 +43542,12 @@ var require_client_h2 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve, reject) => { + const waitForDrain = () => new Promise((resolve2, reject) => { assert2(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve; + callback = resolve2; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -39727,16 +43833,16 @@ var require_client2 = __commonJS({ return this[kNeedDrain] < 2; } [kClose]() { - return new Promise((resolve) => { + return new Promise((resolve2) => { if (this[kSize]) { - this[kClosedResolve] = resolve; + this[kClosedResolve] = resolve2; } else { - resolve(null); + resolve2(null); } }); } [kDestroy](err) { - return new Promise((resolve) => { + return new Promise((resolve2) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -39747,7 +43853,7 @@ var require_client2 = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve(null); + resolve2(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -39773,20 +43879,20 @@ var require_client2 = __commonJS({ function connect(client) { assert2(!client[kConnecting]); assert2(!client[kHTTPContext]); - let { host, hostname: hostname3, protocol, port } = client[kUrl]; - if (hostname3[0] === "[") { - const idx = hostname3.indexOf("]"); + let { host, hostname: hostname2, protocol, port } = client[kUrl]; + if (hostname2[0] === "[") { + const idx = hostname2.indexOf("]"); assert2(idx !== -1); - const ip2 = hostname3.substring(1, idx); + const ip2 = hostname2.substring(1, idx); assert2(net.isIPv6(ip2)); - hostname3 = ip2; + hostname2 = ip2; } client[kConnecting] = true; if (channels.beforeConnect.hasSubscribers) { channels.beforeConnect.publish({ connectParams: { host, - hostname: hostname3, + hostname: hostname2, protocol, port, version: client[kHTTPContext]?.version, @@ -39798,14 +43904,14 @@ var require_client2 = __commonJS({ } client[kConnector]({ host, - hostname: hostname3, + hostname: hostname2, protocol, port, servername: client[kServerName], localAddress: client[kLocalAddress] }, (err, socket) => { if (err) { - handleConnectError(client, err, { host, hostname: hostname3, protocol, port }); + handleConnectError(client, err, { host, hostname: hostname2, protocol, port }); client[kResume](); return; } @@ -39819,7 +43925,7 @@ var require_client2 = __commonJS({ client[kHTTPContext] = socket.alpnProtocol === "h2" ? connectH2(client, socket) : connectH1(client, socket); } catch (err2) { socket.destroy().on("error", noop3); - handleConnectError(client, err2, { host, hostname: hostname3, protocol, port }); + handleConnectError(client, err2, { host, hostname: hostname2, protocol, port }); client[kResume](); return; } @@ -39832,7 +43938,7 @@ var require_client2 = __commonJS({ channels.connected.publish({ connectParams: { host, - hostname: hostname3, + hostname: hostname2, protocol, port, version: client[kHTTPContext]?.version, @@ -39847,7 +43953,7 @@ var require_client2 = __commonJS({ client[kResume](); }); } - function handleConnectError(client, err, { host, hostname: hostname3, protocol, port }) { + function handleConnectError(client, err, { host, hostname: hostname2, protocol, port }) { if (client.destroyed) { return; } @@ -39856,7 +43962,7 @@ var require_client2 = __commonJS({ channels.connectError.publish({ connectParams: { host, - hostname: hostname3, + hostname: hostname2, protocol, port, version: client[kHTTPContext]?.version, @@ -40138,8 +44244,8 @@ var require_pool_base2 = __commonJS({ } return Promise.all(closeAll); } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve; + return new Promise((resolve2) => { + this[kClosedResolve] = resolve2; }); } } @@ -40275,7 +44381,7 @@ var require_pool2 = __commonJS({ } } }); - this.on("connectionError", (origin2, targets, error42) => { + this.on("connectionError", (origin2, targets, error41) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -40859,10 +44965,10 @@ var require_env_http_proxy_agent = __commonJS({ ]); } #getProxyAgentForUrl(url2) { - let { protocol, host: hostname3, port } = url2; - hostname3 = hostname3.replace(/:\d*$/, "").toLowerCase(); + let { protocol, host: hostname2, port } = url2; + hostname2 = hostname2.replace(/:\d*$/, "").toLowerCase(); port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname3, port)) { + if (!this.#shouldProxy(hostname2, port)) { return this[kNoProxyAgent]; } if (protocol === "https:") { @@ -40870,7 +44976,7 @@ var require_env_http_proxy_agent = __commonJS({ } return this[kHttpProxyAgent]; } - #shouldProxy(hostname3, port) { + #shouldProxy(hostname2, port) { if (this.#noProxyChanged) { this.#parseNoProxy(); } @@ -40886,11 +44992,11 @@ var require_env_http_proxy_agent = __commonJS({ continue; } if (!/^[.*]/.test(entry.hostname)) { - if (hostname3 === entry.hostname) { + if (hostname2 === entry.hostname) { return false; } } else { - if (hostname3.endsWith(entry.hostname.replace(/^\*/, ""))) { + if (hostname2.endsWith(entry.hostname.replace(/^\*/, ""))) { return false; } } @@ -41321,10 +45427,10 @@ var require_h2c_client = __commonJS({ #buildConnector(connectOpts) { return (opts, callback) => { const timeout = connectOpts?.connectOpts ?? 1e4; - const { hostname: hostname3, port, pathname } = opts; + const { hostname: hostname2, port, pathname } = opts; const socket = connect({ ...opts, - host: hostname3, + host: hostname2, port, pathname }); @@ -41335,7 +45441,7 @@ var require_h2c_client = __commonJS({ socket.alpnProtocol = "h2"; const clearConnectTimeout = util3.setupConnectTimeout( new WeakRef(socket), - { timeout, hostname: hostname3, port } + { timeout, hostname: hostname2, port } ); socket.setNoDelay(true).once("connect", function() { queueMicrotask(clearConnectTimeout); @@ -41591,7 +45697,7 @@ var require_readable2 = __commonJS({ if (this._readableState.closeEmitted) { return Promise.resolve(null); } - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) { this.destroy(new AbortError2()); } @@ -41605,11 +45711,11 @@ var require_readable2 = __commonJS({ if (signal.aborted) { reject(signal.reason ?? new AbortError2()); } else { - resolve(null); + resolve2(null); } }); } else { - this.on("close", resolve); + this.on("close", resolve2); } this.on("error", noop3).on("data", () => { if (this[kBytesRead] > limit) { @@ -41637,7 +45743,7 @@ var require_readable2 = __commonJS({ } function consume(stream, type2) { assert2(!stream[kConsume]); - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -41652,7 +45758,7 @@ var require_readable2 = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve, + resolve: resolve2, reject, length: 0, body: [] @@ -41726,18 +45832,18 @@ var require_readable2 = __commonJS({ return buffer; } function consumeEnd(consume2, encoding) { - const { type: type2, body, resolve, stream, length } = consume2; + const { type: type2, body, resolve: resolve2, stream, length } = consume2; try { if (type2 === "text") { - resolve(chunksDecode(body, length, encoding)); + resolve2(chunksDecode(body, length, encoding)); } else if (type2 === "json") { - resolve(JSON.parse(chunksDecode(body, length, encoding))); + resolve2(JSON.parse(chunksDecode(body, length, encoding))); } else if (type2 === "arrayBuffer") { - resolve(chunksConcat(body, length).buffer); + resolve2(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve(new Blob(body, { type: stream[kContentType] })); + resolve2(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve(chunksConcat(body, length)); + resolve2(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -41926,9 +46032,9 @@ var require_api_request2 = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -42140,9 +46246,9 @@ var require_api_stream2 = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -42429,9 +46535,9 @@ var require_api_upgrade2 = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -42524,9 +46630,9 @@ var require_api_connect2 = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); + return err ? reject(err) : resolve2(data); }); }); } @@ -42674,10 +46780,10 @@ var require_mock_utils2 = __commonJS({ } } function buildHeadersFromArray(headers) { - const clone3 = headers.slice(); + const clone2 = headers.slice(); const entries = []; - for (let index = 0; index < clone3.length; index += 2) { - entries.push([clone3[index], clone3[index + 1]]); + for (let index = 0; index < clone2.length; index += 2) { + entries.push([clone2[index], clone2[index + 1]]); } return Object.fromEntries(entries); } @@ -42856,13 +46962,13 @@ var require_mock_utils2 = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error42 }, delay: delay2, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error41 }, delay: delay2, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error42 !== null) { + if (error41 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error42); + handler2.onError(error41); return true; } if (typeof delay2 === "number" && delay2 > 0) { @@ -42900,19 +47006,19 @@ var require_mock_utils2 = __commonJS({ if (agent2.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error42) { - if (error42.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { + } catch (error41) { + if (error41.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { const netConnect = agent2[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error42.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error41.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error42; + throw error41; } } } else { @@ -43087,11 +47193,11 @@ var require_mock_interceptor2 = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error42) { - if (typeof error42 === "undefined") { + replyWithError(error41) { + if (typeof error41 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error42 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error41 }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); return new MockScope(newMockDispatch); } /** @@ -43241,8 +47347,8 @@ var require_mock_call_history = __commonJS({ } url2.search = new URLSearchParams(requestInit.query).toString(); return url2; - } catch (error42) { - throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error42 }); + } catch (error41) { + throw new InvalidArgumentError("An error occurred when computing MockCallHistoryLog.url", { cause: error41 }); } } var MockCallHistoryLog = class { @@ -43302,17 +47408,17 @@ var require_mock_call_history = __commonJS({ lastCall() { return this.logs.at(-1); } - nthCall(number4) { - if (typeof number4 !== "number") { + nthCall(number3) { + if (typeof number3 !== "number") { throw new InvalidArgumentError("nthCall must be called with a number"); } - if (!Number.isInteger(number4)) { + if (!Number.isInteger(number3)) { throw new InvalidArgumentError("nthCall must be called with an integer"); } - if (Math.sign(number4) !== 1) { + if (Math.sign(number3) !== 1) { throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); } - return this.logs.at(number4 - 1); + return this.logs.at(number3 - 1); } filterCalls(criteria, options) { if (this.logs.length === 0) { @@ -43766,7 +47872,7 @@ var require_snapshot_recorder = __commonJS({ "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) { "use strict"; var { writeFile, readFile, mkdir } = __require("node:fs/promises"); - var { dirname: dirname2, resolve } = __require("node:path"); + var { dirname: dirname2, resolve: resolve2 } = __require("node:path"); var { setTimeout: setTimeout2, clearTimeout: clearTimeout2 } = __require("node:timers"); var { InvalidArgumentError, UndiciError } = require_errors2(); var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils(); @@ -43960,7 +48066,7 @@ var require_snapshot_recorder = __commonJS({ throw new InvalidArgumentError("Snapshot path is required"); } try { - const data = await readFile(resolve(path4), "utf8"); + const data = await readFile(resolve2(path4), "utf8"); const parsed2 = JSON.parse(data); if (Array.isArray(parsed2)) { this.#snapshots.clear(); @@ -43970,11 +48076,11 @@ var require_snapshot_recorder = __commonJS({ } else { this.#snapshots = new Map(Object.entries(parsed2)); } - } catch (error42) { - if (error42.code === "ENOENT") { + } catch (error41) { + if (error41.code === "ENOENT") { this.#snapshots.clear(); } else { - throw new UndiciError(`Failed to load snapshots from ${path4}`, { cause: error42 }); + throw new UndiciError(`Failed to load snapshots from ${path4}`, { cause: error41 }); } } } @@ -43989,7 +48095,7 @@ var require_snapshot_recorder = __commonJS({ if (!path4) { throw new InvalidArgumentError("Snapshot path is required"); } - const resolvedPath = resolve(path4); + const resolvedPath = resolve2(path4); await mkdir(dirname2(resolvedPath), { recursive: true }); const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot2]) => ({ hash, @@ -44205,12 +48311,12 @@ var require_snapshot_agent = __commonJS({ } else if (mode === "update") { return this.#recordAndReplay(opts, handler2); } else { - const error42 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); + const error41 = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); if (handler2.onError) { - handler2.onError(error42); + handler2.onError(error41); return; } - throw error42; + throw error41; } } else if (mode === "record") { return this.#recordAndReplay(opts, handler2); @@ -44260,8 +48366,8 @@ var require_snapshot_agent = __commonJS({ trailers: responseData.trailers }).then(() => { handler2.onResponseEnd(controller, trailers); - }).catch((error42) => { - handler2.onResponseError(controller, error42); + }).catch((error41) => { + handler2.onResponseError(controller, error41); }); } }; @@ -44295,8 +48401,8 @@ var require_snapshot_agent = __commonJS({ const body = Buffer.from(response.body, "base64"); handler2.onResponseData(controller, body); handler2.onResponseEnd(controller, response.trailers); - } catch (error42) { - handler2.onError?.(error42); + } catch (error41) { + handler2.onError?.(error41); } } /** @@ -44640,8 +48746,8 @@ var require_redirect_handler = __commonJS({ this.handler.onResponseEnd(controller, trailers); } } - onResponseError(controller, error42) { - this.handler.onResponseError?.(controller, error42); + onResponseError(controller, error41) { + this.handler.onResponseError?.(controller, error41); } }; function shouldRemoveHeader(header, removeContent, unknownOrigin) { @@ -45487,76 +49593,76 @@ var require_cache5 = __commonJS({ var require_date = __commonJS({ "../node_modules/.pnpm/undici@7.16.0/node_modules/undici/lib/util/date.js"(exports, module) { "use strict"; - function parseHttpDate(date4) { - switch (date4[3]) { + function parseHttpDate(date2) { + switch (date2[3]) { case ",": - return parseImfDate(date4); + return parseImfDate(date2); case " ": - return parseAscTimeDate(date4); + return parseAscTimeDate(date2); default: - return parseRfc850Date(date4); + return parseRfc850Date(date2); } } - function parseImfDate(date4) { - if (date4.length !== 29 || date4[4] !== " " || date4[7] !== " " || date4[11] !== " " || date4[16] !== " " || date4[19] !== ":" || date4[22] !== ":" || date4[25] !== " " || date4[26] !== "G" || date4[27] !== "M" || date4[28] !== "T") { + function parseImfDate(date2) { + if (date2.length !== 29 || date2[4] !== " " || date2[7] !== " " || date2[11] !== " " || date2[16] !== " " || date2[19] !== ":" || date2[22] !== ":" || date2[25] !== " " || date2[26] !== "G" || date2[27] !== "M" || date2[28] !== "T") { return void 0; } let weekday = -1; - if (date4[0] === "S" && date4[1] === "u" && date4[2] === "n") { + if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { weekday = 0; - } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n") { + } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { weekday = 1; - } else if (date4[0] === "T" && date4[1] === "u" && date4[2] === "e") { + } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { weekday = 2; - } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d") { + } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { weekday = 3; - } else if (date4[0] === "T" && date4[1] === "h" && date4[2] === "u") { + } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { weekday = 4; - } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i") { + } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { weekday = 5; - } else if (date4[0] === "S" && date4[1] === "a" && date4[2] === "t") { + } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { weekday = 6; } else { return void 0; } let day = 0; - if (date4[5] === "0") { - const code = date4.charCodeAt(6); + if (date2[5] === "0") { + const code = date2.charCodeAt(6); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date4.charCodeAt(5); + const code1 = date2.charCodeAt(5); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date4.charCodeAt(6); + const code2 = date2.charCodeAt(6); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date4[8] === "J" && date4[9] === "a" && date4[10] === "n") { + if (date2[8] === "J" && date2[9] === "a" && date2[10] === "n") { monthIdx = 0; - } else if (date4[8] === "F" && date4[9] === "e" && date4[10] === "b") { + } else if (date2[8] === "F" && date2[9] === "e" && date2[10] === "b") { monthIdx = 1; - } else if (date4[8] === "M" && date4[9] === "a") { - if (date4[10] === "r") { + } else if (date2[8] === "M" && date2[9] === "a") { + if (date2[10] === "r") { monthIdx = 2; - } else if (date4[10] === "y") { + } else if (date2[10] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date4[8] === "J") { - if (date4[9] === "a" && date4[10] === "n") { + } else if (date2[8] === "J") { + if (date2[9] === "a" && date2[10] === "n") { monthIdx = 0; - } else if (date4[9] === "u") { - if (date4[10] === "n") { + } else if (date2[9] === "u") { + if (date2[10] === "n") { monthIdx = 5; - } else if (date4[10] === "l") { + } else if (date2[10] === "l") { monthIdx = 6; } else { return void 0; @@ -45564,55 +49670,55 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date4[8] === "A") { - if (date4[9] === "p" && date4[10] === "r") { + } else if (date2[8] === "A") { + if (date2[9] === "p" && date2[10] === "r") { monthIdx = 3; - } else if (date4[9] === "u" && date4[10] === "g") { + } else if (date2[9] === "u" && date2[10] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date4[8] === "S" && date4[9] === "e" && date4[10] === "p") { + } else if (date2[8] === "S" && date2[9] === "e" && date2[10] === "p") { monthIdx = 8; - } else if (date4[8] === "O" && date4[9] === "c" && date4[10] === "t") { + } else if (date2[8] === "O" && date2[9] === "c" && date2[10] === "t") { monthIdx = 9; - } else if (date4[8] === "N" && date4[9] === "o" && date4[10] === "v") { + } else if (date2[8] === "N" && date2[9] === "o" && date2[10] === "v") { monthIdx = 10; - } else if (date4[8] === "D" && date4[9] === "e" && date4[10] === "c") { + } else if (date2[8] === "D" && date2[9] === "e" && date2[10] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date4.charCodeAt(12); + const yearDigit1 = date2.charCodeAt(12); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date4.charCodeAt(13); + const yearDigit2 = date2.charCodeAt(13); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date4.charCodeAt(14); + const yearDigit3 = date2.charCodeAt(14); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date4.charCodeAt(15); + const yearDigit4 = date2.charCodeAt(15); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); let hour = 0; - if (date4[17] === "0") { - const code = date4.charCodeAt(18); + if (date2[17] === "0") { + const code = date2.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date4.charCodeAt(17); + const code1 = date2.charCodeAt(17); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date4.charCodeAt(18); + const code2 = date2.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } @@ -45622,36 +49728,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date4[20] === "0") { - const code = date4.charCodeAt(21); + if (date2[20] === "0") { + const code = date2.charCodeAt(21); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date4.charCodeAt(20); + const code1 = date2.charCodeAt(20); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date4.charCodeAt(21); + const code2 = date2.charCodeAt(21); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date4[23] === "0") { - const code = date4.charCodeAt(24); + if (date2[23] === "0") { + const code = date2.charCodeAt(24); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date4.charCodeAt(23); + const code1 = date2.charCodeAt(23); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date4.charCodeAt(24); + const code2 = date2.charCodeAt(24); if (code2 < 48 || code2 > 57) { return void 0; } @@ -45660,48 +49766,48 @@ var require_date = __commonJS({ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); return result.getUTCDay() === weekday ? result : void 0; } - function parseAscTimeDate(date4) { - if (date4.length !== 24 || date4[7] !== " " || date4[10] !== " " || date4[19] !== " ") { + function parseAscTimeDate(date2) { + if (date2.length !== 24 || date2[7] !== " " || date2[10] !== " " || date2[19] !== " ") { return void 0; } let weekday = -1; - if (date4[0] === "S" && date4[1] === "u" && date4[2] === "n") { + if (date2[0] === "S" && date2[1] === "u" && date2[2] === "n") { weekday = 0; - } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n") { + } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n") { weekday = 1; - } else if (date4[0] === "T" && date4[1] === "u" && date4[2] === "e") { + } else if (date2[0] === "T" && date2[1] === "u" && date2[2] === "e") { weekday = 2; - } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d") { + } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d") { weekday = 3; - } else if (date4[0] === "T" && date4[1] === "h" && date4[2] === "u") { + } else if (date2[0] === "T" && date2[1] === "h" && date2[2] === "u") { weekday = 4; - } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i") { + } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i") { weekday = 5; - } else if (date4[0] === "S" && date4[1] === "a" && date4[2] === "t") { + } else if (date2[0] === "S" && date2[1] === "a" && date2[2] === "t") { weekday = 6; } else { return void 0; } let monthIdx = -1; - if (date4[4] === "J" && date4[5] === "a" && date4[6] === "n") { + if (date2[4] === "J" && date2[5] === "a" && date2[6] === "n") { monthIdx = 0; - } else if (date4[4] === "F" && date4[5] === "e" && date4[6] === "b") { + } else if (date2[4] === "F" && date2[5] === "e" && date2[6] === "b") { monthIdx = 1; - } else if (date4[4] === "M" && date4[5] === "a") { - if (date4[6] === "r") { + } else if (date2[4] === "M" && date2[5] === "a") { + if (date2[6] === "r") { monthIdx = 2; - } else if (date4[6] === "y") { + } else if (date2[6] === "y") { monthIdx = 4; } else { return void 0; } - } else if (date4[4] === "J") { - if (date4[5] === "a" && date4[6] === "n") { + } else if (date2[4] === "J") { + if (date2[5] === "a" && date2[6] === "n") { monthIdx = 0; - } else if (date4[5] === "u") { - if (date4[6] === "n") { + } else if (date2[5] === "u") { + if (date2[6] === "n") { monthIdx = 5; - } else if (date4[6] === "l") { + } else if (date2[6] === "l") { monthIdx = 6; } else { return void 0; @@ -45709,56 +49815,56 @@ var require_date = __commonJS({ } else { return void 0; } - } else if (date4[4] === "A") { - if (date4[5] === "p" && date4[6] === "r") { + } else if (date2[4] === "A") { + if (date2[5] === "p" && date2[6] === "r") { monthIdx = 3; - } else if (date4[5] === "u" && date4[6] === "g") { + } else if (date2[5] === "u" && date2[6] === "g") { monthIdx = 7; } else { return void 0; } - } else if (date4[4] === "S" && date4[5] === "e" && date4[6] === "p") { + } else if (date2[4] === "S" && date2[5] === "e" && date2[6] === "p") { monthIdx = 8; - } else if (date4[4] === "O" && date4[5] === "c" && date4[6] === "t") { + } else if (date2[4] === "O" && date2[5] === "c" && date2[6] === "t") { monthIdx = 9; - } else if (date4[4] === "N" && date4[5] === "o" && date4[6] === "v") { + } else if (date2[4] === "N" && date2[5] === "o" && date2[6] === "v") { monthIdx = 10; - } else if (date4[4] === "D" && date4[5] === "e" && date4[6] === "c") { + } else if (date2[4] === "D" && date2[5] === "e" && date2[6] === "c") { monthIdx = 11; } else { return void 0; } let day = 0; - if (date4[8] === " ") { - const code = date4.charCodeAt(9); + if (date2[8] === " ") { + const code = date2.charCodeAt(9); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date4.charCodeAt(8); + const code1 = date2.charCodeAt(8); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date4.charCodeAt(9); + const code2 = date2.charCodeAt(9); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let hour = 0; - if (date4[11] === "0") { - const code = date4.charCodeAt(12); + if (date2[11] === "0") { + const code = date2.charCodeAt(12); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date4.charCodeAt(11); + const code1 = date2.charCodeAt(11); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date4.charCodeAt(12); + const code2 = date2.charCodeAt(12); if (code2 < 48 || code2 > 57) { return void 0; } @@ -45768,54 +49874,54 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date4[14] === "0") { - const code = date4.charCodeAt(15); + if (date2[14] === "0") { + const code = date2.charCodeAt(15); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date4.charCodeAt(14); + const code1 = date2.charCodeAt(14); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date4.charCodeAt(15); + const code2 = date2.charCodeAt(15); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date4[17] === "0") { - const code = date4.charCodeAt(18); + if (date2[17] === "0") { + const code = date2.charCodeAt(18); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date4.charCodeAt(17); + const code1 = date2.charCodeAt(17); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date4.charCodeAt(18); + const code2 = date2.charCodeAt(18); if (code2 < 48 || code2 > 57) { return void 0; } second = (code1 - 48) * 10 + (code2 - 48); } - const yearDigit1 = date4.charCodeAt(20); + const yearDigit1 = date2.charCodeAt(20); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date4.charCodeAt(21); + const yearDigit2 = date2.charCodeAt(21); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } - const yearDigit3 = date4.charCodeAt(22); + const yearDigit3 = date2.charCodeAt(22); if (yearDigit3 < 48 || yearDigit3 > 57) { return void 0; } - const yearDigit4 = date4.charCodeAt(23); + const yearDigit4 = date2.charCodeAt(23); if (yearDigit4 < 48 || yearDigit4 > 57) { return void 0; } @@ -45823,109 +49929,109 @@ var require_date = __commonJS({ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); return result.getUTCDay() === weekday ? result : void 0; } - function parseRfc850Date(date4) { + function parseRfc850Date(date2) { let commaIndex = -1; let weekday = -1; - if (date4[0] === "S") { - if (date4[1] === "u" && date4[2] === "n" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { + if (date2[0] === "S") { + if (date2[1] === "u" && date2[2] === "n" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { weekday = 0; commaIndex = 6; - } else if (date4[1] === "a" && date4[2] === "t" && date4[3] === "u" && date4[4] === "r" && date4[5] === "d" && date4[6] === "a" && date4[7] === "y") { + } else if (date2[1] === "a" && date2[2] === "t" && date2[3] === "u" && date2[4] === "r" && date2[5] === "d" && date2[6] === "a" && date2[7] === "y") { weekday = 6; commaIndex = 8; } - } else if (date4[0] === "M" && date4[1] === "o" && date4[2] === "n" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { + } else if (date2[0] === "M" && date2[1] === "o" && date2[2] === "n" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { weekday = 1; commaIndex = 6; - } else if (date4[0] === "T") { - if (date4[1] === "u" && date4[2] === "e" && date4[3] === "s" && date4[4] === "d" && date4[5] === "a" && date4[6] === "y") { + } else if (date2[0] === "T") { + if (date2[1] === "u" && date2[2] === "e" && date2[3] === "s" && date2[4] === "d" && date2[5] === "a" && date2[6] === "y") { weekday = 2; commaIndex = 7; - } else if (date4[1] === "h" && date4[2] === "u" && date4[3] === "r" && date4[4] === "s" && date4[5] === "d" && date4[6] === "a" && date4[7] === "y") { + } else if (date2[1] === "h" && date2[2] === "u" && date2[3] === "r" && date2[4] === "s" && date2[5] === "d" && date2[6] === "a" && date2[7] === "y") { weekday = 4; commaIndex = 8; } - } else if (date4[0] === "W" && date4[1] === "e" && date4[2] === "d" && date4[3] === "n" && date4[4] === "e" && date4[5] === "s" && date4[6] === "d" && date4[7] === "a" && date4[8] === "y") { + } else if (date2[0] === "W" && date2[1] === "e" && date2[2] === "d" && date2[3] === "n" && date2[4] === "e" && date2[5] === "s" && date2[6] === "d" && date2[7] === "a" && date2[8] === "y") { weekday = 3; commaIndex = 9; - } else if (date4[0] === "F" && date4[1] === "r" && date4[2] === "i" && date4[3] === "d" && date4[4] === "a" && date4[5] === "y") { + } else if (date2[0] === "F" && date2[1] === "r" && date2[2] === "i" && date2[3] === "d" && date2[4] === "a" && date2[5] === "y") { weekday = 5; commaIndex = 6; } else { return void 0; } - if (date4[commaIndex] !== "," || date4.length - commaIndex - 1 !== 23 || date4[commaIndex + 1] !== " " || date4[commaIndex + 4] !== "-" || date4[commaIndex + 8] !== "-" || date4[commaIndex + 11] !== " " || date4[commaIndex + 14] !== ":" || date4[commaIndex + 17] !== ":" || date4[commaIndex + 20] !== " " || date4[commaIndex + 21] !== "G" || date4[commaIndex + 22] !== "M" || date4[commaIndex + 23] !== "T") { + if (date2[commaIndex] !== "," || date2.length - commaIndex - 1 !== 23 || date2[commaIndex + 1] !== " " || date2[commaIndex + 4] !== "-" || date2[commaIndex + 8] !== "-" || date2[commaIndex + 11] !== " " || date2[commaIndex + 14] !== ":" || date2[commaIndex + 17] !== ":" || date2[commaIndex + 20] !== " " || date2[commaIndex + 21] !== "G" || date2[commaIndex + 22] !== "M" || date2[commaIndex + 23] !== "T") { return void 0; } let day = 0; - if (date4[commaIndex + 2] === "0") { - const code = date4.charCodeAt(commaIndex + 3); + if (date2[commaIndex + 2] === "0") { + const code = date2.charCodeAt(commaIndex + 3); if (code < 49 || code > 57) { return void 0; } day = code - 48; } else { - const code1 = date4.charCodeAt(commaIndex + 2); + const code1 = date2.charCodeAt(commaIndex + 2); if (code1 < 49 || code1 > 51) { return void 0; } - const code2 = date4.charCodeAt(commaIndex + 3); + const code2 = date2.charCodeAt(commaIndex + 3); if (code2 < 48 || code2 > 57) { return void 0; } day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "n") { + if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "n") { monthIdx = 0; - } else if (date4[commaIndex + 5] === "F" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "b") { + } else if (date2[commaIndex + 5] === "F" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "b") { monthIdx = 1; - } else if (date4[commaIndex + 5] === "M" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "r") { + } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "r") { monthIdx = 2; - } else if (date4[commaIndex + 5] === "A" && date4[commaIndex + 6] === "p" && date4[commaIndex + 7] === "r") { + } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "p" && date2[commaIndex + 7] === "r") { monthIdx = 3; - } else if (date4[commaIndex + 5] === "M" && date4[commaIndex + 6] === "a" && date4[commaIndex + 7] === "y") { + } else if (date2[commaIndex + 5] === "M" && date2[commaIndex + 6] === "a" && date2[commaIndex + 7] === "y") { monthIdx = 4; - } else if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "n") { + } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "n") { monthIdx = 5; - } else if (date4[commaIndex + 5] === "J" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "l") { + } else if (date2[commaIndex + 5] === "J" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "l") { monthIdx = 6; - } else if (date4[commaIndex + 5] === "A" && date4[commaIndex + 6] === "u" && date4[commaIndex + 7] === "g") { + } else if (date2[commaIndex + 5] === "A" && date2[commaIndex + 6] === "u" && date2[commaIndex + 7] === "g") { monthIdx = 7; - } else if (date4[commaIndex + 5] === "S" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "p") { + } else if (date2[commaIndex + 5] === "S" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "p") { monthIdx = 8; - } else if (date4[commaIndex + 5] === "O" && date4[commaIndex + 6] === "c" && date4[commaIndex + 7] === "t") { + } else if (date2[commaIndex + 5] === "O" && date2[commaIndex + 6] === "c" && date2[commaIndex + 7] === "t") { monthIdx = 9; - } else if (date4[commaIndex + 5] === "N" && date4[commaIndex + 6] === "o" && date4[commaIndex + 7] === "v") { + } else if (date2[commaIndex + 5] === "N" && date2[commaIndex + 6] === "o" && date2[commaIndex + 7] === "v") { monthIdx = 10; - } else if (date4[commaIndex + 5] === "D" && date4[commaIndex + 6] === "e" && date4[commaIndex + 7] === "c") { + } else if (date2[commaIndex + 5] === "D" && date2[commaIndex + 6] === "e" && date2[commaIndex + 7] === "c") { monthIdx = 11; } else { return void 0; } - const yearDigit1 = date4.charCodeAt(commaIndex + 9); + const yearDigit1 = date2.charCodeAt(commaIndex + 9); if (yearDigit1 < 48 || yearDigit1 > 57) { return void 0; } - const yearDigit2 = date4.charCodeAt(commaIndex + 10); + const yearDigit2 = date2.charCodeAt(commaIndex + 10); if (yearDigit2 < 48 || yearDigit2 > 57) { return void 0; } let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48); year += year < 70 ? 2e3 : 1900; let hour = 0; - if (date4[commaIndex + 12] === "0") { - const code = date4.charCodeAt(commaIndex + 13); + if (date2[commaIndex + 12] === "0") { + const code = date2.charCodeAt(commaIndex + 13); if (code < 48 || code > 57) { return void 0; } hour = code - 48; } else { - const code1 = date4.charCodeAt(commaIndex + 12); + const code1 = date2.charCodeAt(commaIndex + 12); if (code1 < 48 || code1 > 50) { return void 0; } - const code2 = date4.charCodeAt(commaIndex + 13); + const code2 = date2.charCodeAt(commaIndex + 13); if (code2 < 48 || code2 > 57) { return void 0; } @@ -45935,36 +50041,36 @@ var require_date = __commonJS({ hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; - if (date4[commaIndex + 15] === "0") { - const code = date4.charCodeAt(commaIndex + 16); + if (date2[commaIndex + 15] === "0") { + const code = date2.charCodeAt(commaIndex + 16); if (code < 48 || code > 57) { return void 0; } minute = code - 48; } else { - const code1 = date4.charCodeAt(commaIndex + 15); + const code1 = date2.charCodeAt(commaIndex + 15); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date4.charCodeAt(commaIndex + 16); + const code2 = date2.charCodeAt(commaIndex + 16); if (code2 < 48 || code2 > 57) { return void 0; } minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; - if (date4[commaIndex + 18] === "0") { - const code = date4.charCodeAt(commaIndex + 19); + if (date2[commaIndex + 18] === "0") { + const code = date2.charCodeAt(commaIndex + 19); if (code < 48 || code > 57) { return void 0; } second = code - 48; } else { - const code1 = date4.charCodeAt(commaIndex + 18); + const code1 = date2.charCodeAt(commaIndex + 18); if (code1 < 48 || code1 > 53) { return void 0; } - const code2 = date4.charCodeAt(commaIndex + 19); + const code2 = date2.charCodeAt(commaIndex + 19); if (code2 < 48 || code2 > 57) { return void 0; } @@ -46281,8 +50387,8 @@ var require_cache_handler = __commonJS({ } return strippedHeaders ?? resHeaders; } - function isValidDate2(date4) { - return date4 instanceof Date && Number.isFinite(date4.valueOf()); + function isValidDate2(date2) { + return date2 instanceof Date && Number.isFinite(date2.valueOf()); } module.exports = CacheHandler; } @@ -46597,20 +50703,20 @@ var require_cache6 = __commonJS({ } function handleUncachedResponse(dispatch, globalOpts, cacheKey, handler2, opts, reqCacheControl) { if (reqCacheControl?.["only-if-cached"]) { - let aborted3 = false; + let aborted2 = false; try { if (typeof handler2.onConnect === "function") { handler2.onConnect(() => { - aborted3 = true; + aborted2 = true; }); - if (aborted3) { + if (aborted2) { return; } } if (typeof handler2.onHeaders === "function") { handler2.onHeaders(504, [], () => { }, "Gateway Timeout"); - if (aborted3) { + if (aborted2) { return; } } @@ -46935,8 +51041,8 @@ var require_decompress = __commonJS({ } } }); - decompressor.on("error", (error42) => { - super.onResponseError(controller, error42); + decompressor.on("error", (error41) => { + super.onResponseError(controller, error41); }); } /** @@ -49275,17 +53381,17 @@ var require_fetch2 = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error42) { + abort(error41) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error42) { - error42 = new DOMException("The operation was aborted.", "AbortError"); + if (!error41) { + error41 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error42; - this.connection?.destroy(error42); - this.emit("terminated", error42); + this.serializedAbortReason = error41; + this.connection?.destroy(error41); + this.emit("terminated", error41); } }; function handleFetchDone(response) { @@ -49384,12 +53490,12 @@ var require_fetch2 = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request2, responseObject, error42) { + function abortFetch(p, request2, responseObject, error41) { if (p) { - p.reject(error42); + p.reject(error41); } if (request2.body?.stream != null && isReadable(request2.body.stream)) { - request2.body.stream.cancel(error42).catch((err) => { + request2.body.stream.cancel(error41).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -49401,7 +53507,7 @@ var require_fetch2 = __commonJS({ } const response = getResponseState(responseObject); if (response.body?.stream != null && isReadable(response.body.stream)) { - response.body.stream.cancel(error42).catch((err) => { + response.body.stream.cancel(error41).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -50112,7 +54218,7 @@ var require_fetch2 = __commonJS({ function dispatch({ body }) { const url2 = requestCurrentURL(request2); const agent2 = fetchParams.controller.dispatcher; - return new Promise((resolve, reject) => agent2.dispatch( + return new Promise((resolve2, reject) => agent2.dispatch( { path: url2.pathname + url2.search, origin: url2.origin, @@ -50187,7 +54293,7 @@ var require_fetch2 = __commonJS({ } } const onError = this.onError.bind(this); - resolve({ + resolve2({ status, statusText, headersList, @@ -50214,13 +54320,13 @@ var require_fetch2 = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error42) { + onError(error41) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error42); - fetchParams.controller.terminate(error42); - reject(error42); + this.body?.destroy(error41); + fetchParams.controller.terminate(error41); + reject(error41); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -50230,7 +54336,7 @@ var require_fetch2 = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve({ + resolve2({ status, statusText: STATUS_CODES[status], headersList, @@ -51053,11 +55159,11 @@ var require_util14 = __commonJS({ "Dec" ]; var IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0")); - function toIMFDate(date4) { - if (typeof date4 === "number") { - date4 = new Date(date4); + function toIMFDate(date2) { + if (typeof date2 === "number") { + date2 = new Date(date2); } - return `${IMFDays[date4.getUTCDay()]}, ${IMFPaddedNumbers[date4.getUTCDate()]} ${IMFMonths[date4.getUTCMonth()]} ${date4.getUTCFullYear()} ${IMFPaddedNumbers[date4.getUTCHours()]}:${IMFPaddedNumbers[date4.getUTCMinutes()]}:${IMFPaddedNumbers[date4.getUTCSeconds()]} GMT`; + return `${IMFDays[date2.getUTCDay()]}, ${IMFPaddedNumbers[date2.getUTCDate()]} ${IMFMonths[date2.getUTCMonth()]} ${date2.getUTCFullYear()} ${IMFPaddedNumbers[date2.getUTCHours()]}:${IMFPaddedNumbers[date2.getUTCMinutes()]}:${IMFPaddedNumbers[date2.getUTCSeconds()]} GMT`; } function validateCookieMaxAge(maxAge) { if (maxAge < 0) { @@ -51909,7 +56015,7 @@ var require_frame2 = __commonJS({ } catch { crypto2 = { // not full compatibility, but minimum. - randomFillSync: function randomFillSync(buffer2, _offset, _size3) { + randomFillSync: function randomFillSync(buffer2, _offset, _size2) { for (let i = 0; i < buffer2.length; ++i) { buffer2[i] = Math.random() * 255 | 0; } @@ -52369,9 +56475,9 @@ var require_receiver2 = __commonJS({ } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error42, data) => { - if (error42) { - failWebsocketConnection(this.#handler, 1007, error42.message); + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error41, data) => { + if (error41) { + failWebsocketConnection(this.#handler, 1007, error41.message); return; } this.writeFragments(data); @@ -53143,10 +57249,10 @@ var require_websocketerror = __commonJS({ * @param {string} reason */ static createUnvalidatedWebSocketError(message, code, reason) { - const error42 = new _WebSocketError(message, kConstruct); - error42.#closeCode = code; - error42.#reason = reason; - return error42; + const error41 = new _WebSocketError(message, kConstruct); + error41.#closeCode = code; + error41.#reason = reason; + return error41; } }; var { createUnvalidatedWebSocketError } = WebSocketError; @@ -53315,14 +57421,14 @@ var require_websocketstream = __commonJS({ data = new Uint8Array(ArrayBuffer.isView(chunk) ? new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) : chunk.slice()); opcode = opcodes.BINARY; } else { - let string4; + let string3; try { - string4 = webidl.converters.DOMString(chunk); + string3 = webidl.converters.DOMString(chunk); } catch (e) { promise.reject(e); return promise.promise; } - data = new TextEncoder().encode(string4); + data = new TextEncoder().encode(string3); opcode = opcodes.TEXT; } if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { @@ -53413,10 +57519,10 @@ var require_websocketstream = __commonJS({ reason }); } else { - const error42 = createUnvalidatedWebSocketError("unclean close", code, reason); - this.#readableStreamController.error(error42); - this.#writableStream.abort(error42); - this.#closedPromise.reject(error42); + const error41 = createUnvalidatedWebSocketError("unclean close", code, reason); + this.#readableStreamController.error(error41); + this.#writableStream.abort(error41); + this.#closedPromise.reject(error41); } } #closeUsingReason(reason) { @@ -53895,8 +58001,8 @@ var require_eventsource = __commonJS({ pipeline2( response.body.stream, eventSourceStream, - (error42) => { - if (error42?.aborted === false) { + (error41) => { + if (error41?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -54241,14 +58347,14 @@ var require_uri_templates = __commonJS({ "*": true }; var urlEscapedChars = /[:/&?#]/; - function notReallyPercentEncode(string4) { - return encodeURI(string4).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { + function notReallyPercentEncode(string3) { + return encodeURI(string3).replace(/%25[0-9][0-9]/g, function(doubleEncoded) { return "%" + doubleEncoded.substring(3); }); } - function isPercentEncoded(string4) { - string4 = string4.replace(/%../g, ""); - return encodeURIComponent(string4) === string4; + function isPercentEncoded(string3) { + string3 = string3.replace(/%../g, ""); + return encodeURIComponent(string3) === string3; } function uriTemplateSubstitution(spec) { var modifier = ""; @@ -54703,8 +58809,8 @@ var init_sury_s6Akl_oc = __esm({ "../node_modules/.pnpm/xsschema@0.3.5_arktype@2.1.28_effect@3.18.4_zod-to-json-schema@3.24.6_zod@3.25.76__zod@3.25.76/node_modules/xsschema/dist/sury-s6Akl-oc.js"() { init_index_CAcLDIRJ(); getToJsonSchemaFn3 = async () => { - const { toJSONSchema: toJSONSchema3 } = await tryImport(import("sury"), "sury"); - return (schema2) => toJSONSchema3(schema2); + const { toJSONSchema: toJSONSchema2 } = await tryImport(import("sury"), "sury"); + return (schema2) => toJSONSchema2(schema2); }; } }); @@ -54727,7 +58833,7 @@ var init_valibot_DBCeetIe = __esm({ // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js // @__NO_SIDE_EFFECTS__ -function $constructor(name, initializer4, params) { +function $constructor(name, initializer2, params) { function init(inst, def) { var _a; Object.defineProperty(inst, "_zod", { @@ -54736,7 +58842,7 @@ function $constructor(name, initializer4, params) { }); (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); inst._zod.traits.add(name); - initializer4(inst, def); + initializer2(inst, def); for (const k in _.prototype) { if (!(k in inst)) Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); @@ -55189,10 +59295,10 @@ function prefixIssues(path4, issues) { function unwrapMessage(message) { return typeof message === "string" ? message : message?.message; } -function finalizeIssue(iss, ctx, config3) { +function finalizeIssue(iss, ctx, config2) { const full = { ...iss, path: iss.path ?? [] }; if (!iss.message) { - const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input"; + const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input"; full.message = message; } delete full.inst; @@ -55236,7 +59342,7 @@ function cleanEnum(obj) { }).map((el) => el[1]); } var captureStackTrace, allowsEval, getParsedType4, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class; -var init_util = __esm({ +var init_util2 = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js"() { captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => { }; @@ -55317,10 +59423,10 @@ var init_util = __esm({ }); // ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js -function flattenError2(error42, mapper = (issue3) => issue3.message) { +function flattenError2(error41, mapper = (issue2) => issue2.message) { const fieldErrors = {}; const formErrors = []; - for (const sub of error42.issues) { + for (const sub of error41.issues) { if (sub.path.length > 0) { fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || []; fieldErrors[sub.path[0]].push(mapper(sub)); @@ -55330,32 +59436,32 @@ function flattenError2(error42, mapper = (issue3) => issue3.message) { } return { formErrors, fieldErrors }; } -function formatError(error42, _mapper) { - const mapper = _mapper || function(issue3) { - return issue3.message; +function formatError(error41, _mapper) { + const mapper = _mapper || function(issue2) { + return issue2.message; }; const fieldErrors = { _errors: [] }; - const processError = (error43) => { - for (const issue3 of error43.issues) { - if (issue3.code === "invalid_union" && issue3.errors.length) { - issue3.errors.map((issues) => processError({ issues })); - } else if (issue3.code === "invalid_key") { - processError({ issues: issue3.issues }); - } else if (issue3.code === "invalid_element") { - processError({ issues: issue3.issues }); - } else if (issue3.path.length === 0) { - fieldErrors._errors.push(mapper(issue3)); + const processError = (error42) => { + for (const issue2 of error42.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues })); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); } else { let curr = fieldErrors; let i = 0; - while (i < issue3.path.length) { - const el = issue3.path[i]; - const terminal = i === issue3.path.length - 1; + while (i < issue2.path.length) { + const el = issue2.path[i]; + const terminal = i === issue2.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue3)); + curr[el]._errors.push(mapper(issue2)); } curr = curr[el]; i++; @@ -55363,27 +59469,27 @@ function formatError(error42, _mapper) { } } }; - processError(error42); + processError(error41); return fieldErrors; } -function treeifyError(error42, _mapper) { - const mapper = _mapper || function(issue3) { - return issue3.message; +function treeifyError(error41, _mapper) { + const mapper = _mapper || function(issue2) { + return issue2.message; }; const result = { errors: [] }; - const processError = (error43, path4 = []) => { + const processError = (error42, path4 = []) => { var _a, _b; - for (const issue3 of error43.issues) { - if (issue3.code === "invalid_union" && issue3.errors.length) { - issue3.errors.map((issues) => processError({ issues }, issue3.path)); - } else if (issue3.code === "invalid_key") { - processError({ issues: issue3.issues }, issue3.path); - } else if (issue3.code === "invalid_element") { - processError({ issues: issue3.issues }, issue3.path); + for (const issue2 of error42.issues) { + if (issue2.code === "invalid_union" && issue2.errors.length) { + issue2.errors.map((issues) => processError({ issues }, issue2.path)); + } else if (issue2.code === "invalid_key") { + processError({ issues: issue2.issues }, issue2.path); + } else if (issue2.code === "invalid_element") { + processError({ issues: issue2.issues }, issue2.path); } else { - const fullpath = [...path4, ...issue3.path]; + const fullpath = [...path4, ...issue2.path]; if (fullpath.length === 0) { - result.errors.push(mapper(issue3)); + result.errors.push(mapper(issue2)); continue; } let curr = result; @@ -55401,14 +59507,14 @@ function treeifyError(error42, _mapper) { curr = curr.items[el]; } if (terminal) { - curr.errors.push(mapper(issue3)); + curr.errors.push(mapper(issue2)); } i++; } } } }; - processError(error42); + processError(error41); return result; } function toDotPath(path4) { @@ -55428,21 +59534,21 @@ function toDotPath(path4) { } return segs.join(""); } -function prettifyError(error42) { +function prettifyError(error41) { const lines = []; - const issues = [...error42.issues].sort((a, b) => a.path.length - b.path.length); - for (const issue3 of issues) { - lines.push(`\u2716 ${issue3.message}`); - if (issue3.path?.length) - lines.push(` \u2192 at ${toDotPath(issue3.path)}`); + const issues = [...error41.issues].sort((a, b) => a.path.length - b.path.length); + for (const issue2 of issues) { + lines.push(`\u2716 ${issue2.message}`); + if (issue2.path?.length) + lines.push(` \u2192 at ${toDotPath(issue2.path)}`); } return lines.join("\n"); } var initializer, $ZodError, $ZodRealError; -var init_errors = __esm({ +var init_errors2 = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js"() { init_core(); - init_util(); + init_util2(); initializer = (inst, def) => { inst.name = "$ZodError"; Object.defineProperty(inst, "_zod", { @@ -55475,8 +59581,8 @@ var _parse, parse3, _parseAsync, parseAsync, _safeParse, safeParse2, _safeParseA var init_parse = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js"() { init_core(); - init_errors(); - init_util(); + init_errors2(); + init_util2(); _parse = (_Err) => (schema2, value2, _ctx, _params) => { const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false }; const result = schema2._zod.run({ value: value2, issues: [] }, ctx); @@ -55587,13 +59693,13 @@ function time(args3) { return new RegExp(`^${timeSource(args3)}$`); } function datetime(args3) { - const time4 = timeSource({ precision: args3.precision }); + const time2 = timeSource({ precision: args3.precision }); const opts = ["Z"]; if (args3.local) opts.push(""); if (args3.offset) opts.push(`([+-]\\d{2}:\\d{2})`); - const timeRegex4 = `${time4}(?:${opts.join("|")})`; + const timeRegex4 = `${time2}(?:${opts.join("|")})`; return new RegExp(`^${dateSource}T(?:${timeRegex4})$`); } var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid2, uuid4, uuid6, uuid7, email2, html5Email, rfc5322Email, unicodeEmail, browserEmail, _emoji, ipv4, ipv6, cidrv4, cidrv6, base642, base64url, hostname, domain, e164, dateSource, date, string2, bigint, integer2, number2, boolean, _null, _undefined, lowercase, uppercase; @@ -55608,10 +59714,10 @@ var init_regexes = __esm({ duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/; 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)?)??$/; 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})$/; - uuid2 = (version3) => { - if (!version3) + uuid2 = (version2) => { + if (!version2) 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)$/; - 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})$`); + return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`); }; uuid4 = /* @__PURE__ */ uuid2(4); uuid6 = /* @__PURE__ */ uuid2(6); @@ -55659,7 +59765,7 @@ var init_checks = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/checks.js"() { init_core(); init_regexes(); - init_util(); + init_util2(); $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => { var _a; inst._zod ?? (inst._zod = {}); @@ -56263,8 +60369,8 @@ function isValidBase64(data) { function isValidBase64URL(data) { if (!base64url.test(data)) return false; - const base644 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); - const padded = base644.padEnd(Math.ceil(base644.length / 4) * 4, "="); + const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/"); + const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "="); return isValidBase64(padded); } function isValidJWT4(token, algorithm = null) { @@ -56486,9 +60592,9 @@ var init_schemas = __esm({ init_doc(); init_parse(); init_regexes(); - init_util(); + init_util2(); init_versions(); - init_util(); + init_util2(); $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => { var _a; inst ?? (inst = {}); @@ -57150,16 +61256,16 @@ var init_schemas = __esm({ return (payload, ctx) => fn2(shape, payload, ctx); }; let fastpass; - const isObject5 = isObject3; + const isObject4 = isObject3; const jit = !globalConfig.jitless; - const allowsEval3 = allowsEval; - const fastEnabled = jit && allowsEval3.value; + const allowsEval2 = allowsEval; + const fastEnabled = jit && allowsEval2.value; const catchall = def.catchall; let value2; inst._zod.parse = (payload, ctx) => { value2 ?? (value2 = _normalized.value); const input = payload.value; - if (!isObject5(input)) { + if (!isObject4(input)) { payload.issues.push({ expected: "object", code: "invalid_type", @@ -57896,7 +62002,7 @@ function ar_default() { var error2; var init_ar = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ar.js"() { - init_util(); + init_util2(); error2 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }, @@ -57907,7 +62013,7 @@ var init_ar = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -57957,51 +62063,51 @@ var init_ar = __esm({ jwt: "JWT", template_literal: "\u0645\u062F\u062E\u0644" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - 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 ${issue3.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType5(issue3.input)}`; + 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 ${issue2.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")}`; + if (issue2.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(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.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 ${issue3.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue3.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 ${issue3.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue3.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 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.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 ${issue2.origin ?? "\u0627\u0644\u0642\u064A\u0645\u0629"} ${adj} ${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue3.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; } - return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue3.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue3.minimum.toString()}`; + return `\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${issue2.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${adj} ${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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 "${issue3.prefix}"`; + return `\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${issue2.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 `${Nouns[_issue.format] ?? issue3.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`; + return `${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor}`; + 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 ${issue2.divisor}`; case "unrecognized_keys": - return `\u0645\u0639\u0631\u0641${issue3.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue3.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue3.keys, "\u060C ")}`; + return `\u0645\u0639\u0631\u0641${issue2.keys.length > 1 ? "\u0627\u062A" : ""} \u063A\u0631\u064A\u0628${issue2.keys.length > 1 ? "\u0629" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; case "invalid_key": - return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue3.origin}`; + return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.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 ${issue3.origin}`; + return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${issue2.origin}`; default: return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"; } @@ -58019,7 +62125,7 @@ function az_default() { var error3; var init_az = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/az.js"() { - init_util(); + init_util2(); error3 = () => { const Sizable = { string: { unit: "simvol", verb: "olmal\u0131d\u0131r" }, @@ -58030,7 +62136,7 @@ var init_az = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -58080,30 +62186,30 @@ var init_az = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue3.expected}, daxil olan ${parsedType5(issue3.input)}`; + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${issue2.expected}, daxil olan ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue3.values[0])}`; - return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${stringifyPrimitive(issue2.values[0])}`; + return `Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue3.origin ?? "d\u0259y\u0259r"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element"}`; - return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue3.origin ?? "d\u0259y\u0259r"} ${adj}${issue3.maximum.toString()}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; + return `\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${issue2.origin ?? "d\u0259y\u0259r"} ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; - return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue3.origin} ${adj}${issue3.minimum.toString()}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${issue2.origin} ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Yanl\u0131\u015F m\u0259tn: "${_issue.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`; if (_issue.format === "ends_with") @@ -58112,18 +62218,18 @@ var init_az = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `Yanl\u0131\u015F ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Yanl\u0131\u015F \u0259d\u0259d: ${issue3.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; + return `Yanl\u0131\u015F \u0259d\u0259d: ${issue2.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`; case "unrecognized_keys": - return `Tan\u0131nmayan a\xE7ar${issue3.keys.length > 1 ? "lar" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Tan\u0131nmayan a\xE7ar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `${issue3.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`; case "invalid_union": return "Yanl\u0131\u015F d\u0259y\u0259r"; case "invalid_element": - return `${issue3.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; + return `${issue2.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`; default: return `Yanl\u0131\u015F d\u0259y\u0259r`; } @@ -58156,7 +62262,7 @@ function be_default() { var error4; var init_be = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/be.js"() { - init_util(); + init_util2(); error4 = () => { const Sizable = { string: { @@ -58195,7 +62301,7 @@ var init_be = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -58245,36 +62351,36 @@ var init_be = __esm({ jwt: "JWT", template_literal: "\u0443\u0432\u043E\u0434" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue3.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType5(issue3.input)}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${issue2.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")}`; + if (issue2.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(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - const maxValue = Number(issue3.maximum); + const maxValue = Number(issue2.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 ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue3.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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.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 ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue3.maximum.toString()}`; + 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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - const minValue = Number(issue3.minimum); + const minValue = Number(issue2.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 ${issue3.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue3.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 ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${sizing.verb} ${adj}${issue2.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 ${issue3.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue3.minimum.toString()}`; + return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${issue2.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -58283,18 +62389,18 @@ var init_be = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor}`; + 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 ${issue2.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue3.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue3.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${issue2.keys.length > 1 ? "\u043A\u043B\u044E\u0447\u044B" : "\u043A\u043B\u044E\u0447"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue3.origin}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${issue2.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 ${issue3.origin}`; + return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${issue2.origin}`; default: return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434`; } @@ -58312,7 +62418,7 @@ function ca_default() { var error5; var init_ca = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ca.js"() { - init_util(); + init_util2(); error5 = () => { const Sizable = { string: { unit: "car\xE0cters", verb: "contenir" }, @@ -58323,7 +62429,7 @@ var init_ca = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -58373,32 +62479,32 @@ var init_ca = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Tipus inv\xE0lid: s'esperava ${issue3.expected}, s'ha rebut ${parsedType5(issue3.input)}`; + return `Tipus inv\xE0lid: s'esperava ${issue2.expected}, s'ha rebut ${parsedType4(issue2.input)}`; // return `Tipus invΓ lid: s'esperava ${issue.expected}, s'ha rebut ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue3.values[0])}`; - return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue3.values, " o ")}`; + if (issue2.values.length === 1) + return `Valor inv\xE0lid: s'esperava ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3 inv\xE0lida: s'esperava una de ${joinValues(issue2.values, " o ")}`; case "too_big": { - const adj = issue3.inclusive ? "com a m\xE0xim" : "menys de"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "com a m\xE0xim" : "menys de"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Massa gran: s'esperava que ${issue3.origin ?? "el valor"} contingu\xE9s ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Massa gran: s'esperava que ${issue3.origin ?? "el valor"} fos ${adj} ${issue3.maximum.toString()}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} contingu\xE9s ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Massa gran: s'esperava que ${issue2.origin ?? "el valor"} fos ${adj} ${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? "com a m\xEDnim" : "m\xE9s de"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "com a m\xEDnim" : "m\xE9s de"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Massa petit: s'esperava que ${issue3.origin} contingu\xE9s ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; + return `Massa petit: s'esperava que ${issue2.origin} contingu\xE9s ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; } - return `Massa petit: s'esperava que ${issue3.origin} fos ${adj} ${issue3.minimum.toString()}`; + return `Massa petit: s'esperava que ${issue2.origin} fos ${adj} ${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `Format inv\xE0lid: ha de comen\xE7ar amb "${_issue.prefix}"`; } @@ -58408,19 +62514,19 @@ var init_ca = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `Format inv\xE0lid per a ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue3.divisor}`; + return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${issue2.divisor}`; case "unrecognized_keys": - return `Clau${issue3.keys.length > 1 ? "s" : ""} no reconeguda${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Clau${issue2.keys.length > 1 ? "s" : ""} no reconeguda${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Clau inv\xE0lida a ${issue3.origin}`; + return `Clau inv\xE0lida a ${issue2.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 ${issue3.origin}`; + return `Element inv\xE0lid a ${issue2.origin}`; default: return `Entrada inv\xE0lida`; } @@ -58438,7 +62544,7 @@ function cs_default() { var error6; var init_cs = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/cs.js"() { - init_util(); + init_util2(); error6 = () => { const Sizable = { string: { unit: "znak\u016F", verb: "m\xEDt" }, @@ -58449,7 +62555,7 @@ var init_cs = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -58517,32 +62623,32 @@ var init_cs = __esm({ jwt: "JWT", template_literal: "vstup" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue3.expected}, obdr\u017Eeno ${parsedType5(issue3.input)}`; + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${issue2.expected}, obdr\u017Eeno ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue3.values[0])}`; - return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${stringifyPrimitive(issue2.values[0])}`; + return `Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue3.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue3.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue3.maximum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue3.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue3.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED m\xEDt ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "prvk\u016F"}`; } - return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue3.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue3.minimum.toString()}`; + return `Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${issue2.origin ?? "hodnota"} mus\xED b\xFDt ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -58551,18 +62657,18 @@ var init_cs = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `Neplatn\xFD form\xE1t ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue3.divisor}`; + return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${issue2.divisor}`; case "unrecognized_keys": - return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue3.keys, ", ")}`; + return `Nezn\xE1m\xE9 kl\xED\u010De: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Neplatn\xFD kl\xED\u010D v ${issue3.origin}`; + return `Neplatn\xFD kl\xED\u010D v ${issue2.origin}`; case "invalid_union": return "Neplatn\xFD vstup"; case "invalid_element": - return `Neplatn\xE1 hodnota v ${issue3.origin}`; + return `Neplatn\xE1 hodnota v ${issue2.origin}`; default: return `Neplatn\xFD vstup`; } @@ -58580,7 +62686,7 @@ function de_default() { var error7; var init_de = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/de.js"() { - init_util(); + init_util2(); error7 = () => { const Sizable = { string: { unit: "Zeichen", verb: "zu haben" }, @@ -58591,7 +62697,7 @@ var init_de = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -58641,31 +62747,31 @@ var init_de = __esm({ jwt: "JWT", template_literal: "Eingabe" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Ung\xFCltige Eingabe: erwartet ${issue3.expected}, erhalten ${parsedType5(issue3.input)}`; + return `Ung\xFCltige Eingabe: erwartet ${issue2.expected}, erhalten ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue3.values[0])}`; - return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Ung\xFCltige Eingabe: erwartet ${stringifyPrimitive(issue2.values[0])}`; + return `Ung\xFCltige Option: erwartet eine von ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Zu gro\xDF: erwartet, dass ${issue3.origin ?? "Wert"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; - return `Zu gro\xDF: erwartet, dass ${issue3.origin ?? "Wert"} ${adj}${issue3.maximum.toString()} ist`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "Elemente"} hat`; + return `Zu gro\xDF: erwartet, dass ${issue2.origin ?? "Wert"} ${adj}${issue2.maximum.toString()} ist`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Zu klein: erwartet, dass ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} hat`; + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} hat`; } - return `Zu klein: erwartet, dass ${issue3.origin} ${adj}${issue3.minimum.toString()} ist`; + return `Zu klein: erwartet, dass ${issue2.origin} ${adj}${issue2.minimum.toString()} ist`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Ung\xFCltiger String: muss mit "${_issue.prefix}" beginnen`; if (_issue.format === "ends_with") @@ -58674,18 +62780,18 @@ var init_de = __esm({ 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: ${Nouns[_issue.format] ?? issue3.format}`; + return `Ung\xFCltig: ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue3.divisor} sein`; + return `Ung\xFCltige Zahl: muss ein Vielfaches von ${issue2.divisor} sein`; case "unrecognized_keys": - return `${issue3.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue3.keys, ", ")}`; + return `${issue2.keys.length > 1 ? "Unbekannte Schl\xFCssel" : "Unbekannter Schl\xFCssel"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Ung\xFCltiger Schl\xFCssel in ${issue3.origin}`; + return `Ung\xFCltiger Schl\xFCssel in ${issue2.origin}`; case "invalid_union": return "Ung\xFCltige Eingabe"; case "invalid_element": - return `Ung\xFCltiger Wert in ${issue3.origin}`; + return `Ung\xFCltiger Wert in ${issue2.origin}`; default: return `Ung\xFCltige Eingabe`; } @@ -58701,9 +62807,9 @@ function en_default4() { }; } var parsedType, error8; -var init_en = __esm({ +var init_en2 = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/en.js"() { - init_util(); + init_util2(); parsedType = (data) => { const t = typeof data; switch (t) { @@ -58764,31 +62870,31 @@ var init_en = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Invalid input: expected ${issue3.expected}, received ${parsedType(issue3.input)}`; + return `Invalid input: expected ${issue2.expected}, received ${parsedType(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue3.values[0])}`; - return `Invalid option: expected one of ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.values[0])}`; + return `Invalid option: expected one of ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Too big: expected ${issue3.origin ?? "value"} to have ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue3.origin ?? "value"} to be ${adj}${issue3.maximum.toString()}`; + return `Too big: expected ${issue2.origin ?? "value"} to have ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `Too big: expected ${issue2.origin ?? "value"} to be ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Too small: expected ${issue3.origin} to have ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Too small: expected ${issue2.origin} to have ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Too small: expected ${issue3.origin} to be ${adj}${issue3.minimum.toString()}`; + return `Too small: expected ${issue2.origin} to be ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `Invalid string: must start with "${_issue.prefix}"`; } @@ -58798,18 +62904,18 @@ var init_en = __esm({ return `Invalid string: must include "${_issue.includes}"`; if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue3.divisor}`; + return `Invalid number: must be a multiple of ${issue2.divisor}`; case "unrecognized_keys": - return `Unrecognized key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Unrecognized key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Invalid key in ${issue3.origin}`; + return `Invalid key in ${issue2.origin}`; case "invalid_union": return "Invalid input"; case "invalid_element": - return `Invalid value in ${issue3.origin}`; + return `Invalid value in ${issue2.origin}`; default: return `Invalid input`; } @@ -58827,7 +62933,7 @@ function eo_default() { var parsedType2, error9; var init_eo = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/eo.js"() { - init_util(); + init_util2(); parsedType2 = (data) => { const t = typeof data; switch (t) { @@ -58888,31 +62994,31 @@ var init_eo = __esm({ jwt: "JWT", template_literal: "enigo" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Nevalida enigo: atendi\u011Dis ${issue3.expected}, ricevi\u011Dis ${parsedType2(issue3.input)}`; + return `Nevalida enigo: atendi\u011Dis ${issue2.expected}, ricevi\u011Dis ${parsedType2(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue3.values[0])}`; - return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Nevalida enigo: atendi\u011Dis ${stringifyPrimitive(issue2.values[0])}`; + return `Nevalida opcio: atendi\u011Dis unu el ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Tro granda: atendi\u011Dis ke ${issue3.origin ?? "valoro"} havu ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementojn"}`; - return `Tro granda: atendi\u011Dis ke ${issue3.origin ?? "valoro"} havu ${adj}${issue3.maximum.toString()}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementojn"}`; + return `Tro granda: atendi\u011Dis ke ${issue2.origin ?? "valoro"} havu ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Tro malgranda: atendi\u011Dis ke ${issue3.origin} havu ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} havu ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Tro malgranda: atendi\u011Dis ke ${issue3.origin} estu ${adj}${issue3.minimum.toString()}`; + return `Tro malgranda: atendi\u011Dis ke ${issue2.origin} estu ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenci\u011Di per "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -58921,18 +63027,18 @@ var init_eo = __esm({ return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`; if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`; - return `Nevalida ${Nouns[_issue.format] ?? issue3.format}`; + return `Nevalida ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Nevalida nombro: devas esti oblo de ${issue3.divisor}`; + return `Nevalida nombro: devas esti oblo de ${issue2.divisor}`; case "unrecognized_keys": - return `Nekonata${issue3.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue3.keys.length > 1 ? "j" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Nekonata${issue2.keys.length > 1 ? "j" : ""} \u015Dlosilo${issue2.keys.length > 1 ? "j" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Nevalida \u015Dlosilo en ${issue3.origin}`; + return `Nevalida \u015Dlosilo en ${issue2.origin}`; case "invalid_union": return "Nevalida enigo"; case "invalid_element": - return `Nevalida valoro en ${issue3.origin}`; + return `Nevalida valoro en ${issue2.origin}`; default: return `Nevalida enigo`; } @@ -58950,7 +63056,7 @@ function es_default() { var error10; var init_es = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/es.js"() { - init_util(); + init_util2(); error10 = () => { const Sizable = { string: { unit: "caracteres", verb: "tener" }, @@ -58961,7 +63067,7 @@ var init_es = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59011,32 +63117,32 @@ var init_es = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Entrada inv\xE1lida: se esperaba ${issue3.expected}, recibido ${parsedType5(issue3.input)}`; + return `Entrada inv\xE1lida: se esperaba ${issue2.expected}, recibido ${parsedType4(issue2.input)}`; // return `Entrada invΓ‘lida: se esperaba ${issue.expected}, recibido ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue3.values[0])}`; - return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: se esperaba ${stringifyPrimitive(issue2.values[0])}`; + return `Opci\xF3n inv\xE1lida: se esperaba una de ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Demasiado grande: se esperaba que ${issue3.origin ?? "valor"} tuviera ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Demasiado grande: se esperaba que ${issue3.origin ?? "valor"} fuera ${adj}${issue3.maximum.toString()}`; + return `Demasiado grande: se esperaba que ${issue2.origin ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Demasiado grande: se esperaba que ${issue2.origin ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Demasiado peque\xF1o: se esperaba que ${issue3.origin} tuviera ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Demasiado peque\xF1o: se esperaba que ${issue2.origin} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Demasiado peque\xF1o: se esperaba que ${issue3.origin} fuera ${adj}${issue3.minimum.toString()}`; + return `Demasiado peque\xF1o: se esperaba que ${issue2.origin} fuera ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Cadena inv\xE1lida: debe comenzar con "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -59045,18 +63151,18 @@ var init_es = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `Inv\xE1lido ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue3.divisor}`; + return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${issue2.divisor}`; case "unrecognized_keys": - return `Llave${issue3.keys.length > 1 ? "s" : ""} desconocida${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Llave${issue2.keys.length > 1 ? "s" : ""} desconocida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Llave inv\xE1lida en ${issue3.origin}`; + return `Llave inv\xE1lida en ${issue2.origin}`; case "invalid_union": return "Entrada inv\xE1lida"; case "invalid_element": - return `Valor inv\xE1lido en ${issue3.origin}`; + return `Valor inv\xE1lido en ${issue2.origin}`; default: return `Entrada inv\xE1lida`; } @@ -59074,7 +63180,7 @@ function fa_default() { var error11; var init_fa = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fa.js"() { - init_util(); + init_util2(); error11 = () => { const Sizable = { string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }, @@ -59085,7 +63191,7 @@ var init_fa = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59135,33 +63241,33 @@ var init_fa = __esm({ jwt: "JWT", template_literal: "\u0648\u0631\u0648\u062F\u06CC" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${issue3.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType5(issue3.input)} \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 ${issue2.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${parsedType4(issue2.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`; case "invalid_value": - if (issue3.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(issue3.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`; + if (issue2.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(issue2.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(issue3.values, "|")} \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(issue2.values, "|")} \u0645\u06CC\u200C\u0628\u0648\u062F`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue3.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`; } - return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue3.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${issue2.origin ?? "\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0628\u0627\u0634\u062F`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0628\u0627\u0634\u062F`; } - return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} \u0628\u0627\u0634\u062F`; + return `\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0628\u0627\u0634\u062F`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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`; } @@ -59174,18 +63280,18 @@ var init_fa = __esm({ 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 `${Nouns[_issue.format] ?? issue3.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; + return `${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor} \u0628\u0627\u0634\u062F`; + return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${issue2.divisor} \u0628\u0627\u0634\u062F`; case "unrecognized_keys": - return `\u06A9\u0644\u06CC\u062F${issue3.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue3.keys, ", ")}`; + return `\u06A9\u0644\u06CC\u062F${issue2.keys.length > 1 ? "\u0647\u0627\u06CC" : ""} \u0646\u0627\u0634\u0646\u0627\u0633: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue3.origin}`; + return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${issue2.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 ${issue3.origin}`; + return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${issue2.origin}`; default: return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631`; } @@ -59203,7 +63309,7 @@ function fi_default() { var error12; var init_fi = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fi.js"() { - init_util(); + init_util2(); error12 = () => { const Sizable = { string: { unit: "merkki\xE4", subject: "merkkijonon" }, @@ -59218,7 +63324,7 @@ var init_fi = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59268,32 +63374,32 @@ var init_fi = __esm({ jwt: "JWT", template_literal: "templaattimerkkijono" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Virheellinen tyyppi: odotettiin ${issue3.expected}, oli ${parsedType5(issue3.input)}`; + return `Virheellinen tyyppi: odotettiin ${issue2.expected}, oli ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue3.values[0])}`; - return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Virheellinen sy\xF6te: t\xE4ytyy olla ${stringifyPrimitive(issue2.values[0])}`; + return `Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue3.maximum.toString()} ${sizing.unit}`.trim(); + return `Liian suuri: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.maximum.toString()} ${sizing.unit}`.trim(); } - return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue3.maximum.toString()}`; + return `Liian suuri: arvon t\xE4ytyy olla ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue3.minimum.toString()} ${sizing.unit}`.trim(); + return `Liian pieni: ${sizing.subject} t\xE4ytyy olla ${adj}${issue2.minimum.toString()} ${sizing.unit}`.trim(); } - return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue3.minimum.toString()}`; + return `Liian pieni: arvon t\xE4ytyy olla ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Virheellinen sy\xF6te: t\xE4ytyy alkaa "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -59303,12 +63409,12 @@ var init_fi = __esm({ if (_issue.format === "regex") { return `Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${_issue.pattern}`; } - return `Virheellinen ${Nouns[_issue.format] ?? issue3.format}`; + return `Virheellinen ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Virheellinen luku: t\xE4ytyy olla luvun ${issue3.divisor} monikerta`; + return `Virheellinen luku: t\xE4ytyy olla luvun ${issue2.divisor} monikerta`; case "unrecognized_keys": - return `${issue3.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue3.keys, ", ")}`; + return `${issue2.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": return "Virheellinen avain tietueessa"; case "invalid_union": @@ -59332,7 +63438,7 @@ function fr_default() { var error13; var init_fr = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr.js"() { - init_util(); + init_util2(); error13 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -59343,7 +63449,7 @@ var init_fr = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59393,31 +63499,31 @@ var init_fr = __esm({ jwt: "JWT", template_literal: "entr\xE9e" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Entr\xE9e invalide : ${issue3.expected} attendu, ${parsedType5(issue3.input)} re\xE7u`; + return `Entr\xE9e invalide : ${issue2.expected} attendu, ${parsedType4(issue2.input)} re\xE7u`; case "invalid_value": - if (issue3.values.length === 1) - return `Entr\xE9e invalide : ${stringifyPrimitive(issue3.values[0])} attendu`; - return `Option invalide : une valeur parmi ${joinValues(issue3.values, "|")} attendue`; + if (issue2.values.length === 1) + return `Entr\xE9e invalide : ${stringifyPrimitive(issue2.values[0])} attendu`; + return `Option invalide : une valeur parmi ${joinValues(issue2.values, "|")} attendue`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Trop grand : ${issue3.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; - return `Trop grand : ${issue3.origin ?? "valeur"} doit \xEAtre ${adj}${issue3.maximum.toString()}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`; + return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Trop petit : ${issue3.origin} doit ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : ${issue3.origin} doit \xEAtre ${adj}${issue3.minimum.toString()}`; + return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -59426,18 +63532,18 @@ var init_fr = __esm({ return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; if (_issue.format === "regex") return `Cha\xEEne invalide : doit correspondre au mod\xE8le ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue3.format} invalide`; + return `${Nouns[_issue.format] ?? issue2.format} invalide`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue3.divisor}`; + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue3.keys.length > 1 ? "s" : ""} non reconnue${issue3.keys.length > 1 ? "s" : ""} : ${joinValues(issue3.keys, ", ")}`; + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue3.origin}`; + return `Cl\xE9 invalide dans ${issue2.origin}`; case "invalid_union": return "Entr\xE9e invalide"; case "invalid_element": - return `Valeur invalide dans ${issue3.origin}`; + return `Valeur invalide dans ${issue2.origin}`; default: return `Entr\xE9e invalide`; } @@ -59455,7 +63561,7 @@ function fr_CA_default() { var error14; var init_fr_CA = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/fr-CA.js"() { - init_util(); + init_util2(); error14 = () => { const Sizable = { string: { unit: "caract\xE8res", verb: "avoir" }, @@ -59466,7 +63572,7 @@ var init_fr_CA = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59516,31 +63622,31 @@ var init_fr_CA = __esm({ jwt: "JWT", template_literal: "entr\xE9e" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Entr\xE9e invalide : attendu ${issue3.expected}, re\xE7u ${parsedType5(issue3.input)}`; + return `Entr\xE9e invalide : attendu ${issue2.expected}, re\xE7u ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue3.values[0])}`; - return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Entr\xE9e invalide : attendu ${stringifyPrimitive(issue2.values[0])}`; + return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "\u2264" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "\u2264" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Trop grand : attendu que ${issue3.origin ?? "la valeur"} ait ${adj}${issue3.maximum.toString()} ${sizing.unit}`; - return `Trop grand : attendu que ${issue3.origin ?? "la valeur"} soit ${adj}${issue3.maximum.toString()}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} ait ${adj}${issue2.maximum.toString()} ${sizing.unit}`; + return `Trop grand : attendu que ${issue2.origin ?? "la valeur"} soit ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? "\u2265" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "\u2265" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Trop petit : attendu que ${issue3.origin} ait ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Trop petit : attendu que ${issue2.origin} ait ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Trop petit : attendu que ${issue3.origin} soit ${adj}${issue3.minimum.toString()}`; + return `Trop petit : attendu que ${issue2.origin} soit ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `Cha\xEEne invalide : doit commencer par "${_issue.prefix}"`; } @@ -59550,18 +63656,18 @@ var init_fr_CA = __esm({ return `Cha\xEEne invalide : doit inclure "${_issue.includes}"`; if (_issue.format === "regex") return `Cha\xEEne invalide : doit correspondre au motif ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue3.format} invalide`; + return `${Nouns[_issue.format] ?? issue2.format} invalide`; } case "not_multiple_of": - return `Nombre invalide : doit \xEAtre un multiple de ${issue3.divisor}`; + return `Nombre invalide : doit \xEAtre un multiple de ${issue2.divisor}`; case "unrecognized_keys": - return `Cl\xE9${issue3.keys.length > 1 ? "s" : ""} non reconnue${issue3.keys.length > 1 ? "s" : ""} : ${joinValues(issue3.keys, ", ")}`; + return `Cl\xE9${issue2.keys.length > 1 ? "s" : ""} non reconnue${issue2.keys.length > 1 ? "s" : ""} : ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Cl\xE9 invalide dans ${issue3.origin}`; + return `Cl\xE9 invalide dans ${issue2.origin}`; case "invalid_union": return "Entr\xE9e invalide"; case "invalid_element": - return `Valeur invalide dans ${issue3.origin}`; + return `Valeur invalide dans ${issue2.origin}`; default: return `Entr\xE9e invalide`; } @@ -59579,7 +63685,7 @@ function he_default() { var error15; var init_he = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/he.js"() { - init_util(); + init_util2(); error15 = () => { const Sizable = { string: { unit: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA", verb: "\u05DC\u05DB\u05DC\u05D5\u05DC" }, @@ -59590,7 +63696,7 @@ var init_he = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59640,32 +63746,32 @@ var init_he = __esm({ jwt: "JWT", template_literal: "\u05E7\u05DC\u05D8" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue3.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType5(issue3.input)}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${issue2.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${parsedType4(issue2.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue3.values[0])}`; - return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${stringifyPrimitive(issue2.values[0])}`; + return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue3.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue3.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.maximum.toString()}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"}`; + return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${issue2.origin ?? "value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue3.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue3.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue3.minimum.toString()}`; + return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${issue2.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -59674,18 +63780,18 @@ var init_he = __esm({ return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${_issue.includes}"`; if (_issue.format === "regex") return `\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue3.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; + return `${Nouns[_issue.format] ?? issue2.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } 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 ${issue3.divisor}`; + 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 ${issue2.divisor}`; case "unrecognized_keys": - return `\u05DE\u05E4\u05EA\u05D7${issue3.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue3.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue3.keys, ", ")}`; + return `\u05DE\u05E4\u05EA\u05D7${issue2.keys.length > 1 ? "\u05D5\u05EA" : ""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${issue2.keys.length > 1 ? "\u05D9\u05DD" : "\u05D4"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue3.origin}`; + return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; case "invalid_union": return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"; case "invalid_element": - return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue3.origin}`; + return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${issue2.origin}`; default: return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`; } @@ -59703,7 +63809,7 @@ function hu_default() { var error16; var init_hu = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/hu.js"() { - init_util(); + init_util2(); error16 = () => { const Sizable = { string: { unit: "karakter", verb: "legyen" }, @@ -59714,7 +63820,7 @@ var init_hu = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59764,32 +63870,32 @@ var init_hu = __esm({ jwt: "JWT", template_literal: "bemenet" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue3.expected}, a kapott \xE9rt\xE9k ${parsedType5(issue3.input)}`; + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${issue2.expected}, a kapott \xE9rt\xE9k ${parsedType4(issue2.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue3.values[0])}`; - return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`; + return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `T\xFAl nagy: ${issue3.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elem"}`; - return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue3.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue3.maximum.toString()}`; + return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`; + return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue3.origin} m\xE9rete t\xFAl kicsi ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue3.origin} t\xFAl kicsi ${adj}${issue3.minimum.toString()}`; + return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `\xC9rv\xE9nytelen string: "${_issue.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`; if (_issue.format === "ends_with") @@ -59798,18 +63904,18 @@ var init_hu = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\xC9rv\xE9nytelen ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\xC9rv\xE9nytelen sz\xE1m: ${issue3.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; + return `\xC9rv\xE9nytelen sz\xE1m: ${issue2.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`; case "unrecognized_keys": - return `Ismeretlen kulcs${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Ismeretlen kulcs${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\xC9rv\xE9nytelen kulcs ${issue3.origin}`; + return `\xC9rv\xE9nytelen kulcs ${issue2.origin}`; case "invalid_union": return "\xC9rv\xE9nytelen bemenet"; case "invalid_element": - return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue3.origin}`; + return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${issue2.origin}`; default: return `\xC9rv\xE9nytelen bemenet`; } @@ -59827,7 +63933,7 @@ function id_default() { var error17; var init_id = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/id.js"() { - init_util(); + init_util2(); error17 = () => { const Sizable = { string: { unit: "karakter", verb: "memiliki" }, @@ -59838,7 +63944,7 @@ var init_id = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -59888,31 +63994,31 @@ var init_id = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Input tidak valid: diharapkan ${issue3.expected}, diterima ${parsedType5(issue3.input)}`; + return `Input tidak valid: diharapkan ${issue2.expected}, diterima ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Input tidak valid: diharapkan ${stringifyPrimitive(issue3.values[0])}`; - return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Input tidak valid: diharapkan ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Terlalu besar: diharapkan ${issue3.origin ?? "value"} memiliki ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: diharapkan ${issue3.origin ?? "value"} menjadi ${adj}${issue3.maximum.toString()}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} memiliki ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: diharapkan ${issue2.origin ?? "value"} menjadi ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Terlalu kecil: diharapkan ${issue3.origin} memiliki ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Terlalu kecil: diharapkan ${issue2.origin} memiliki ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Terlalu kecil: diharapkan ${issue3.origin} menjadi ${adj}${issue3.minimum.toString()}`; + return `Terlalu kecil: diharapkan ${issue2.origin} menjadi ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `String tidak valid: harus dimulai dengan "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -59921,18 +64027,18 @@ var init_id = __esm({ return `String tidak valid: harus menyertakan "${_issue.includes}"`; if (_issue.format === "regex") return `String tidak valid: harus sesuai pola ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue3.format} tidak valid`; + return `${Nouns[_issue.format] ?? issue2.format} tidak valid`; } case "not_multiple_of": - return `Angka tidak valid: harus kelipatan dari ${issue3.divisor}`; + return `Angka tidak valid: harus kelipatan dari ${issue2.divisor}`; case "unrecognized_keys": - return `Kunci tidak dikenali ${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Kunci tidak dikenali ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Kunci tidak valid di ${issue3.origin}`; + return `Kunci tidak valid di ${issue2.origin}`; case "invalid_union": return "Input tidak valid"; case "invalid_element": - return `Nilai tidak valid di ${issue3.origin}`; + return `Nilai tidak valid di ${issue2.origin}`; default: return `Input tidak valid`; } @@ -59950,7 +64056,7 @@ function it_default() { var error18; var init_it = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/it.js"() { - init_util(); + init_util2(); error18 = () => { const Sizable = { string: { unit: "caratteri", verb: "avere" }, @@ -59961,7 +64067,7 @@ var init_it = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60011,32 +64117,32 @@ var init_it = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Input non valido: atteso ${issue3.expected}, ricevuto ${parsedType5(issue3.input)}`; + return `Input non valido: atteso ${issue2.expected}, ricevuto ${parsedType4(issue2.input)}`; // return `Input non valido: atteso ${issue.expected}, ricevuto ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Input non valido: atteso ${stringifyPrimitive(issue3.values[0])}`; - return `Opzione non valida: atteso uno tra ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Input non valido: atteso ${stringifyPrimitive(issue2.values[0])}`; + return `Opzione non valida: atteso uno tra ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Troppo grande: ${issue3.origin ?? "valore"} deve avere ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementi"}`; - return `Troppo grande: ${issue3.origin ?? "valore"} deve essere ${adj}${issue3.maximum.toString()}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve avere ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementi"}`; + return `Troppo grande: ${issue2.origin ?? "valore"} deve essere ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Troppo piccolo: ${issue3.origin} deve avere ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Troppo piccolo: ${issue2.origin} deve avere ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Troppo piccolo: ${issue3.origin} deve essere ${adj}${issue3.minimum.toString()}`; + return `Troppo piccolo: ${issue2.origin} deve essere ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Stringa non valida: deve iniziare con "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -60045,18 +64151,18 @@ var init_it = __esm({ return `Stringa non valida: deve includere "${_issue.includes}"`; if (_issue.format === "regex") return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`; - return `Invalid ${Nouns[_issue.format] ?? issue3.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Numero non valido: deve essere un multiplo di ${issue3.divisor}`; + return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`; case "unrecognized_keys": - return `Chiav${issue3.keys.length > 1 ? "i" : "e"} non riconosciut${issue3.keys.length > 1 ? "e" : "a"}: ${joinValues(issue3.keys, ", ")}`; + return `Chiav${issue2.keys.length > 1 ? "i" : "e"} non riconosciut${issue2.keys.length > 1 ? "e" : "a"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Chiave non valida in ${issue3.origin}`; + return `Chiave non valida in ${issue2.origin}`; case "invalid_union": return "Input non valido"; case "invalid_element": - return `Valore non valido in ${issue3.origin}`; + return `Valore non valido in ${issue2.origin}`; default: return `Input non valido`; } @@ -60074,7 +64180,7 @@ function ja_default() { var error19; var init_ja = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ja.js"() { - init_util(); + init_util2(); error19 = () => { const Sizable = { string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" }, @@ -60085,7 +64191,7 @@ var init_ja = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60135,30 +64241,30 @@ var init_ja = __esm({ jwt: "JWT", template_literal: "\u5165\u529B\u5024" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u7121\u52B9\u306A\u5165\u529B: ${issue3.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType5(issue3.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u5165\u529B: ${issue2.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${parsedType4(issue2.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`; case "invalid_value": - if (issue3.values.length === 1) - return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue3.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; - return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue3.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + if (issue2.values.length === 1) + return `\u7121\u52B9\u306A\u5165\u529B: ${stringifyPrimitive(issue2.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`; + return `\u7121\u52B9\u306A\u9078\u629E: ${joinValues(issue2.values, "\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; case "too_big": { - const adj = issue3.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "\u4EE5\u4E0B\u3067\u3042\u308B" : "\u3088\u308A\u5C0F\u3055\u3044"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue3.origin ?? "\u5024"}\u306F${issue3.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue3.origin ?? "\u5024"}\u306F${issue3.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${sizing.unit ?? "\u8981\u7D20"}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5927\u304D\u3059\u304E\u308B\u5024: ${issue2.origin ?? "\u5024"}\u306F${issue2.maximum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } case "too_small": { - const adj = issue3.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "\u4EE5\u4E0A\u3067\u3042\u308B" : "\u3088\u308A\u5927\u304D\u3044"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue3.origin}\u306F${issue3.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; - return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue3.origin}\u306F${issue3.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${sizing.unit}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u5C0F\u3055\u3059\u304E\u308B\u5024: ${issue2.origin}\u306F${issue2.minimum.toString()}${adj}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -60167,18 +64273,18 @@ var init_ja = __esm({ 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${Nouns[_issue.format] ?? issue3.format}`; + return `\u7121\u52B9\u306A${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\u7121\u52B9\u306A\u6570\u5024: ${issue3.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`; + return `\u7121\u52B9\u306A\u6570\u5024: ${issue2.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${issue3.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue3.keys, "\u3001")}`; + return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${issue2.keys.length > 1 ? "\u7FA4" : ""}: ${joinValues(issue2.keys, "\u3001")}`; case "invalid_key": - return `${issue3.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`; case "invalid_union": return "\u7121\u52B9\u306A\u5165\u529B"; case "invalid_element": - return `${issue3.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; + return `${issue2.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`; default: return `\u7121\u52B9\u306A\u5165\u529B`; } @@ -60196,7 +64302,7 @@ function kh_default() { var error20; var init_kh = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/kh.js"() { - init_util(); + init_util2(); error20 = () => { const Sizable = { string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }, @@ -60207,7 +64313,7 @@ var init_kh = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60257,31 +64363,31 @@ var init_kh = __esm({ jwt: "JWT", template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - 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 ${issue3.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType5(issue3.input)}`; + 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 ${issue2.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")}`; + if (issue2.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(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; - return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue3.maximum.toString()}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u1792\u17B6\u178F\u17BB"}`; + return `\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin ?? "\u178F\u1798\u17D2\u179B\u17C3"} ${adj} ${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin} ${adj} ${issue3.minimum.toString()} ${sizing.unit}`; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`; } - return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue3.origin} ${adj} ${issue3.minimum.toString()}`; + return `\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${issue2.origin} ${adj} ${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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}"`; } @@ -60291,18 +64397,18 @@ var init_kh = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor}`; + 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 ${issue2.divisor}`; case "unrecognized_keys": - return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue3.keys, ", ")}`; + return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${joinValues(issue2.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 ${issue3.origin}`; + return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${issue2.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 ${issue3.origin}`; + 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 ${issue2.origin}`; default: return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C`; } @@ -60320,7 +64426,7 @@ function ko_default() { var error21; var init_ko = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ko.js"() { - init_util(); + init_util2(); error21 = () => { const Sizable = { string: { unit: "\uBB38\uC790", verb: "to have" }, @@ -60331,7 +64437,7 @@ var init_ko = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60381,35 +64487,35 @@ var init_ko = __esm({ jwt: "JWT", template_literal: "\uC785\uB825" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue3.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType5(issue3.input)}\uC785\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${issue2.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${parsedType4(issue2.input)}\uC785\uB2C8\uB2E4`; case "invalid_value": - if (issue3.values.length === 1) - return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue3.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; - return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue3.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + if (issue2.values.length === 1) + return `\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${stringifyPrimitive(issue2.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC635\uC158: ${joinValues(issue2.values, "\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`; case "too_big": { - const adj = issue3.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; + const adj = issue2.inclusive ? "\uC774\uD558" : "\uBBF8\uB9CC"; const suffix2 = adj === "\uBBF8\uB9CC" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue3.origin); + const sizing = getSizing(issue2.origin); const unit = sizing?.unit ?? "\uC694\uC18C"; if (sizing) - return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue3.maximum.toString()}${unit} ${adj}${suffix2}`; - return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue3.maximum.toString()} ${adj}${suffix2}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()}${unit} ${adj}${suffix2}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${issue2.maximum.toString()} ${adj}${suffix2}`; } case "too_small": { - const adj = issue3.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; + const adj = issue2.inclusive ? "\uC774\uC0C1" : "\uCD08\uACFC"; const suffix2 = adj === "\uC774\uC0C1" ? "\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4" : "\uC5EC\uC57C \uD569\uB2C8\uB2E4"; - const sizing = getSizing(issue3.origin); + const sizing = getSizing(issue2.origin); const unit = sizing?.unit ?? "\uC694\uC18C"; if (sizing) { - return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue3.minimum.toString()}${unit} ${adj}${suffix2}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()}${unit} ${adj}${suffix2}`; } - return `${issue3.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue3.minimum.toString()} ${adj}${suffix2}`; + return `${issue2.origin ?? "\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${issue2.minimum.toString()} ${adj}${suffix2}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${_issue.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`; } @@ -60419,18 +64525,18 @@ var init_ko = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\uC798\uBABB\uB41C ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue3.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; + return `\uC798\uBABB\uB41C \uC22B\uC790: ${issue2.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`; case "unrecognized_keys": - return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue3.keys, ", ")}`; + return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\uC798\uBABB\uB41C \uD0A4: ${issue3.origin}`; + return `\uC798\uBABB\uB41C \uD0A4: ${issue2.origin}`; case "invalid_union": return `\uC798\uBABB\uB41C \uC785\uB825`; case "invalid_element": - return `\uC798\uBABB\uB41C \uAC12: ${issue3.origin}`; + return `\uC798\uBABB\uB41C \uAC12: ${issue2.origin}`; default: return `\uC798\uBABB\uB41C \uC785\uB825`; } @@ -60448,7 +64554,7 @@ function mk_default() { var error22; var init_mk = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/mk.js"() { - init_util(); + init_util2(); error22 = () => { const Sizable = { string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }, @@ -60459,7 +64565,7 @@ var init_mk = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60509,32 +64615,32 @@ var init_mk = __esm({ jwt: "JWT", template_literal: "\u0432\u043D\u0435\u0441" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType5(issue3.input)}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${parsedType4(issue2.input)}`; // return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive(issue3.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(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Invalid input: expected ${stringifyPrimitive(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.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 ${issue3.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue3.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 ${issue3.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue3.maximum.toString()}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.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 ${issue2.origin ?? "\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue3.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue3.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 ${issue2.origin} \u0434\u0430 \u0438\u043C\u0430 ${adj}${issue2.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 ${issue3.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue3.minimum.toString()}`; + return `\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${issue2.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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}"`; } @@ -60544,18 +64650,18 @@ var init_mk = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `Invalid ${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor}`; + 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 ${issue2.divisor}`; case "unrecognized_keys": - return `${issue3.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(issue3.keys, ", ")}`; + return `${issue2.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(issue2.keys, ", ")}`; case "invalid_key": - return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue3.origin}`; + return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${issue2.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 ${issue3.origin}`; + return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${issue2.origin}`; default: return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441`; } @@ -60573,7 +64679,7 @@ function ms_default() { var error23; var init_ms = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ms.js"() { - init_util(); + init_util2(); error23 = () => { const Sizable = { string: { unit: "aksara", verb: "mempunyai" }, @@ -60584,7 +64690,7 @@ var init_ms = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60634,31 +64740,31 @@ var init_ms = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Input tidak sah: dijangka ${issue3.expected}, diterima ${parsedType5(issue3.input)}`; + return `Input tidak sah: dijangka ${issue2.expected}, diterima ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Input tidak sah: dijangka ${stringifyPrimitive(issue3.values[0])}`; - return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Input tidak sah: dijangka ${stringifyPrimitive(issue2.values[0])}`; + return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Terlalu besar: dijangka ${issue3.origin ?? "nilai"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elemen"}`; - return `Terlalu besar: dijangka ${issue3.origin ?? "nilai"} adalah ${adj}${issue3.maximum.toString()}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemen"}`; + return `Terlalu besar: dijangka ${issue2.origin ?? "nilai"} adalah ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Terlalu kecil: dijangka ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Terlalu kecil: dijangka ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Terlalu kecil: dijangka ${issue3.origin} adalah ${adj}${issue3.minimum.toString()}`; + return `Terlalu kecil: dijangka ${issue2.origin} adalah ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -60667,18 +64773,18 @@ var init_ms = __esm({ return `String tidak sah: mesti mengandungi "${_issue.includes}"`; if (_issue.format === "regex") return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue3.format} tidak sah`; + return `${Nouns[_issue.format] ?? issue2.format} tidak sah`; } case "not_multiple_of": - return `Nombor tidak sah: perlu gandaan ${issue3.divisor}`; + return `Nombor tidak sah: perlu gandaan ${issue2.divisor}`; case "unrecognized_keys": - return `Kunci tidak dikenali: ${joinValues(issue3.keys, ", ")}`; + return `Kunci tidak dikenali: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Kunci tidak sah dalam ${issue3.origin}`; + return `Kunci tidak sah dalam ${issue2.origin}`; case "invalid_union": return "Input tidak sah"; case "invalid_element": - return `Nilai tidak sah dalam ${issue3.origin}`; + return `Nilai tidak sah dalam ${issue2.origin}`; default: return `Input tidak sah`; } @@ -60696,7 +64802,7 @@ function nl_default() { var error24; var init_nl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/nl.js"() { - init_util(); + init_util2(); error24 = () => { const Sizable = { string: { unit: "tekens" }, @@ -60707,7 +64813,7 @@ var init_nl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60757,31 +64863,31 @@ var init_nl = __esm({ jwt: "JWT", template_literal: "invoer" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Ongeldige invoer: verwacht ${issue3.expected}, ontving ${parsedType5(issue3.input)}`; + return `Ongeldige invoer: verwacht ${issue2.expected}, ontving ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue3.values[0])}`; - return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue2.values[0])}`; + return `Ongeldige optie: verwacht \xE9\xE9n van ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; - return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`; + return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`; + return `Te lang: verwacht dat ${issue2.origin ?? "waarde"} ${adj}${issue2.maximum.toString()} is`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} bevat`; + return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit} bevat`; } - return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`; + return `Te kort: verwacht dat ${issue2.origin} ${adj}${issue2.minimum.toString()} is`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`; } @@ -60791,18 +64897,18 @@ var init_nl = __esm({ return `Ongeldige tekst: moet "${_issue.includes}" bevatten`; if (_issue.format === "regex") return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`; - return `Ongeldig: ${Nouns[_issue.format] ?? issue3.format}`; + return `Ongeldig: ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Ongeldig getal: moet een veelvoud van ${issue3.divisor} zijn`; + return `Ongeldig getal: moet een veelvoud van ${issue2.divisor} zijn`; case "unrecognized_keys": - return `Onbekende key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Onbekende key${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Ongeldige key in ${issue3.origin}`; + return `Ongeldige key in ${issue2.origin}`; case "invalid_union": return "Ongeldige invoer"; case "invalid_element": - return `Ongeldige waarde in ${issue3.origin}`; + return `Ongeldige waarde in ${issue2.origin}`; default: return `Ongeldige invoer`; } @@ -60820,7 +64926,7 @@ function no_default() { var error25; var init_no = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/no.js"() { - init_util(); + init_util2(); error25 = () => { const Sizable = { string: { unit: "tegn", verb: "\xE5 ha" }, @@ -60831,7 +64937,7 @@ var init_no = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -60881,31 +64987,31 @@ var init_no = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Ugyldig input: forventet ${issue3.expected}, fikk ${parsedType5(issue3.input)}`; + return `Ugyldig input: forventet ${issue2.expected}, fikk ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Ugyldig verdi: forventet ${stringifyPrimitive(issue3.values[0])}`; - return `Ugyldig valg: forventet en av ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Ugyldig verdi: forventet ${stringifyPrimitive(issue2.values[0])}`; + return `Ugyldig valg: forventet en av ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `For stor(t): forventet ${issue3.origin ?? "value"} til \xE5 ha ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementer"}`; - return `For stor(t): forventet ${issue3.origin ?? "value"} til \xE5 ha ${adj}${issue3.maximum.toString()}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`; + return `For stor(t): forventet ${issue2.origin ?? "value"} til \xE5 ha ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `For lite(n): forventet ${issue3.origin} til \xE5 ha ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `For lite(n): forventet ${issue3.origin} til \xE5 ha ${adj}${issue3.minimum.toString()}`; + return `For lite(n): forventet ${issue2.origin} til \xE5 ha ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Ugyldig streng: m\xE5 starte med "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -60914,18 +65020,18 @@ var init_no = __esm({ return `Ugyldig streng: m\xE5 inneholde "${_issue.includes}"`; if (_issue.format === "regex") return `Ugyldig streng: m\xE5 matche m\xF8nsteret ${_issue.pattern}`; - return `Ugyldig ${Nouns[_issue.format] ?? issue3.format}`; + return `Ugyldig ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue3.divisor}`; + return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${issue2.divisor}`; case "unrecognized_keys": - return `${issue3.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue3.keys, ", ")}`; + return `${issue2.keys.length > 1 ? "Ukjente n\xF8kler" : "Ukjent n\xF8kkel"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Ugyldig n\xF8kkel i ${issue3.origin}`; + return `Ugyldig n\xF8kkel i ${issue2.origin}`; case "invalid_union": return "Ugyldig input"; case "invalid_element": - return `Ugyldig verdi i ${issue3.origin}`; + return `Ugyldig verdi i ${issue2.origin}`; default: return `Ugyldig input`; } @@ -60943,7 +65049,7 @@ function ota_default() { var error26; var init_ota = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ota.js"() { - init_util(); + init_util2(); error26 = () => { const Sizable = { string: { unit: "harf", verb: "olmal\u0131d\u0131r" }, @@ -60954,7 +65060,7 @@ var init_ota = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61004,32 +65110,32 @@ var init_ota = __esm({ jwt: "JWT", template_literal: "giren" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `F\xE2sit giren: umulan ${issue3.expected}, al\u0131nan ${parsedType5(issue3.input)}`; + return `F\xE2sit giren: umulan ${issue2.expected}, al\u0131nan ${parsedType4(issue2.input)}`; // return `FΓ’sit giren: umulan ${issue.expected}, alΔ±nan ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `F\xE2sit giren: umulan ${stringifyPrimitive(issue3.values[0])}`; - return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `F\xE2sit giren: umulan ${stringifyPrimitive(issue2.values[0])}`; + return `F\xE2sit tercih: m\xFBteberler ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Fazla b\xFCy\xFCk: ${issue3.origin ?? "value"}, ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; - return `Fazla b\xFCy\xFCk: ${issue3.origin ?? "value"}, ${adj}${issue3.maximum.toString()} olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmal\u0131yd\u0131.`; + return `Fazla b\xFCy\xFCk: ${issue2.origin ?? "value"}, ${adj}${issue2.maximum.toString()} olmal\u0131yd\u0131.`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Fazla k\xFC\xE7\xFCk: ${issue3.origin}, ${adj}${issue3.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} ${sizing.unit} sahip olmal\u0131yd\u0131.`; } - return `Fazla k\xFC\xE7\xFCk: ${issue3.origin}, ${adj}${issue3.minimum.toString()} olmal\u0131yd\u0131.`; + return `Fazla k\xFC\xE7\xFCk: ${issue2.origin}, ${adj}${issue2.minimum.toString()} olmal\u0131yd\u0131.`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `F\xE2sit metin: "${_issue.prefix}" ile ba\u015Flamal\u0131.`; if (_issue.format === "ends_with") @@ -61038,18 +65144,18 @@ var init_ota = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `F\xE2sit ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `F\xE2sit say\u0131: ${issue3.divisor} kat\u0131 olmal\u0131yd\u0131.`; + return `F\xE2sit say\u0131: ${issue2.divisor} kat\u0131 olmal\u0131yd\u0131.`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar ${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Tan\u0131nmayan anahtar ${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `${issue3.origin} i\xE7in tan\u0131nmayan anahtar var.`; + return `${issue2.origin} i\xE7in tan\u0131nmayan anahtar var.`; case "invalid_union": return "Giren tan\u0131namad\u0131."; case "invalid_element": - return `${issue3.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; + return `${issue2.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`; default: return `K\u0131ymet tan\u0131namad\u0131.`; } @@ -61067,7 +65173,7 @@ function ps_default() { var error27; var init_ps = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ps.js"() { - init_util(); + init_util2(); error27 = () => { const Sizable = { string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }, @@ -61078,7 +65184,7 @@ var init_ps = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61128,33 +65234,33 @@ var init_ps = __esm({ jwt: "JWT", template_literal: "\u0648\u0631\u0648\u062F\u064A" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue3.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType5(issue3.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${issue2.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${parsedType4(issue2.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`; case "invalid_value": - if (issue3.values.length === 1) { - return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue3.values[0])} \u0648\u0627\u06CC`; + if (issue2.values.length === 1) { + return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${stringifyPrimitive(issue2.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(issue3.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; + return `\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${joinValues(issue2.values, "|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue3.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`; } - return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue3.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue3.maximum.toString()} \u0648\u064A`; + return `\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${issue2.origin ?? "\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${adj}${issue2.maximum.toString()} \u0648\u064A`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} ${sizing.unit} \u0648\u0644\u0631\u064A`; } - return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue3.origin} \u0628\u0627\u06CC\u062F ${adj}${issue3.minimum.toString()} \u0648\u064A`; + return `\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${issue2.origin} \u0628\u0627\u06CC\u062F ${adj}${issue2.minimum.toString()} \u0648\u064A`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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`; } @@ -61167,18 +65273,18 @@ var init_ps = __esm({ 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 `${Nouns[_issue.format] ?? issue3.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; + return `${Nouns[_issue.format] ?? issue2.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`; } case "not_multiple_of": - return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue3.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; + return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${issue2.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`; case "unrecognized_keys": - return `\u0646\u0627\u0633\u0645 ${issue3.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue3.keys, ", ")}`; + return `\u0646\u0627\u0633\u0645 ${issue2.keys.length > 1 ? "\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647" : "\u06A9\u0644\u06CC\u0689"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue3.origin} \u06A9\u06D0`; + return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${issue2.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 ${issue3.origin} \u06A9\u06D0`; + return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${issue2.origin} \u06A9\u06D0`; default: return `\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A`; } @@ -61196,7 +65302,7 @@ function pl_default() { var error28; var init_pl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pl.js"() { - init_util(); + init_util2(); error28 = () => { const Sizable = { string: { unit: "znak\xF3w", verb: "mie\u0107" }, @@ -61207,7 +65313,7 @@ var init_pl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61257,32 +65363,32 @@ var init_pl = __esm({ jwt: "JWT", template_literal: "wej\u015Bcie" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue3.expected}, otrzymano ${parsedType5(issue3.input)}`; + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${issue2.expected}, otrzymano ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue3.values[0])}`; - return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${stringifyPrimitive(issue2.values[0])}`; + return `Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; + return `Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element\xF3w"}`; } - return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue3.maximum.toString()}`; + return `Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue3.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; + return `Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie mie\u0107 ${adj}${issue2.minimum.toString()} ${sizing.unit ?? "element\xF3w"}`; } - return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue3.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue3.minimum.toString()}`; + return `Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${issue2.origin ?? "warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -61291,18 +65397,18 @@ var init_pl = __esm({ 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) ${Nouns[_issue.format] ?? issue3.format}`; + return `Nieprawid\u0142ow(y/a/e) ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue3.divisor}`; + return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${issue2.divisor}`; case "unrecognized_keys": - return `Nierozpoznane klucze${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Nierozpoznane klucze${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Nieprawid\u0142owy klucz w ${issue3.origin}`; + return `Nieprawid\u0142owy klucz w ${issue2.origin}`; case "invalid_union": return "Nieprawid\u0142owe dane wej\u015Bciowe"; case "invalid_element": - return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue3.origin}`; + return `Nieprawid\u0142owa warto\u015B\u0107 w ${issue2.origin}`; default: return `Nieprawid\u0142owe dane wej\u015Bciowe`; } @@ -61320,7 +65426,7 @@ function pt_default() { var error29; var init_pt = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/pt.js"() { - init_util(); + init_util2(); error29 = () => { const Sizable = { string: { unit: "caracteres", verb: "ter" }, @@ -61331,7 +65437,7 @@ var init_pt = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61381,31 +65487,31 @@ var init_pt = __esm({ jwt: "JWT", template_literal: "entrada" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Tipo inv\xE1lido: esperado ${issue3.expected}, recebido ${parsedType5(issue3.input)}`; + return `Tipo inv\xE1lido: esperado ${issue2.expected}, recebido ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue3.values[0])}`; - return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Entrada inv\xE1lida: esperado ${stringifyPrimitive(issue2.values[0])}`; + return `Op\xE7\xE3o inv\xE1lida: esperada uma das ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Muito grande: esperado que ${issue3.origin ?? "valor"} tivesse ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementos"}`; - return `Muito grande: esperado que ${issue3.origin ?? "valor"} fosse ${adj}${issue3.maximum.toString()}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`; + return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Muito pequeno: esperado que ${issue3.origin} tivesse ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Muito pequeno: esperado que ${issue3.origin} fosse ${adj}${issue3.minimum.toString()}`; + return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Texto inv\xE1lido: deve come\xE7ar com "${_issue.prefix}"`; if (_issue.format === "ends_with") @@ -61414,18 +65520,18 @@ var init_pt = __esm({ return `Texto inv\xE1lido: deve incluir "${_issue.includes}"`; if (_issue.format === "regex") return `Texto inv\xE1lido: deve corresponder ao padr\xE3o ${_issue.pattern}`; - return `${Nouns[_issue.format] ?? issue3.format} inv\xE1lido`; + return `${Nouns[_issue.format] ?? issue2.format} inv\xE1lido`; } case "not_multiple_of": - return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue3.divisor}`; + return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`; case "unrecognized_keys": - return `Chave${issue3.keys.length > 1 ? "s" : ""} desconhecida${issue3.keys.length > 1 ? "s" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Chave inv\xE1lida em ${issue3.origin}`; + return `Chave inv\xE1lida em ${issue2.origin}`; case "invalid_union": return "Entrada inv\xE1lida"; case "invalid_element": - return `Valor inv\xE1lido em ${issue3.origin}`; + return `Valor inv\xE1lido em ${issue2.origin}`; default: return `Campo inv\xE1lido`; } @@ -61458,7 +65564,7 @@ function ru_default() { var error30; var init_ru = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ru.js"() { - init_util(); + init_util2(); error30 = () => { const Sizable = { string: { @@ -61497,7 +65603,7 @@ var init_ru = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61547,36 +65653,36 @@ var init_ru = __esm({ jwt: "JWT", template_literal: "\u0432\u0432\u043E\u0434" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue3.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType5(issue3.input)}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${issue2.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")}`; + if (issue2.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(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - const maxValue = Number(issue3.maximum); + const maxValue = Number(issue2.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 ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue3.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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.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 ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue3.maximum.toString()}`; + 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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - const minValue = Number(issue3.minimum); + const minValue = Number(issue2.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 ${issue3.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue3.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 ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${adj}${issue2.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 ${issue3.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue3.minimum.toString()}`; + 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 ${issue2.origin} \u0431\u0443\u0434\u0435\u0442 ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -61585,18 +65691,18 @@ var init_ru = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor}`; + 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 ${issue2.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue3.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue3.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${issue2.keys.length > 1 ? "\u044B\u0435" : "\u044B\u0439"} \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0438" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue3.origin}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${issue2.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 ${issue3.origin}`; + return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${issue2.origin}`; default: return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435`; } @@ -61614,7 +65720,7 @@ function sl_default() { var error31; var init_sl = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sl.js"() { - init_util(); + init_util2(); error31 = () => { const Sizable = { string: { unit: "znakov", verb: "imeti" }, @@ -61625,7 +65731,7 @@ var init_sl = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61675,31 +65781,31 @@ var init_sl = __esm({ jwt: "JWT", template_literal: "vnos" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Neveljaven vnos: pri\u010Dakovano ${issue3.expected}, prejeto ${parsedType5(issue3.input)}`; + return `Neveljaven vnos: pri\u010Dakovano ${issue2.expected}, prejeto ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue3.values[0])}`; - return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Neveljaven vnos: pri\u010Dakovano ${stringifyPrimitive(issue2.values[0])}`; + return `Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Preveliko: pri\u010Dakovano, da bo ${issue3.origin ?? "vrednost"} imelo ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementov"}`; - return `Preveliko: pri\u010Dakovano, da bo ${issue3.origin ?? "vrednost"} ${adj}${issue3.maximum.toString()}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} imelo ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementov"}`; + return `Preveliko: pri\u010Dakovano, da bo ${issue2.origin ?? "vrednost"} ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Premajhno: pri\u010Dakovano, da bo ${issue3.origin} imelo ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} imelo ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Premajhno: pri\u010Dakovano, da bo ${issue3.origin} ${adj}${issue3.minimum.toString()}`; + return `Premajhno: pri\u010Dakovano, da bo ${issue2.origin} ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `Neveljaven niz: mora se za\u010Deti z "${_issue.prefix}"`; } @@ -61709,18 +65815,18 @@ var init_sl = __esm({ return `Neveljaven niz: mora vsebovati "${_issue.includes}"`; if (_issue.format === "regex") return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`; - return `Neveljaven ${Nouns[_issue.format] ?? issue3.format}`; + return `Neveljaven ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue3.divisor}`; + return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${issue2.divisor}`; case "unrecognized_keys": - return `Neprepoznan${issue3.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue3.keys, ", ")}`; + return `Neprepoznan${issue2.keys.length > 1 ? "i klju\u010Di" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Neveljaven klju\u010D v ${issue3.origin}`; + return `Neveljaven klju\u010D v ${issue2.origin}`; case "invalid_union": return "Neveljaven vnos"; case "invalid_element": - return `Neveljavna vrednost v ${issue3.origin}`; + return `Neveljavna vrednost v ${issue2.origin}`; default: return "Neveljaven vnos"; } @@ -61738,7 +65844,7 @@ function sv_default() { var error32; var init_sv = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/sv.js"() { - init_util(); + init_util2(); error32 = () => { const Sizable = { string: { unit: "tecken", verb: "att ha" }, @@ -61749,7 +65855,7 @@ var init_sv = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61799,32 +65905,32 @@ var init_sv = __esm({ jwt: "JWT", template_literal: "mall-literal" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue3.expected}, fick ${parsedType5(issue3.input)}`; + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${issue2.expected}, fick ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue3.values[0])}`; - return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Ogiltig inmatning: f\xF6rv\xE4ntat ${stringifyPrimitive(issue2.values[0])}`; + return `Ogiltigt val: f\xF6rv\xE4ntade en av ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "element"}`; + return `F\xF6r stor(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "element"}`; } - return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.maximum.toString()}`; + return `F\xF6r stor(t): f\xF6rv\xE4ntat ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue3.origin ?? "v\xE4rdet"} att ha ${adj}${issue3.minimum.toString()}`; + return `F\xF6r lite(t): f\xF6rv\xE4ntade ${issue2.origin ?? "v\xE4rdet"} att ha ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${_issue.prefix}"`; } @@ -61834,18 +65940,18 @@ var init_sv = __esm({ 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) ${Nouns[_issue.format] ?? issue3.format}`; + return `Ogiltig(t) ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue3.divisor}`; + return `Ogiltigt tal: m\xE5ste vara en multipel av ${issue2.divisor}`; case "unrecognized_keys": - return `${issue3.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue3.keys, ", ")}`; + return `${issue2.keys.length > 1 ? "Ok\xE4nda nycklar" : "Ok\xE4nd nyckel"}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Ogiltig nyckel i ${issue3.origin ?? "v\xE4rdet"}`; + return `Ogiltig nyckel i ${issue2.origin ?? "v\xE4rdet"}`; case "invalid_union": return "Ogiltig input"; case "invalid_element": - return `Ogiltigt v\xE4rde i ${issue3.origin ?? "v\xE4rdet"}`; + return `Ogiltigt v\xE4rde i ${issue2.origin ?? "v\xE4rdet"}`; default: return `Ogiltig input`; } @@ -61863,7 +65969,7 @@ function ta_default() { var error33; var init_ta = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ta.js"() { - init_util(); + init_util2(); error33 = () => { 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" }, @@ -61874,7 +65980,7 @@ var init_ta = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -61924,32 +66030,32 @@ var init_ta = __esm({ jwt: "JWT", template_literal: "input" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - 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 ${issue3.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType5(issue3.input)}`; + 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 ${issue2.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; + if (issue2.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(issue2.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(issue2.values, "|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.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 ${issue3.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue3.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 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.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 ${issue3.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue3.maximum.toString()} \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 ${issue2.origin ?? "\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${adj}${issue2.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.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 ${issue3.origin} ${adj}${issue3.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 ${issue2.origin} ${adj}${issue2.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 ${issue3.origin} ${adj}${issue3.minimum.toString()} \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 ${issue2.origin} ${adj}${issue2.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -61958,18 +66064,18 @@ var init_ta = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue3.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`; + return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${issue2.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${issue3.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${issue2.keys.length > 1 ? "\u0B95\u0BB3\u0BCD" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `${issue3.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`; + return `${issue2.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 `${issue3.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`; + return `${issue2.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`; } @@ -61987,7 +66093,7 @@ function th_default() { var error34; var init_th = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/th.js"() { - init_util(); + init_util2(); error34 = () => { const Sizable = { string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }, @@ -61998,7 +66104,7 @@ var init_th = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62048,31 +66154,31 @@ var init_th = __esm({ jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT", template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - 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 ${issue3.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType5(issue3.input)}`; + 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 ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")}`; + if (issue2.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(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19" : "\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; - return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.maximum.toString()}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`; + return `\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin ?? "\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22" : "\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.minimum.toString()} ${sizing.unit}`; + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()} ${sizing.unit}`; } - return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue3.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue3.minimum.toString()}`; + return `\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${issue2.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${adj} ${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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}"`; } @@ -62082,18 +66188,18 @@ var init_th = __esm({ 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: ${Nouns[_issue.format] ?? issue3.format}`; + return `\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`; + 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 ${issue2.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(issue3.keys, ", ")}`; + return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue3.origin}`; + return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.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 ${issue3.origin}`; + return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${issue2.origin}`; default: return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07`; } @@ -62111,7 +66217,7 @@ function tr_default() { var parsedType3, error35; var init_tr = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/tr.js"() { - init_util(); + init_util2(); parsedType3 = (data) => { const t = typeof data; switch (t) { @@ -62172,30 +66278,30 @@ var init_tr = __esm({ jwt: "JWT", template_literal: "\u015Eablon dizesi" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `Ge\xE7ersiz de\u011Fer: beklenen ${issue3.expected}, al\u0131nan ${parsedType3(issue3.input)}`; + return `Ge\xE7ersiz de\u011Fer: beklenen ${issue2.expected}, al\u0131nan ${parsedType3(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue3.values[0])}`; - return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `Ge\xE7ersiz de\u011Fer: beklenen ${stringifyPrimitive(issue2.values[0])}`; + return `Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\xC7ok b\xFCy\xFCk: beklenen ${issue3.origin ?? "de\u011Fer"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; - return `\xC7ok b\xFCy\xFCk: beklenen ${issue3.origin ?? "de\u011Fer"} ${adj}${issue3.maximum.toString()}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xF6\u011Fe"}`; + return `\xC7ok b\xFCy\xFCk: beklenen ${issue2.origin ?? "de\u011Fer"} ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; - return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue3.origin} ${adj}${issue3.minimum.toString()}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; + return `\xC7ok k\xFC\xE7\xFCk: beklenen ${issue2.origin} ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `Ge\xE7ersiz metin: "${_issue.prefix}" ile ba\u015Flamal\u0131`; if (_issue.format === "ends_with") @@ -62204,18 +66310,18 @@ var init_tr = __esm({ return `Ge\xE7ersiz metin: "${_issue.includes}" i\xE7ermeli`; if (_issue.format === "regex") return `Ge\xE7ersiz metin: ${_issue.pattern} desenine uymal\u0131`; - return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue3.format}`; + return `Ge\xE7ersiz ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `Ge\xE7ersiz say\u0131: ${issue3.divisor} ile tam b\xF6l\xFCnebilmeli`; + return `Ge\xE7ersiz say\u0131: ${issue2.divisor} ile tam b\xF6l\xFCnebilmeli`; case "unrecognized_keys": - return `Tan\u0131nmayan anahtar${issue3.keys.length > 1 ? "lar" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `Tan\u0131nmayan anahtar${issue2.keys.length > 1 ? "lar" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `${issue3.origin} i\xE7inde ge\xE7ersiz anahtar`; + return `${issue2.origin} i\xE7inde ge\xE7ersiz anahtar`; case "invalid_union": return "Ge\xE7ersiz de\u011Fer"; case "invalid_element": - return `${issue3.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; + return `${issue2.origin} i\xE7inde ge\xE7ersiz de\u011Fer`; default: return `Ge\xE7ersiz de\u011Fer`; } @@ -62233,7 +66339,7 @@ function ua_default() { var error36; var init_ua = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ua.js"() { - init_util(); + init_util2(); error36 = () => { const Sizable = { string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }, @@ -62244,7 +66350,7 @@ var init_ua = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62294,32 +66400,32 @@ var init_ua = __esm({ jwt: "JWT", template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - 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 ${issue3.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType5(issue3.input)}`; + 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 ${issue2.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${parsedType4(issue2.input)}`; // return `ΠΠ΅ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Ρ– Π²Ρ…Ρ–Π΄Π½Ρ– Π΄Π°Π½Ρ–: ΠΎΡ‡Ρ–ΠΊΡƒΡ”Ρ‚ΡŒΡΡ ${issue.expected}, ΠΎΡ‚Ρ€ΠΈΠΌΠ°Π½ΠΎ ${util.getParsedType(issue.input)}`; case "invalid_value": - if (issue3.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(issue3.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(issue3.values, "|")}`; + if (issue2.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(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.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 ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue3.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 ${issue3.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue3.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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${sizing.verb} ${adj}${issue2.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 ${issue2.origin ?? "\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.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 ${issue3.origin} ${sizing.verb} ${adj}${issue3.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 ${issue2.origin} ${sizing.verb} ${adj}${issue2.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 ${issue3.origin} \u0431\u0443\u0434\u0435 ${adj}${issue3.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 ${issue2.origin} \u0431\u0443\u0434\u0435 ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -62328,18 +66434,18 @@ var init_ua = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${Nouns[_issue.format] ?? issue2.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 ${issue3.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 ${issue2.divisor}`; case "unrecognized_keys": - return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue3.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue3.keys, ", ")}`; + return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${issue2.keys.length > 1 ? "\u0456" : ""}: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue3.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${issue2.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 ${issue3.origin}`; + return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${issue2.origin}`; default: return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456`; } @@ -62357,7 +66463,7 @@ function ur_default() { var error37; var init_ur = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/ur.js"() { - init_util(); + init_util2(); error37 = () => { const Sizable = { string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" }, @@ -62368,7 +66474,7 @@ var init_ur = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62418,31 +66524,31 @@ var init_ur = __esm({ jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC", template_literal: "\u0627\u0646 \u067E\u0679" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue3.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType5(issue3.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${issue2.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${parsedType4(issue2.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`; case "invalid_value": - if (issue3.values.length === 1) - return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue3.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; - return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue3.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + if (issue2.values.length === 1) + return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${stringifyPrimitive(issue2.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${joinValues(issue2.values, "|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue3.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue3.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: ${issue3.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue3.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0628\u06C1\u062A \u0628\u0691\u0627: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${adj}${issue2.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: ${issue2.origin ?? "\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${adj}${issue2.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue3.origin} \u06A9\u06D2 ${adj}${issue3.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: ${issue2.origin} \u06A9\u06D2 ${adj}${issue2.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: ${issue3.origin} \u06A9\u0627 ${adj}${issue3.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; + return `\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${issue2.origin} \u06A9\u0627 ${adj}${issue2.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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`; } @@ -62452,18 +66558,18 @@ var init_ur = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u063A\u0644\u0637 ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue3.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`; + return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${issue2.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${issue3.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue3.keys, "\u060C ")}`; + return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${issue2.keys.length > 1 ? "\u0632" : ""}: ${joinValues(issue2.keys, "\u060C ")}`; case "invalid_key": - return `${issue3.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`; case "invalid_union": return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"; case "invalid_element": - return `${issue3.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; + return `${issue2.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`; default: return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679`; } @@ -62481,7 +66587,7 @@ function vi_default() { var error38; var init_vi = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/vi.js"() { - init_util(); + init_util2(); error38 = () => { const Sizable = { string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" }, @@ -62492,7 +66598,7 @@ var init_vi = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62542,31 +66648,31 @@ var init_vi = __esm({ jwt: "JWT", template_literal: "\u0111\u1EA7u v\xE0o" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue3.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType5(issue3.input)}`; + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${issue2.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue3.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(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${stringifyPrimitive(issue2.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(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue3.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; - return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue3.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue3.maximum.toString()}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "ph\u1EA7n t\u1EED"}`; + return `Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${issue2.origin ?? "gi\xE1 tr\u1ECB"} ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue3.origin} ${adj}${issue3.minimum.toString()}`; + return `Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${issue2.origin} ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; 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") @@ -62575,18 +66681,18 @@ var init_vi = __esm({ 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 `${Nouns[_issue.format] ?? issue3.format} kh\xF4ng h\u1EE3p l\u1EC7`; + return `${Nouns[_issue.format] ?? issue2.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 ${issue3.divisor}`; + return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${issue2.divisor}`; case "unrecognized_keys": - return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue3.keys, ", ")}`; + return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue3.origin}`; + return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.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 ${issue3.origin}`; + return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${issue2.origin}`; default: return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7`; } @@ -62604,7 +66710,7 @@ function zh_CN_default() { var error39; var init_zh_CN = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-CN.js"() { - init_util(); + init_util2(); error39 = () => { const Sizable = { string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" }, @@ -62615,7 +66721,7 @@ var init_zh_CN = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62665,31 +66771,31 @@ var init_zh_CN = __esm({ jwt: "JWT", template_literal: "\u8F93\u5165" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue3.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType5(issue3.input)}`; + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${issue2.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue3.values[0])}`; - return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${stringifyPrimitive(issue2.values[0])}`; + return `\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue3.origin ?? "\u503C"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; - return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue3.origin ?? "\u503C"} ${adj}${issue3.maximum.toString()}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u4E2A\u5143\u7D20"}`; + return `\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${issue2.origin ?? "\u503C"} ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue3.origin} ${adj}${issue3.minimum.toString()}`; + return `\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${issue2.origin} ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") return `\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${_issue.prefix}" \u5F00\u5934`; if (_issue.format === "ends_with") @@ -62698,18 +66804,18 @@ var init_zh_CN = __esm({ 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${Nouns[_issue.format] ?? issue3.format}`; + return `\u65E0\u6548${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue3.divisor} \u7684\u500D\u6570`; + return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${issue2.divisor} \u7684\u500D\u6570`; case "unrecognized_keys": - return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue3.keys, ", ")}`; + return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${joinValues(issue2.keys, ", ")}`; case "invalid_key": - return `${issue3.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; + return `${issue2.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`; case "invalid_union": return "\u65E0\u6548\u8F93\u5165"; case "invalid_element": - return `${issue3.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; + return `${issue2.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`; default: return `\u65E0\u6548\u8F93\u5165`; } @@ -62727,7 +66833,7 @@ function zh_TW_default() { var error40; var init_zh_TW = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/locales/zh-TW.js"() { - init_util(); + init_util2(); error40 = () => { const Sizable = { string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" }, @@ -62738,7 +66844,7 @@ var init_zh_TW = __esm({ function getSizing(origin) { return Sizable[origin] ?? null; } - const parsedType5 = (data) => { + const parsedType4 = (data) => { const t = typeof data; switch (t) { case "number": { @@ -62788,31 +66894,31 @@ var init_zh_TW = __esm({ jwt: "JWT", template_literal: "\u8F38\u5165" }; - return (issue3) => { - switch (issue3.code) { + return (issue2) => { + switch (issue2.code) { case "invalid_type": - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue3.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType5(issue3.input)}`; + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${issue2.expected}\uFF0C\u4F46\u6536\u5230 ${parsedType4(issue2.input)}`; case "invalid_value": - if (issue3.values.length === 1) - return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue3.values[0])}`; - return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue3.values, "|")}`; + if (issue2.values.length === 1) + return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${stringifyPrimitive(issue2.values[0])}`; + return `\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${joinValues(issue2.values, "|")}`; case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? "<=" : "<"; + const sizing = getSizing(issue2.origin); if (sizing) - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue3.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; - return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue3.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue3.maximum.toString()}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u500B\u5143\u7D20"}`; + return `\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${issue2.origin ?? "\u503C"} \u61C9\u70BA ${adj}${issue2.maximum.toString()}`; } case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); + const adj = issue2.inclusive ? ">=" : ">"; + const sizing = getSizing(issue2.origin); if (sizing) { - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue3.origin} \u61C9\u70BA ${adj}${issue3.minimum.toString()} ${sizing.unit}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()} ${sizing.unit}`; } - return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue3.origin} \u61C9\u70BA ${adj}${issue3.minimum.toString()}`; + return `\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${issue2.origin} \u61C9\u70BA ${adj}${issue2.minimum.toString()}`; } case "invalid_format": { - const _issue = issue3; + const _issue = issue2; if (_issue.format === "starts_with") { return `\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${_issue.prefix}" \u958B\u982D`; } @@ -62822,18 +66928,18 @@ var init_zh_TW = __esm({ 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 ${Nouns[_issue.format] ?? issue3.format}`; + return `\u7121\u6548\u7684 ${Nouns[_issue.format] ?? issue2.format}`; } case "not_multiple_of": - return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue3.divisor} \u7684\u500D\u6578`; + return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${issue2.divisor} \u7684\u500D\u6578`; case "unrecognized_keys": - return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue3.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue3.keys, "\u3001")}`; + return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${issue2.keys.length > 1 ? "\u5011" : ""}\uFF1A${joinValues(issue2.keys, "\u3001")}`; case "invalid_key": - return `${issue3.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`; case "invalid_union": return "\u7121\u6548\u7684\u8F38\u5165\u503C"; case "invalid_element": - return `${issue3.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; + return `${issue2.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`; default: return `\u7121\u6548\u7684\u8F38\u5165\u503C`; } @@ -62893,7 +66999,7 @@ var init_locales = __esm({ init_ca(); init_cs(); init_de(); - init_en(); + init_en2(); init_eo(); init_es(); init_fa(); @@ -63839,7 +67945,7 @@ var init_api = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/api.js"() { init_checks(); init_schemas(); - init_util(); + init_util2(); TimePrecision = { Any: null, Minute: -1, @@ -64066,7 +68172,7 @@ var JSONSchemaGenerator; var init_to_json_schema = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/to-json-schema.js"() { init_registries(); - init_util(); + init_util2(); JSONSchemaGenerator = class { constructor(params) { this.counter = 0; @@ -64957,11 +69063,11 @@ var init_core2 = __esm({ "../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/index.js"() { init_core(); init_parse(); - init_errors(); + init_errors2(); init_schemas(); init_checks(); init_versions(); - init_util(); + init_util2(); init_regexes(); init_locales(); init_registries(); @@ -64973,10 +69079,10 @@ var init_core2 = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Options.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js var ignoreOverride2, jsonDescription, defaultOptions, getDefaultOptions; var init_Options = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Options.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Options.js"() { ignoreOverride2 = Symbol("Let zodToJsonSchema decide on which parser to use"); jsonDescription = (jsonSchema2, def) => { if (def.description) { @@ -65024,10 +69130,10 @@ var init_Options = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Refs.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js var getRefs; var init_Refs = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/Refs.js"() { init_Options(); getRefs = (options) => { const _options = getDefaultOptions(options); @@ -65051,7 +69157,7 @@ var init_Refs = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js function addErrorMessage(res, key, errorMessage, refs) { if (!refs?.errorMessages) return; @@ -65067,14 +69173,14 @@ function setResponseValueAndErrors(res, key, value2, errorMessage, refs) { addErrorMessage(res, key, errorMessage, refs); } var init_errorMessages = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js var getRelativePath; var init_getRelativePath = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"() { getRelativePath = (pathA, pathB) => { let i = 0; for (; i < pathA.length && i < pathB.length; i++) { @@ -65086,930 +69192,7 @@ var init_getRelativePath = __esm({ } }); -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js -// @__NO_SIDE_EFFECTS__ -function $constructor2(name, initializer4, params) { - function init(inst, def) { - var _a; - Object.defineProperty(inst, "_zod", { - value: inst._zod ?? {}, - enumerable: false - }); - (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set()); - inst._zod.traits.add(name); - initializer4(inst, def); - for (const k in _.prototype) { - if (!(k in inst)) - Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) }); - } - inst._zod.constr = _; - inst._zod.def = def; - } - const Parent = params?.Parent ?? Object; - class Definition extends Parent { - } - Object.defineProperty(Definition, "name", { value: name }); - function _(def) { - var _a; - const inst = params?.Parent ? new Definition() : this; - init(inst, def); - (_a = inst._zod).deferred ?? (_a.deferred = []); - for (const fn2 of inst._zod.deferred) { - fn2(); - } - 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 _; -} -function config2(newConfig) { - if (newConfig) - Object.assign(globalConfig2, newConfig); - return globalConfig2; -} -var NEVER5, $brand2, globalConfig2; -var init_core3 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js"() { - NEVER5 = Object.freeze({ - status: "aborted" - }); - $brand2 = Symbol("zod_brand"); - globalConfig2 = {}; - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js -function joinValues2(array, separator2 = "|") { - return array.map((val) => stringifyPrimitive2(val)).join(separator2); -} -function jsonStringifyReplacer2(_, value2) { - if (typeof value2 === "bigint") - return value2.toString(); - return value2; -} -function cached4(getter) { - const set = false; - return { - get value() { - if (!set) { - const value2 = getter(); - Object.defineProperty(this, "value", { value: value2 }); - return value2; - } - throw new Error("cached value already set"); - } - }; -} -function stringifyPrimitive2(value2) { - if (typeof value2 === "bigint") - return value2.toString() + "n"; - if (typeof value2 === "string") - return `"${value2}"`; - return `${value2}`; -} -var EVALUATING, captureStackTrace2, allowsEval2, NUMBER_FORMAT_RANGES2; -var init_util2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js"() { - EVALUATING = Symbol("evaluating"); - captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => { - }; - allowsEval2 = cached4(() => { - if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) { - return false; - } - try { - const F = Function; - new F(""); - return true; - } catch (_) { - return false; - } - }); - 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] - }; - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js -function flattenError3(error42, mapper = (issue3) => issue3.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of error42.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 formatError2(error42, mapper = (issue3) => issue3.message) { - const fieldErrors = { _errors: [] }; - const processError = (error43) => { - for (const issue3 of error43.issues) { - if (issue3.code === "invalid_union" && issue3.errors.length) { - issue3.errors.map((issues) => processError({ issues })); - } else if (issue3.code === "invalid_key") { - processError({ issues: issue3.issues }); - } else if (issue3.code === "invalid_element") { - processError({ issues: issue3.issues }); - } else if (issue3.path.length === 0) { - fieldErrors._errors.push(mapper(issue3)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < issue3.path.length) { - const el = issue3.path[i]; - const terminal = i === issue3.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue3)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(error42); - return fieldErrors; -} -var initializer2, $ZodError2, $ZodRealError2; -var init_errors2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js"() { - init_core3(); - init_util2(); - initializer2 = (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 - }); - }; - $ZodError2 = $constructor2("$ZodError", initializer2); - $ZodRealError2 = $constructor2("$ZodError", initializer2, { Parent: Error }); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js -var init_parse2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js"() { - init_core3(); - init_errors2(); - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js -var dateSource2, date2; -var init_regexes2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js"() { - 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])))`; - date2 = /* @__PURE__ */ new RegExp(`^${dateSource2}$`); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js -var init_checks2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js"() { - init_core3(); - init_regexes2(); - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js -var init_doc2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/doc.js"() { - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js -var init_versions2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js"() { - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js -var init_schemas2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js"() { - init_checks2(); - init_core3(); - init_doc2(); - init_parse2(); - init_regexes2(); - init_util2(); - init_versions2(); - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ar.js -var init_ar2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ar.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/az.js -var init_az2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/az.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/be.js -var init_be2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/be.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/bg.js -var init_bg = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/bg.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ca.js -var init_ca2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ca.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/cs.js -var init_cs2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/cs.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/da.js -var init_da = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/da.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/de.js -var init_de2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/de.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/en.js -function en_default5() { - return { - localeError: error41() - }; -} -var parsedType4, error41; -var init_en2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/en.js"() { - init_util2(); - parsedType4 = (data) => { - const t = typeof data; - switch (t) { - case "number": { - return Number.isNaN(data) ? "NaN" : "number"; - } - case "object": { - if (Array.isArray(data)) { - return "array"; - } - if (data === null) { - return "null"; - } - if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) { - return data.constructor.name; - } - } - } - return t; - }; - error41 = () => { - 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" } - }; - function getSizing(origin) { - return Sizable[origin] ?? null; - } - const Nouns = { - 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" - }; - return (issue3) => { - switch (issue3.code) { - case "invalid_type": - return `Invalid input: expected ${issue3.expected}, received ${parsedType4(issue3.input)}`; - case "invalid_value": - if (issue3.values.length === 1) - return `Invalid input: expected ${stringifyPrimitive2(issue3.values[0])}`; - return `Invalid option: expected one of ${joinValues2(issue3.values, "|")}`; - case "too_big": { - const adj = issue3.inclusive ? "<=" : "<"; - const sizing = getSizing(issue3.origin); - if (sizing) - return `Too big: expected ${issue3.origin ?? "value"} to have ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`; - return `Too big: expected ${issue3.origin ?? "value"} to be ${adj}${issue3.maximum.toString()}`; - } - case "too_small": { - const adj = issue3.inclusive ? ">=" : ">"; - const sizing = getSizing(issue3.origin); - if (sizing) { - return `Too small: expected ${issue3.origin} to have ${adj}${issue3.minimum.toString()} ${sizing.unit}`; - } - return `Too small: expected ${issue3.origin} to be ${adj}${issue3.minimum.toString()}`; - } - case "invalid_format": { - const _issue = issue3; - 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 ${Nouns[_issue.format] ?? issue3.format}`; - } - case "not_multiple_of": - return `Invalid number: must be a multiple of ${issue3.divisor}`; - case "unrecognized_keys": - return `Unrecognized key${issue3.keys.length > 1 ? "s" : ""}: ${joinValues2(issue3.keys, ", ")}`; - case "invalid_key": - return `Invalid key in ${issue3.origin}`; - case "invalid_union": - return "Invalid input"; - case "invalid_element": - return `Invalid value in ${issue3.origin}`; - default: - return `Invalid input`; - } - }; - }; - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/eo.js -var init_eo2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/eo.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/es.js -var init_es2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/es.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fa.js -var init_fa2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fa.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fi.js -var init_fi2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fi.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr.js -var init_fr2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr-CA.js -var init_fr_CA2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/fr-CA.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/he.js -var init_he2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/he.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/hu.js -var init_hu2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/hu.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/id.js -var init_id2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/id.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/is.js -var init_is = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/is.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/it.js -var init_it2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/it.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ja.js -var init_ja2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ja.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ka.js -var init_ka = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ka.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/km.js -var init_km = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/km.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/kh.js -var init_kh2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/kh.js"() { - init_km(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ko.js -var init_ko2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ko.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/lt.js -var init_lt = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/lt.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/mk.js -var init_mk2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/mk.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ms.js -var init_ms2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ms.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/nl.js -var init_nl2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/nl.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/no.js -var init_no2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/no.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ota.js -var init_ota2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ota.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ps.js -var init_ps2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ps.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pl.js -var init_pl2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pl.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pt.js -var init_pt2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/pt.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ru.js -var init_ru2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ru.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sl.js -var init_sl2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sl.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sv.js -var init_sv2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/sv.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ta.js -var init_ta2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ta.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/th.js -var init_th2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/th.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/tr.js -var init_tr2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/tr.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/uk.js -var init_uk = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/uk.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ua.js -var init_ua2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ua.js"() { - init_uk(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ur.js -var init_ur2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/ur.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/vi.js -var init_vi2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/vi.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-CN.js -var init_zh_CN2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-CN.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-TW.js -var init_zh_TW2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/zh-TW.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/yo.js -var init_yo = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/yo.js"() { - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/index.js -var init_locales2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/locales/index.js"() { - init_ar2(); - init_az2(); - init_be2(); - init_bg(); - init_ca2(); - init_cs2(); - init_da(); - init_de2(); - init_en2(); - init_eo2(); - init_es2(); - init_fa2(); - init_fi2(); - init_fr2(); - init_fr_CA2(); - init_he2(); - init_hu2(); - init_id2(); - init_is(); - init_it2(); - init_ja2(); - init_ka(); - init_kh2(); - init_km(); - init_ko2(); - init_lt(); - init_mk2(); - init_ms2(); - init_nl2(); - init_no2(); - init_ota2(); - init_ps2(); - init_pl2(); - init_pt2(); - init_ru2(); - init_sl2(); - init_sv2(); - init_ta2(); - init_th2(); - init_tr2(); - init_ua2(); - init_uk(); - init_ur2(); - init_vi2(); - init_zh_CN2(); - init_zh_TW2(); - init_yo(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js -var $output2, $input2; -var init_registries2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js"() { - $output2 = Symbol("ZodOutput"); - $input2 = Symbol("ZodInput"); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js -var init_api2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js"() { - init_checks2(); - init_schemas2(); - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/to-json-schema.js -var init_to_json_schema2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/to-json-schema.js"() { - init_registries2(); - init_util2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/json-schema.js -var init_json_schema2 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/json-schema.js"() { - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/index.js -var init_core4 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/index.js"() { - init_core3(); - init_parse2(); - init_errors2(); - init_schemas2(); - init_checks2(); - init_versions2(); - init_util2(); - init_regexes2(); - init_locales2(); - init_registries2(); - init_doc2(); - init_api2(); - init_to_json_schema2(); - init_json_schema2(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/checks.js -var init_checks3 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/checks.js"() { - init_core4(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js -var init_iso = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js"() { - init_core4(); - init_schemas3(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js -var initializer3, ZodError5, ZodRealError; -var init_errors3 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js"() { - init_core4(); - init_core4(); - init_util2(); - initializer3 = (inst, issues) => { - $ZodError2.init(inst, issues); - inst.name = "ZodError"; - Object.defineProperties(inst, { - format: { - value: (mapper) => formatError2(inst, mapper) - // enumerable: false, - }, - flatten: { - value: (mapper) => flattenError3(inst, mapper) - // enumerable: false, - }, - addIssue: { - value: (issue3) => { - inst.issues.push(issue3); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); - } - // enumerable: false, - }, - addIssues: { - value: (issues2) => { - inst.issues.push(...issues2); - inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer2, 2); - } - // enumerable: false, - }, - isEmpty: { - get() { - return inst.issues.length === 0; - } - // enumerable: false, - } - }); - }; - ZodError5 = $constructor2("ZodError", initializer3); - ZodRealError = $constructor2("ZodError", initializer3, { - Parent: Error - }); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js -var init_parse3 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js"() { - init_core4(); - init_errors3(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js -var init_schemas3 = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js"() { - init_core4(); - init_core4(); - init_checks3(); - init_iso(); - init_parse3(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/compat.js -var ZodFirstPartyTypeKind4; -var init_compat = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/compat.js"() { - init_core4(); - init_core4(); - /* @__PURE__ */ (function(ZodFirstPartyTypeKind5) { - })(ZodFirstPartyTypeKind4 || (ZodFirstPartyTypeKind4 = {})); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/coerce.js -var init_coerce = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/coerce.js"() { - init_core4(); - init_schemas3(); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js -var init_external = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/external.js"() { - init_core4(); - init_schemas3(); - init_checks3(); - init_errors3(); - init_parse3(); - init_compat(); - init_core4(); - init_en2(); - init_core4(); - init_locales2(); - init_iso(); - init_iso(); - init_coerce(); - config2(en_default5()); - } -}); - -// ../node_modules/.pnpm/zod@4.1.12/node_modules/zod/index.js -var init_zod = __esm({ - "../node_modules/.pnpm/zod@4.1.12/node_modules/zod/index.js"() { - init_external(); - init_external(); - } -}); - -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js function parseAnyDef(refs) { if (refs.target !== "openAi") { return {}; @@ -66025,17 +69208,17 @@ function parseAnyDef(refs) { }; } var init_any = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"() { init_getRelativePath(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js function parseArrayDef(def, refs) { const res = { type: "array" }; - if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind4.ZodAny) { + if (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind2.ZodAny) { res.items = parseDef(def.type._def, { ...refs, currentPath: [...refs.currentPath, "items"] @@ -66054,14 +69237,14 @@ function parseArrayDef(def, refs) { return res; } var init_array = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"() { init_zod(); init_errorMessages(); init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js function parseBigintDef(def, refs) { const res = { type: "integer", @@ -66107,36 +69290,36 @@ function parseBigintDef(def, refs) { return res; } var init_bigint = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"() { init_errorMessages(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js function parseBooleanDef() { return { type: "boolean" }; } var init_boolean = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js function parseBrandedDef(_def, refs) { return parseDef(_def.type._def, refs); } var init_branded = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js var parseCatchDef; var init_catch = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"() { init_parseDef(); parseCatchDef = (def, refs) => { return parseDef(def.innerType._def, refs); @@ -66144,7 +69327,7 @@ var init_catch = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js function parseDateDef(def, refs, overrideDateStrategy) { const strategy = overrideDateStrategy ?? refs.dateStrategy; if (Array.isArray(strategy)) { @@ -66170,7 +69353,7 @@ function parseDateDef(def, refs, overrideDateStrategy) { } var integerDateParser; var init_date = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"() { init_errorMessages(); integerDateParser = (def, refs) => { const res = { @@ -66209,7 +69392,7 @@ var init_date = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js function parseDefaultDef(_def, refs) { return { ...parseDef(_def.innerType._def, refs), @@ -66217,23 +69400,23 @@ function parseDefaultDef(_def, refs) { }; } var init_default = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js function parseEffectsDef(_def, refs) { return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs); } var init_effects = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"() { init_parseDef(); init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js function parseEnumDef(def) { return { type: "string", @@ -66241,11 +69424,11 @@ function parseEnumDef(def) { }; } var init_enum = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js function parseIntersectionDef(def, refs) { const allOf = [ parseDef(def.left._def, { @@ -66283,7 +69466,7 @@ function parseIntersectionDef(def, refs) { } var isJsonSchema7AllOfType; var init_intersection = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"() { init_parseDef(); isJsonSchema7AllOfType = (type2) => { if ("type" in type2 && type2.type === "string") @@ -66293,31 +69476,31 @@ var init_intersection = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js function parseLiteralDef(def, refs) { - const parsedType5 = typeof def.value; - if (parsedType5 !== "bigint" && parsedType5 !== "number" && parsedType5 !== "boolean" && parsedType5 !== "string") { + const parsedType4 = typeof def.value; + if (parsedType4 !== "bigint" && parsedType4 !== "number" && parsedType4 !== "boolean" && parsedType4 !== "string") { return { type: Array.isArray(def.value) ? "array" : "object" }; } if (refs.target === "openApi3") { return { - type: parsedType5 === "bigint" ? "integer" : parsedType5, + type: parsedType4 === "bigint" ? "integer" : parsedType4, enum: [def.value] }; } return { - type: parsedType5 === "bigint" ? "integer" : parsedType5, + type: parsedType4 === "bigint" ? "integer" : parsedType4, const: def.value }; } var init_literal = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js function parseStringDef(def, refs) { const res = { type: "string" @@ -66594,7 +69777,7 @@ function stringifyRegExpWithFlags(regex3, refs) { } var emojiRegex4, zodPatterns, ALPHA_NUMERIC2; var init_string = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"() { init_errorMessages(); emojiRegex4 = void 0; zodPatterns = { @@ -66648,12 +69831,12 @@ var init_string = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js function parseRecordDef(def, refs) { if (refs.target === "openAi") { console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."); } - if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodEnum) { + if (refs.target === "openApi3" && def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) { return { type: "object", required: def.keyType._def.values, @@ -66677,20 +69860,20 @@ function parseRecordDef(def, refs) { if (refs.target === "openApi3") { return schema2; } - if (def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodString && def.keyType._def.checks?.length) { + if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.checks?.length) { const { type: type2, ...keyType } = parseStringDef(def.keyType._def, refs); return { ...schema2, propertyNames: keyType }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodEnum) { + } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodEnum) { return { ...schema2, propertyNames: { enum: def.keyType._def.values } }; - } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind4.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind4.ZodString && def.keyType._def.type._def.checks?.length) { + } else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind2.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind2.ZodString && def.keyType._def.type._def.checks?.length) { const { type: type2, ...keyType } = parseBrandedDef(def.keyType._def, refs); return { ...schema2, @@ -66700,7 +69883,7 @@ function parseRecordDef(def, refs) { return schema2; } var init_record = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"() { init_zod(); init_parseDef(); init_string(); @@ -66709,7 +69892,7 @@ var init_record = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js function parseMapDef(def, refs) { if (refs.mapStrategy === "record") { return parseRecordDef(def, refs); @@ -66734,14 +69917,14 @@ function parseMapDef(def, refs) { }; } var init_map = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"() { init_parseDef(); init_record(); init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js function parseNativeEnumDef(def) { const object2 = def.values; const actualKeys = Object.keys(def.values).filter((key) => { @@ -66755,11 +69938,11 @@ function parseNativeEnumDef(def) { }; } var init_nativeEnum = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js function parseNeverDef(refs) { return refs.target === "openAi" ? void 0 : { not: parseAnyDef({ @@ -66769,12 +69952,12 @@ function parseNeverDef(refs) { }; } var init_never = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js function parseNullDef(refs) { return refs.target === "openApi3" ? { enum: ["null"], @@ -66784,11 +69967,11 @@ function parseNullDef(refs) { }; } var init_null = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js function parseUnionDef(def, refs) { if (refs.target === "openApi3") return asAnyOf(def, refs); @@ -66843,7 +70026,7 @@ function parseUnionDef(def, refs) { } var primitiveMappings, asAnyOf; var init_union = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"() { init_parseDef(); primitiveMappings = { ZodString: "string", @@ -66862,7 +70045,7 @@ var init_union = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js function parseNullableDef(def, refs) { if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) { if (refs.target === "openApi3") { @@ -66894,13 +70077,13 @@ function parseNullableDef(def, refs) { return base && { anyOf: [base, { type: "null" }] }; } var init_nullable = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"() { init_parseDef(); init_union(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js function parseNumberDef(def, refs) { const res = { type: "number" @@ -66949,12 +70132,12 @@ function parseNumberDef(def, refs) { return res; } var init_number = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"() { init_errorMessages(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js function parseObjectDef(def, refs) { const forceOptionalIntoNullable = refs.target === "openAi"; const result = { @@ -67024,15 +70207,15 @@ function safeIsOptional(schema2) { } } var init_object = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js var parseOptionalDef; var init_optional = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"() { init_parseDef(); init_any(); parseOptionalDef = (def, refs) => { @@ -67055,10 +70238,10 @@ var init_optional = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js var parsePipelineDef; var init_pipeline = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"() { init_parseDef(); parsePipelineDef = (def, refs) => { if (refs.pipeStrategy === "input") { @@ -67081,17 +70264,17 @@ var init_pipeline = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js function parsePromiseDef(def, refs) { return parseDef(def.type._def, refs); } var init_promise = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js function parseSetDef(def, refs) { const items = parseDef(def.valueType._def, { ...refs, @@ -67111,13 +70294,13 @@ function parseSetDef(def, refs) { return schema2; } var init_set = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"() { init_errorMessages(); init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js function parseTupleDef(def, refs) { if (def.rest) { return { @@ -67145,37 +70328,37 @@ function parseTupleDef(def, refs) { } } var init_tuple = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"() { init_parseDef(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js function parseUndefinedDef(refs) { return { not: parseAnyDef(refs) }; } var init_undefined = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js function parseUnknownDef(refs) { return parseAnyDef(refs); } var init_unknown = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"() { init_any(); } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js var parseReadonlyDef; var init_readonly = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"() { init_parseDef(); parseReadonlyDef = (def, refs) => { return parseDef(def.innerType._def, refs); @@ -67183,10 +70366,10 @@ var init_readonly = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/selectParser.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js var selectParser; var init_selectParser = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/selectParser.js"() { init_zod(); init_any(); init_array(); @@ -67220,73 +70403,73 @@ var init_selectParser = __esm({ init_readonly(); selectParser = (def, typeName, refs) => { switch (typeName) { - case ZodFirstPartyTypeKind4.ZodString: + case ZodFirstPartyTypeKind2.ZodString: return parseStringDef(def, refs); - case ZodFirstPartyTypeKind4.ZodNumber: + case ZodFirstPartyTypeKind2.ZodNumber: return parseNumberDef(def, refs); - case ZodFirstPartyTypeKind4.ZodObject: + case ZodFirstPartyTypeKind2.ZodObject: return parseObjectDef(def, refs); - case ZodFirstPartyTypeKind4.ZodBigInt: + case ZodFirstPartyTypeKind2.ZodBigInt: return parseBigintDef(def, refs); - case ZodFirstPartyTypeKind4.ZodBoolean: + case ZodFirstPartyTypeKind2.ZodBoolean: return parseBooleanDef(); - case ZodFirstPartyTypeKind4.ZodDate: + case ZodFirstPartyTypeKind2.ZodDate: return parseDateDef(def, refs); - case ZodFirstPartyTypeKind4.ZodUndefined: + case ZodFirstPartyTypeKind2.ZodUndefined: return parseUndefinedDef(refs); - case ZodFirstPartyTypeKind4.ZodNull: + case ZodFirstPartyTypeKind2.ZodNull: return parseNullDef(refs); - case ZodFirstPartyTypeKind4.ZodArray: + case ZodFirstPartyTypeKind2.ZodArray: return parseArrayDef(def, refs); - case ZodFirstPartyTypeKind4.ZodUnion: - case ZodFirstPartyTypeKind4.ZodDiscriminatedUnion: + case ZodFirstPartyTypeKind2.ZodUnion: + case ZodFirstPartyTypeKind2.ZodDiscriminatedUnion: return parseUnionDef(def, refs); - case ZodFirstPartyTypeKind4.ZodIntersection: + case ZodFirstPartyTypeKind2.ZodIntersection: return parseIntersectionDef(def, refs); - case ZodFirstPartyTypeKind4.ZodTuple: + case ZodFirstPartyTypeKind2.ZodTuple: return parseTupleDef(def, refs); - case ZodFirstPartyTypeKind4.ZodRecord: + case ZodFirstPartyTypeKind2.ZodRecord: return parseRecordDef(def, refs); - case ZodFirstPartyTypeKind4.ZodLiteral: + case ZodFirstPartyTypeKind2.ZodLiteral: return parseLiteralDef(def, refs); - case ZodFirstPartyTypeKind4.ZodEnum: + case ZodFirstPartyTypeKind2.ZodEnum: return parseEnumDef(def); - case ZodFirstPartyTypeKind4.ZodNativeEnum: + case ZodFirstPartyTypeKind2.ZodNativeEnum: return parseNativeEnumDef(def); - case ZodFirstPartyTypeKind4.ZodNullable: + case ZodFirstPartyTypeKind2.ZodNullable: return parseNullableDef(def, refs); - case ZodFirstPartyTypeKind4.ZodOptional: + case ZodFirstPartyTypeKind2.ZodOptional: return parseOptionalDef(def, refs); - case ZodFirstPartyTypeKind4.ZodMap: + case ZodFirstPartyTypeKind2.ZodMap: return parseMapDef(def, refs); - case ZodFirstPartyTypeKind4.ZodSet: + case ZodFirstPartyTypeKind2.ZodSet: return parseSetDef(def, refs); - case ZodFirstPartyTypeKind4.ZodLazy: + case ZodFirstPartyTypeKind2.ZodLazy: return () => def.getter()._def; - case ZodFirstPartyTypeKind4.ZodPromise: + case ZodFirstPartyTypeKind2.ZodPromise: return parsePromiseDef(def, refs); - case ZodFirstPartyTypeKind4.ZodNaN: - case ZodFirstPartyTypeKind4.ZodNever: + case ZodFirstPartyTypeKind2.ZodNaN: + case ZodFirstPartyTypeKind2.ZodNever: return parseNeverDef(refs); - case ZodFirstPartyTypeKind4.ZodEffects: + case ZodFirstPartyTypeKind2.ZodEffects: return parseEffectsDef(def, refs); - case ZodFirstPartyTypeKind4.ZodAny: + case ZodFirstPartyTypeKind2.ZodAny: return parseAnyDef(refs); - case ZodFirstPartyTypeKind4.ZodUnknown: + case ZodFirstPartyTypeKind2.ZodUnknown: return parseUnknownDef(refs); - case ZodFirstPartyTypeKind4.ZodDefault: + case ZodFirstPartyTypeKind2.ZodDefault: return parseDefaultDef(def, refs); - case ZodFirstPartyTypeKind4.ZodBranded: + case ZodFirstPartyTypeKind2.ZodBranded: return parseBrandedDef(def, refs); - case ZodFirstPartyTypeKind4.ZodReadonly: + case ZodFirstPartyTypeKind2.ZodReadonly: return parseReadonlyDef(def, refs); - case ZodFirstPartyTypeKind4.ZodCatch: + case ZodFirstPartyTypeKind2.ZodCatch: return parseCatchDef(def, refs); - case ZodFirstPartyTypeKind4.ZodPipeline: + case ZodFirstPartyTypeKind2.ZodPipeline: return parsePipelineDef(def, refs); - case ZodFirstPartyTypeKind4.ZodFunction: - case ZodFirstPartyTypeKind4.ZodVoid: - case ZodFirstPartyTypeKind4.ZodSymbol: + case ZodFirstPartyTypeKind2.ZodFunction: + case ZodFirstPartyTypeKind2.ZodVoid: + case ZodFirstPartyTypeKind2.ZodSymbol: return void 0; default: return /* @__PURE__ */ ((_) => void 0)(typeName); @@ -67295,7 +70478,7 @@ var init_selectParser = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseDef.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js function parseDef(def, refs, forceResolution = false) { const seenItem = refs.seen.get(def); if (refs.override) { @@ -67327,7 +70510,7 @@ function parseDef(def, refs, forceResolution = false) { } var get$ref, addMeta; var init_parseDef = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseDef.js"() { init_Options(); init_selectParser(); init_getRelativePath(); @@ -67360,16 +70543,16 @@ var init_parseDef = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js var init_parseTypes = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"() { } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js var zodToJsonSchema; var init_zodToJsonSchema = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js"() { init_parseDef(); init_Refs(); init_any(); @@ -67436,7 +70619,7 @@ var init_zodToJsonSchema = __esm({ } }); -// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/index.js +// ../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js var esm_exports = {}; __export(esm_exports, { addErrorMessage: () => addErrorMessage, @@ -67486,7 +70669,7 @@ __export(esm_exports, { }); var esm_default; var init_esm = __esm({ - "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@4.1.12/node_modules/zod-to-json-schema/dist/esm/index.js"() { + "../node_modules/.pnpm/zod-to-json-schema@3.24.6_zod@3.25.76/node_modules/zod-to-json-schema/dist/esm/index.js"() { init_Options(); init_Refs(); init_errorMessages(); @@ -67547,8 +70730,8 @@ var init_zod_Bw_60DVU = __esm({ throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${missingDependenciesUrl}`); }; try { - const { toJSONSchema: toJSONSchema3 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); - zodV4toJSONSchema = toJSONSchema3; + const { toJSONSchema: toJSONSchema2 } = await Promise.resolve().then(() => (init_core2(), core_exports2)); + zodV4toJSONSchema = toJSONSchema2; } catch (err) { if (err instanceof Error) console.error(err.message); @@ -67786,8 +70969,8 @@ var args = noSuggest("args"); // ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/isomorphic.js var fileName = () => { try { - const error42 = new Error(); - const stackLine = error42.stack?.split("\n")[2]?.trim() || ""; + const error41 = new Error(); + const stackLine = error41.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -67843,7 +71026,7 @@ var initialRegistryContents = { // ../node_modules/.pnpm/@ark+util@0.53.0/node_modules/@ark/util/out/traits.js var implementedTraits = noSuggest("implementedTraits"); -// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.37_zod@4.1.12/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +// ../node_modules/.pnpm/@anthropic-ai+claude-agent-sdk@0.1.37_zod@3.25.76/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs import { join as join3 } from "path"; import { fileURLToPath } from "url"; import { setMaxListeners } from "events"; @@ -68020,26 +71203,26 @@ var require_uri_all = __commonJS2((exports, module) => { } return result; } - function mapDomain(string4, fn2) { - var parts = string4.split("@"); + function mapDomain(string3, fn2) { + var parts = string3.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string4 = parts[1]; + string3 = parts[1]; } - string4 = string4.replace(regexSeparators, "."); - var labels = string4.split("."); + string3 = string3.replace(regexSeparators, "."); + var labels = string3.split("."); var encoded = map(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string4) { + function ucs2decode(string3) { var output = []; var counter = 0; - var length = string4.length; + var length = string3.length; while (counter < length) { - var value2 = string4.charCodeAt(counter++); + var value2 = string3.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string4.charCodeAt(counter++); + var extra = string3.charCodeAt(counter++); if ((extra & 64512) == 56320) { output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); } else { @@ -68079,7 +71262,7 @@ var require_uri_all = __commonJS2((exports, module) => { } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode2 = function decode3(input) { + var decode = function decode2(input) { var output = []; var inputLength = input.length; var i = 0; @@ -68127,7 +71310,7 @@ var require_uri_all = __commonJS2((exports, module) => { } return String.fromCodePoint.apply(String, output); }; - var encode3 = function encode4(input) { + var encode2 = function encode3(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -68242,13 +71425,13 @@ var require_uri_all = __commonJS2((exports, module) => { return output.join(""); }; var toUnicode = function toUnicode2(input) { - return mapDomain(input, function(string4) { - return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; + return mapDomain(input, function(string3) { + return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; }); }; var toASCII = function toASCII2(input) { - return mapDomain(input, function(string4) { - return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4; + return mapDomain(input, function(string3) { + return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; }); }; var punycode = { @@ -68257,8 +71440,8 @@ var require_uri_all = __commonJS2((exports, module) => { decode: ucs2decode, encode: ucs2encode }, - decode: decode2, - encode: encode3, + decode, + encode: encode2, toASCII, toUnicode }; @@ -68389,7 +71572,7 @@ var require_uri_all = __commonJS2((exports, module) => { } var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; - function parse6(uriString) { + function parse4(uriString) { var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; var components = {}; var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; @@ -68555,51 +71738,51 @@ var require_uri_all = __commonJS2((exports, module) => { } return uriTokens.join(""); } - function resolveComponents(base2, relative) { + function resolveComponents(base2, relative2) { var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; var skipNormalization = arguments[3]; var target = {}; if (!skipNormalization) { - base2 = parse6(serialize(base2, options), options); - relative = parse6(serialize(relative, options), options); + base2 = parse4(serialize(base2, options), options); + relative2 = parse4(serialize(relative2, options), options); } options = options || {}; - if (!options.tolerant && relative.scheme) { - target.scheme = relative.scheme; - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; + if (!options.tolerant && relative2.scheme) { + target.scheme = relative2.scheme; + target.userinfo = relative2.userinfo; + target.host = relative2.host; + target.port = relative2.port; + target.path = removeDotSegments(relative2.path || ""); + target.query = relative2.query; } else { - if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) { - target.userinfo = relative.userinfo; - target.host = relative.host; - target.port = relative.port; - target.path = removeDotSegments(relative.path || ""); - target.query = relative.query; + if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) { + target.userinfo = relative2.userinfo; + target.host = relative2.host; + target.port = relative2.port; + target.path = removeDotSegments(relative2.path || ""); + target.query = relative2.query; } else { - if (!relative.path) { + if (!relative2.path) { target.path = base2.path; - if (relative.query !== void 0) { - target.query = relative.query; + if (relative2.query !== void 0) { + target.query = relative2.query; } else { target.query = base2.query; } } else { - if (relative.path.charAt(0) === "/") { - target.path = removeDotSegments(relative.path); + if (relative2.path.charAt(0) === "/") { + target.path = removeDotSegments(relative2.path); } else { if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { - target.path = "/" + relative.path; + target.path = "/" + relative2.path; } else if (!base2.path) { - target.path = relative.path; + target.path = relative2.path; } else { - target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; + target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative2.path; } target.path = removeDotSegments(target.path); } - target.query = relative.query; + target.query = relative2.query; } target.userinfo = base2.userinfo; target.host = base2.host; @@ -68607,29 +71790,29 @@ var require_uri_all = __commonJS2((exports, module) => { } target.scheme = base2.scheme; } - target.fragment = relative.fragment; + target.fragment = relative2.fragment; return target; } - function resolve(baseURI, relativeURI, options) { + function resolve2(baseURI, relativeURI, options) { var schemelessOptions = assign({ scheme: "null" }, options); - return serialize(resolveComponents(parse6(baseURI, schemelessOptions), parse6(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + return serialize(resolveComponents(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); } function normalize2(uri, options) { if (typeof uri === "string") { - uri = serialize(parse6(uri, options), options); + uri = serialize(parse4(uri, options), options); } else if (typeOf(uri) === "object") { - uri = parse6(serialize(uri, options), options); + uri = parse4(serialize(uri, options), options); } return uri; } function equal(uriA, uriB, options) { if (typeof uriA === "string") { - uriA = serialize(parse6(uriA, options), options); + uriA = serialize(parse4(uriA, options), options); } else if (typeOf(uriA) === "object") { uriA = serialize(uriA, options); } if (typeof uriB === "string") { - uriB = serialize(parse6(uriB, options), options); + uriB = serialize(parse4(uriB, options), options); } else if (typeOf(uriB) === "object") { uriB = serialize(uriB, options); } @@ -68644,7 +71827,7 @@ var require_uri_all = __commonJS2((exports, module) => { var handler2 = { scheme: "http", domainHost: true, - parse: function parse7(components, options) { + parse: function parse5(components, options) { if (!components.host) { components.error = components.error || "HTTP URIs must have a host."; } @@ -68673,7 +71856,7 @@ var require_uri_all = __commonJS2((exports, module) => { var handler$2 = { scheme: "ws", domainHost: true, - parse: function parse7(components, options) { + parse: function parse5(components, options) { var wsComponents = components; wsComponents.secure = isSecure(wsComponents); wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); @@ -68849,7 +72032,7 @@ var require_uri_all = __commonJS2((exports, module) => { var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; var handler$6 = { scheme: "urn:uuid", - parse: function parse7(urnComponents, options) { + parse: function parse5(urnComponents, options) { var uuidComponents = urnComponents; uuidComponents.uuid = uuidComponents.nss; uuidComponents.nss = void 0; @@ -68874,11 +72057,11 @@ var require_uri_all = __commonJS2((exports, module) => { exports2.SCHEMES = SCHEMES; exports2.pctEncChar = pctEncChar; exports2.pctDecChars = pctDecChars; - exports2.parse = parse6; + exports2.parse = parse4; exports2.removeDotSegments = removeDotSegments; exports2.serialize = serialize; exports2.resolveComponents = resolveComponents; - exports2.resolve = resolve; + exports2.resolve = resolve2; exports2.normalize = normalize2; exports2.equal = equal; exports2.escapeComponent = escapeComponent; @@ -69234,20 +72417,20 @@ var require_resolve = __commonJS2((exports, module) => { var util3 = require_util8(); var SchemaObject = require_schema_obj(); var traverse = require_json_schema_traverse(); - module.exports = resolve; - resolve.normalizeId = normalizeId; - resolve.fullPath = getFullPath; - resolve.url = resolveUrl; - resolve.ids = resolveIds; - resolve.inlineRef = inlineRef; - resolve.schema = resolveSchema; - function resolve(compile, root2, ref) { + module.exports = resolve2; + resolve2.normalizeId = normalizeId; + resolve2.fullPath = getFullPath; + resolve2.url = resolveUrl; + resolve2.ids = resolveIds; + resolve2.inlineRef = inlineRef; + resolve2.schema = resolveSchema; + function resolve2(compile, root2, ref) { var refVal = this._refs[ref]; if (typeof refVal == "string") { if (this._refs[refVal]) refVal = this._refs[refVal]; else - return resolve.call(this, compile, root2, refVal); + return resolve2.call(this, compile, root2, refVal); } refVal = refVal || this._schemas[ref]; if (refVal instanceof SchemaObject) { @@ -69468,7 +72651,7 @@ var require_resolve = __commonJS2((exports, module) => { } }); var require_error_classes = __commonJS2((exports, module) => { - var resolve = require_resolve(); + var resolve2 = require_resolve(); module.exports = { Validation: errorSubclass(ValidationError), MissingRef: errorSubclass(MissingRefError) @@ -69483,8 +72666,8 @@ var require_error_classes = __commonJS2((exports, module) => { }; function MissingRefError(baseId, ref, message) { this.message = message || MissingRefError.message(baseId, ref); - this.missingRef = resolve.url(baseId, ref); - this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); + this.missingRef = resolve2.url(baseId, ref); + this.missingSchema = resolve2.normalizeId(resolve2.fullPath(this.missingRef)); } function errorSubclass(Subclass) { Subclass.prototype = Object.create(Error.prototype); @@ -70020,7 +73203,7 @@ var require_validate = __commonJS2((exports, module) => { }; }); var require_compile = __commonJS2((exports, module) => { - var resolve = require_resolve(); + var resolve2 = require_resolve(); var util3 = require_util8(); var errorClasses = require_error_classes(); var stableStringify = require_fast_json_stable_stringify(); @@ -70080,7 +73263,7 @@ var require_compile = __commonJS2((exports, module) => { RULES, validate: validateGenerator, util: util3, - resolve, + resolve: resolve2, resolveRef, usePattern, useDefault, @@ -70119,7 +73302,7 @@ var require_compile = __commonJS2((exports, module) => { return validate2; } function resolveRef(baseId2, ref, isRoot) { - ref = resolve.url(baseId2, ref); + ref = resolve2.url(baseId2, ref); var refIndex = refs[ref]; var _refVal, refCode; if (refIndex !== void 0) { @@ -70136,11 +73319,11 @@ var require_compile = __commonJS2((exports, module) => { } } refCode = addLocalRef(ref); - var v2 = resolve.call(self2, localCompile, root2, ref); + var v2 = resolve2.call(self2, localCompile, root2, ref); if (v2 === void 0) { var localSchema = localRefs && localRefs[ref]; if (localSchema) { - v2 = resolve.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root2, localRefs, baseId2); + v2 = resolve2.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root2, localRefs, baseId2); } } if (v2 === void 0) { @@ -70338,8 +73521,8 @@ var require_formats = __commonJS2((exports, module) => { "relative-json-pointer": RELATIVE_JSON_POINTER }; formats.full = { - date: date4, - time: time4, + date: date2, + time: time2, "date-time": date_time, uri, "uri-reference": URIREF, @@ -70358,7 +73541,7 @@ var require_formats = __commonJS2((exports, module) => { function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date4(str) { + function date2(str) { var matches = str.match(DATE); if (!matches) return false; @@ -70367,7 +73550,7 @@ var require_formats = __commonJS2((exports, module) => { var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time4(str, full) { + function time2(str, full) { var matches = str.match(TIME); if (!matches) return false; @@ -70380,7 +73563,7 @@ var require_formats = __commonJS2((exports, module) => { var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); + return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -73587,7 +76770,7 @@ var require_data2 = __commonJS2((exports, module) => { }); var require_ajv = __commonJS2((exports, module) => { var compileSchema = require_compile(); - var resolve = require_resolve(); + var resolve2 = require_resolve(); var Cache = require_cache2(); var SchemaObject = require_schema_obj(); var stableStringify = require_fast_json_stable_stringify(); @@ -73679,7 +76862,7 @@ var require_ajv = __commonJS2((exports, module) => { var id = this._getId(schema2); if (id !== void 0 && typeof id != "string") throw new Error("schema id must be string"); - key = resolve.normalizeId(key || id); + key = resolve2.normalizeId(key || id); checkUnique(this, key); this._schemas[key] = this._addSchema(schema2, _skipValidation, _meta, true); return this; @@ -73725,7 +76908,7 @@ var require_ajv = __commonJS2((exports, module) => { } } function _getSchemaFragment(self2, ref) { - var res = resolve.schema.call(self2, { schema: {} }, ref); + var res = resolve2.schema.call(self2, { schema: {} }, ref); if (res) { var { schema: schema2, root: root2, baseId } = res; var v = compileSchema.call(self2, schema2, root2, void 0, baseId); @@ -73741,7 +76924,7 @@ var require_ajv = __commonJS2((exports, module) => { } } function _getSchemaObj(self2, keyRef) { - keyRef = resolve.normalizeId(keyRef); + keyRef = resolve2.normalizeId(keyRef); return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; } function removeSchema(schemaKeyRef) { @@ -73769,7 +76952,7 @@ var require_ajv = __commonJS2((exports, module) => { this._cache.del(cacheKey); var id = this._getId(schemaKeyRef); if (id) { - id = resolve.normalizeId(id); + id = resolve2.normalizeId(id); delete this._schemas[id]; delete this._refs[id]; } @@ -73790,18 +76973,18 @@ var require_ajv = __commonJS2((exports, module) => { throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached5 = this._cache.get(cacheKey); - if (cached5) - return cached5; + var cached4 = this._cache.get(cacheKey); + if (cached4) + return cached4; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; - var id = resolve.normalizeId(this._getId(schema2)); + var id = resolve2.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); var willValidate = this._opts.validateSchema !== false && !skipValidation; var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) + if (willValidate && !(recursiveMeta = id && id == resolve2.normalizeId(schema2.$schema))) this.validateSchema(schema2, true); - var localRefs = resolve.ids.call(this, schema2); + var localRefs = resolve2.ids.call(this, schema2); var schemaObj = new SchemaObject({ id, schema: schema2, @@ -74257,12 +77440,12 @@ var ProcessTransport = class { this.abortHandler = cleanup; process.on("exit", this.processExitHandler); this.abortController.signal.addEventListener("abort", this.abortHandler); - this.child.on("error", (error42) => { + this.child.on("error", (error41) => { this.ready = false; if (this.abortController.signal.aborted) { this.exitError = new AbortError("Claude Code process aborted by user"); } else { - this.exitError = new Error(`Failed to spawn Claude Code process: ${error42.message}`); + this.exitError = new Error(`Failed to spawn Claude Code process: ${error41.message}`); this.logForDebugging(this.exitError.message); } }); @@ -74271,17 +77454,17 @@ var ProcessTransport = class { if (this.abortController.signal.aborted) { this.exitError = new AbortError("Claude Code process aborted by user"); } else { - const error42 = this.getProcessExitError(code, signal); - if (error42) { - this.exitError = error42; - this.logForDebugging(error42.message); + const error41 = this.getProcessExitError(code, signal); + if (error41) { + this.exitError = error41; + this.logForDebugging(error41.message); } } }); this.ready = true; - } catch (error42) { + } catch (error41) { this.ready = false; - throw error42; + throw error41; } } getProcessExitError(code, signal) { @@ -74323,9 +77506,9 @@ var ProcessTransport = class { if (!written && process.env.DEBUG_SDK) { console.warn("[ProcessTransport] Write buffer full, data queued"); } - } catch (error42) { + } catch (error41) { this.ready = false; - throw new Error(`Failed to write to process stdin: ${error42.message}`); + throw new Error(`Failed to write to process stdin: ${error41.message}`); } } close() { @@ -74371,8 +77554,8 @@ var ProcessTransport = class { } } await this.waitForExit(); - } catch (error42) { - throw error42; + } catch (error41) { + throw error41; } finally { rl.close(); } @@ -74390,8 +77573,8 @@ var ProcessTransport = class { return () => { }; const handler2 = (code, signal) => { - const error42 = this.getProcessExitError(code, signal); - callback(error42); + const error41 = this.getProcessExitError(code, signal); + callback(error41); }; this.child.on("exit", handler2); this.exitListeners.push({ callback, handler: handler2 }); @@ -74418,23 +77601,23 @@ var ProcessTransport = class { } return; } - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { const exitHandler = (code, signal) => { if (this.abortController.signal.aborted) { reject(new AbortError("Operation aborted")); return; } - const error42 = this.getProcessExitError(code, signal); - if (error42) { - reject(error42); + const error41 = this.getProcessExitError(code, signal); + if (error41) { + reject(error41); } else { - resolve(); + resolve2(); } }; this.child.once("exit", exitHandler); - const errorHandler = (error42) => { + const errorHandler = (error41) => { this.child.off("exit", exitHandler); - reject(error42); + reject(error41); }; this.child.once("error", errorHandler); this.child.once("exit", () => { @@ -74478,17 +77661,17 @@ var Stream = class { if (this.hasError) { return Promise.reject(this.hasError); } - return new Promise((resolve, reject) => { - this.readResolve = resolve; + return new Promise((resolve2, reject) => { + this.readResolve = resolve2; this.readReject = reject; }); } enqueue(value2) { if (this.readResolve) { - const resolve = this.readResolve; + const resolve2 = this.readResolve; this.readResolve = void 0; this.readReject = void 0; - resolve({ done: false, value: value2 }); + resolve2({ done: false, value: value2 }); } else { this.queue.push(value2); } @@ -74496,19 +77679,19 @@ var Stream = class { done() { this.isDone = true; if (this.readResolve) { - const resolve = this.readResolve; + const resolve2 = this.readResolve; this.readResolve = void 0; this.readReject = void 0; - resolve({ done: true, value: void 0 }); + resolve2({ done: true, value: void 0 }); } } - error(error42) { - this.hasError = error42; + error(error41) { + this.hasError = error41; if (this.readReject) { const reject = this.readReject; this.readResolve = void 0; this.readReject = void 0; - reject(error42); + reject(error41); } } return() { @@ -75161,18 +78344,18 @@ var Query = class { server.connect(sdkTransport); } this.sdkMessages = this.readSdkMessages(); - this.firstResultReceivedPromise = new Promise((resolve) => { - this.firstResultReceivedResolve = resolve; + this.firstResultReceivedPromise = new Promise((resolve2) => { + this.firstResultReceivedResolve = resolve2; }); this.readMessages(); this.initialization = this.initialize(); this.initialization.catch(() => { }); } - setError(error42) { - this.inputStream.error(error42); + setError(error41) { + this.inputStream.error(error41); } - cleanup(error42) { + cleanup(error41) { if (this.cleanupPerformed) return; this.cleanupPerformed = true; @@ -75180,8 +78363,8 @@ var Query = class { this.transport.close(); this.pendingControlResponses.clear(); this.pendingMcpResponses.clear(); - if (error42) { - this.inputStream.error(error42); + if (error41) { + this.inputStream.error(error41); } else { this.inputStream.done(); } @@ -75233,9 +78416,9 @@ var Query = class { } this.inputStream.done(); this.cleanup(); - } catch (error42) { - this.inputStream.error(error42); - this.cleanup(error42); + } catch (error41) { + this.inputStream.error(error41); + this.cleanup(error41); } } async handleControlRequest(request2) { @@ -75253,13 +78436,13 @@ var Query = class { }; await Promise.resolve(this.transport.write(JSON.stringify(controlResponse) + ` `)); - } catch (error42) { + } catch (error41) { const controlErrorResponse = { type: "control_response", response: { subtype: "error", request_id: request2.request_id, - error: error42.message || String(error42) + error: error41.message || String(error41) } }; await Promise.resolve(this.transport.write(JSON.stringify(controlErrorResponse) + ` @@ -75379,10 +78562,10 @@ var Query = class { type: "control_request", request: request2 }; - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { this.pendingControlResponses.set(requestId, (response) => { if (response.subtype === "success") { - resolve(response); + resolve2(response); } else { reject(new Error(response.error)); if (response.pending_permission_requests) { @@ -75436,10 +78619,10 @@ var Query = class { clearTimeout(timeoutId); } }), - new Promise((resolve) => { + new Promise((resolve2) => { timeoutId = setTimeout(() => { logForDebugging(`[Query.streamInput] Timed out waiting for first result, closing input stream`); - resolve(); + resolve2(); }, this.streamCloseTimeout); }) ]); @@ -75449,9 +78632,9 @@ var Query = class { } logForDebugging(`[Query] Calling transport.endInput() to close stdin to CLI process`); this.transport.endInput(); - } catch (error42) { - if (!(error42 instanceof AbortError)) { - throw error42; + } catch (error41) { + if (!(error41 instanceof AbortError)) { + throw error41; } } } @@ -75479,17 +78662,17 @@ var Query = class { handleMcpControlRequest(serverName, mcpRequest, transport) { const messageId = "id" in mcpRequest.message ? mcpRequest.message.id : null; const key = `${serverName}:${messageId}`; - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { const cleanup = () => { this.pendingMcpResponses.delete(key); }; const resolveAndCleanup = (response) => { cleanup(); - resolve(response); + resolve2(response); }; - const rejectAndCleanup = (error42) => { + const rejectAndCleanup = (error41) => { cleanup(); - reject(error42); + reject(error41); }; this.pendingMcpResponses.set(key, { resolve: resolveAndCleanup, @@ -75663,10 +78846,10 @@ var util; return; }; util22.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues3(array, separator2 = " | ") { + function joinValues2(array, separator2 = " | ") { return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); } - util22.joinValues = joinValues3; + util22.joinValues = joinValues2; util22.jsonStringifyReplacer = (_, value2) => { if (typeof value2 === "bigint") { return value2.toString(); @@ -75791,31 +78974,31 @@ var ZodError = class _ZodError extends Error { this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue3) { - return issue3.message; + const mapper = _mapper || function(issue2) { + return issue2.message; }; const fieldErrors = { _errors: [] }; - const processError = (error42) => { - for (const issue3 of error42.issues) { - if (issue3.code === "invalid_union") { - issue3.unionErrors.map(processError); - } else if (issue3.code === "invalid_return_type") { - processError(issue3.returnTypeError); - } else if (issue3.code === "invalid_arguments") { - processError(issue3.argumentsError); - } else if (issue3.path.length === 0) { - fieldErrors._errors.push(mapper(issue3)); + const processError = (error41) => { + for (const issue2 of error41.issues) { + if (issue2.code === "invalid_union") { + issue2.unionErrors.map(processError); + } else if (issue2.code === "invalid_return_type") { + processError(issue2.returnTypeError); + } else if (issue2.code === "invalid_arguments") { + processError(issue2.argumentsError); + } else if (issue2.path.length === 0) { + fieldErrors._errors.push(mapper(issue2)); } else { let curr = fieldErrors; let i = 0; - while (i < issue3.path.length) { - const el = issue3.path[i]; - const terminal = i === issue3.path.length - 1; + while (i < issue2.path.length) { + const el = issue2.path[i]; + const terminal = i === issue2.path.length - 1; if (!terminal) { curr[el] = curr[el] || { _errors: [] }; } else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue3)); + curr[el]._errors.push(mapper(issue2)); } curr = curr[el]; i++; @@ -75840,7 +79023,7 @@ var ZodError = class _ZodError extends Error { get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue3) => issue3.message) { + flatten(mapper = (issue2) => issue2.message) { const fieldErrors = {}; const formErrors = []; for (const sub of this.issues) { @@ -75859,33 +79042,33 @@ var ZodError = class _ZodError extends Error { } }; ZodError.create = (issues) => { - const error42 = new ZodError(issues); - return error42; + const error41 = new ZodError(issues); + return error41; }; -var errorMap = (issue3, _ctx) => { +var errorMap = (issue2, _ctx) => { let message; - switch (issue3.code) { + switch (issue2.code) { case ZodIssueCode.invalid_type: - if (issue3.received === ZodParsedType.undefined) { + if (issue2.received === ZodParsedType.undefined) { message = "Required"; } else { - message = `Expected ${issue3.expected}, received ${issue3.received}`; + message = `Expected ${issue2.expected}, received ${issue2.received}`; } break; case ZodIssueCode.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util.jsonStringifyReplacer)}`; break; case ZodIssueCode.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util.joinValues(issue3.keys, ", ")}`; + message = `Unrecognized key(s) in object: ${util.joinValues(issue2.keys, ", ")}`; break; case ZodIssueCode.invalid_union: message = `Invalid input`; break; case ZodIssueCode.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util.joinValues(issue3.options)}`; + message = `Invalid discriminator value. Expected ${util.joinValues(issue2.options)}`; break; case ZodIssueCode.invalid_enum_value: - message = `Invalid enum value. Expected ${util.joinValues(issue3.options)}, received '${issue3.received}'`; + message = `Invalid enum value. Expected ${util.joinValues(issue2.options)}, received '${issue2.received}'`; break; case ZodIssueCode.invalid_arguments: message = `Invalid function arguments`; @@ -75897,50 +79080,50 @@ var errorMap = (issue3, _ctx) => { message = `Invalid date`; break; case ZodIssueCode.invalid_string: - if (typeof issue3.validation === "object") { - if ("includes" in issue3.validation) { - message = `Invalid input: must include "${issue3.validation.includes}"`; - if (typeof issue3.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; + if (typeof issue2.validation === "object") { + if ("includes" in issue2.validation) { + message = `Invalid input: must include "${issue2.validation.includes}"`; + if (typeof issue2.validation.position === "number") { + message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; } - } else if ("startsWith" in issue3.validation) { - message = `Invalid input: must start with "${issue3.validation.startsWith}"`; - } else if ("endsWith" in issue3.validation) { - message = `Invalid input: must end with "${issue3.validation.endsWith}"`; + } else if ("startsWith" in issue2.validation) { + message = `Invalid input: must start with "${issue2.validation.startsWith}"`; + } else if ("endsWith" in issue2.validation) { + message = `Invalid input: must end with "${issue2.validation.endsWith}"`; } else { - util.assertNever(issue3.validation); + util.assertNever(issue2.validation); } - } else if (issue3.validation !== "regex") { - message = `Invalid ${issue3.validation}`; + } else if (issue2.validation !== "regex") { + message = `Invalid ${issue2.validation}`; } else { message = "Invalid"; } break; case ZodIssueCode.too_small: - if (issue3.type === "array") - message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; - else if (issue3.type === "string") - message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; - else if (issue3.type === "number") - message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; - else if (issue3.type === "bigint") - message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; - else if (issue3.type === "date") - message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; + if (issue2.type === "array") + message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; + else if (issue2.type === "string") + message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; + else if (issue2.type === "number") + message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; + else if (issue2.type === "bigint") + message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; + else if (issue2.type === "date") + message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; else message = "Invalid input"; break; case ZodIssueCode.too_big: - if (issue3.type === "array") - message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; - else if (issue3.type === "string") - message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; - else if (issue3.type === "number") - message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; - else if (issue3.type === "bigint") - message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; - else if (issue3.type === "date") - message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; + if (issue2.type === "array") + message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; + else if (issue2.type === "string") + message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; + else if (issue2.type === "number") + message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; + else if (issue2.type === "bigint") + message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; + else if (issue2.type === "date") + message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; else message = "Invalid input"; break; @@ -75951,14 +79134,14 @@ var errorMap = (issue3, _ctx) => { message = `Intersection results could not be merged`; break; case ZodIssueCode.not_multiple_of: - message = `Number must be a multiple of ${issue3.multipleOf}`; + message = `Number must be a multiple of ${issue2.multipleOf}`; break; case ZodIssueCode.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util.assertNever(issue3); + util.assertNever(issue2); } return { message }; }; @@ -75998,7 +79181,7 @@ var makeIssue = (params) => { var EMPTY_PATH = []; function addIssueToContext(ctx, issueData) { const overrideMap = getErrorMap(); - const issue3 = makeIssue({ + const issue2 = makeIssue({ issueData, data: ctx.data, path: ctx.path, @@ -76009,7 +79192,7 @@ function addIssueToContext(ctx, issueData) { overrideMap === en_default ? void 0 : en_default ].filter((x) => !!x) }); - ctx.common.issues.push(issue3); + ctx.common.issues.push(issue2); } var ParseStatus = class _ParseStatus { constructor() { @@ -76110,8 +79293,8 @@ var handleResult = (ctx, result) => { get error() { if (this._error) return this._error; - const error42 = new ZodError(ctx.common.issues); - this._error = error42; + const error41 = new ZodError(ctx.common.issues); + this._error = error41; return this._error; } }; @@ -76463,11 +79646,11 @@ function datetimeRegex(args3) { regex3 = `${regex3}(${opts.join("|")})`; return new RegExp(`^${regex3}$`); } -function isValidIP(ip2, version3) { - if ((version3 === "v4" || !version3) && ipv4Regex.test(ip2)) { +function isValidIP(ip2, version2) { + if ((version2 === "v4" || !version2) && ipv4Regex.test(ip2)) { return true; } - if ((version3 === "v6" || !version3) && ipv6Regex.test(ip2)) { + if ((version2 === "v6" || !version2) && ipv6Regex.test(ip2)) { return true; } return false; @@ -76479,8 +79662,8 @@ function isValidJWT(jwt, alg) { const [header] = jwt.split("."); if (!header) return false; - const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base644)); + const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base643)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") @@ -76494,11 +79677,11 @@ function isValidJWT(jwt, alg) { return false; } } -function isValidCidr(ip2, version3) { - if ((version3 === "v4" || !version3) && ipv4CidrRegex.test(ip2)) { +function isValidCidr(ip2, version2) { + if ((version2 === "v4" || !version2) && ipv4CidrRegex.test(ip2)) { return true; } - if ((version3 === "v6" || !version3) && ipv6CidrRegex.test(ip2)) { + if ((version2 === "v6" || !version2) && ipv6CidrRegex.test(ip2)) { return true; } return false; @@ -76508,8 +79691,8 @@ var ZodString = class _ZodString extends ZodType { if (this._def.coerce) { input.data = String(input.data); } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.string) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.string) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -77065,8 +80248,8 @@ var ZodNumber = class _ZodNumber extends ZodType { if (this._def.coerce) { input.data = Number(input.data); } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.number) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.number) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -77300,8 +80483,8 @@ var ZodBigInt = class _ZodBigInt extends ZodType { return this._getInvalidInput(input); } } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.bigint) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.bigint) { return this._getInvalidInput(input); } let ctx = void 0; @@ -77463,8 +80646,8 @@ var ZodBoolean = class extends ZodType { if (this._def.coerce) { input.data = Boolean(input.data); } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.boolean) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.boolean) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -77488,8 +80671,8 @@ var ZodDate = class _ZodDate extends ZodType { if (this._def.coerce) { input.data = new Date(input.data); } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.date) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.date) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -77594,8 +80777,8 @@ ZodDate.create = (params) => { }; var ZodSymbol = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.symbol) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.symbol) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -77615,8 +80798,8 @@ ZodSymbol.create = (params) => { }; var ZodUndefined = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.undefined) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -77636,8 +80819,8 @@ ZodUndefined.create = (params) => { }; var ZodNull = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.null) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.null) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -77704,8 +80887,8 @@ ZodNever.create = (params) => { }; var ZodVoid = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.undefined) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.undefined) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -77866,8 +81049,8 @@ var ZodObject = class _ZodObject extends ZodType { return this._cached; } _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.object) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.object) { const ctx2 = this._getOrReturnCtx(input); addIssueToContext(ctx2, { code: ZodIssueCode.invalid_type, @@ -77957,9 +81140,9 @@ var ZodObject = class _ZodObject extends ZodType { ...this._def, unknownKeys: "strict", ...message !== void 0 ? { - errorMap: (issue3, ctx) => { - const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; - if (issue3.code === "unrecognized_keys") + errorMap: (issue2, ctx) => { + const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; + if (issue2.code === "unrecognized_keys") return { message: errorUtil.errToObj(message).message ?? defaultError }; @@ -78671,25 +81854,25 @@ var ZodFunction = class _ZodFunction extends ZodType { }); return INVALID; } - function makeArgsIssue(args3, error42) { + function makeArgsIssue(args3, error41) { return makeIssue({ data: args3, path: ctx.path, errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), issueData: { code: ZodIssueCode.invalid_arguments, - argumentsError: error42 + argumentsError: error41 } }); } - function makeReturnsIssue(returns, error42) { + function makeReturnsIssue(returns, error41) { return makeIssue({ data: returns, path: ctx.path, errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x), issueData: { code: ZodIssueCode.invalid_return_type, - returnTypeError: error42 + returnTypeError: error41 } }); } @@ -78698,15 +81881,15 @@ var ZodFunction = class _ZodFunction extends ZodType { if (this._def.returns instanceof ZodPromise) { const me = this; return OK(async function(...args3) { - const error42 = new ZodError([]); + const error41 = new ZodError([]); const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error42.addIssue(makeArgsIssue(args3, e)); - throw error42; + error41.addIssue(makeArgsIssue(args3, e)); + throw error41; }); const result = await Reflect.apply(fn2, this, parsedArgs); const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error42.addIssue(makeReturnsIssue(result, e)); - throw error42; + error41.addIssue(makeReturnsIssue(result, e)); + throw error41; }); return parsedReturns; }); @@ -79083,8 +82266,8 @@ ZodEffects.createWithPreprocess = (preprocess, schema2, params) => { }; var ZodOptional = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 === ZodParsedType.undefined) { + const parsedType4 = this._getType(input); + if (parsedType4 === ZodParsedType.undefined) { return OK(void 0); } return this._def.innerType._parse(input); @@ -79102,8 +82285,8 @@ ZodOptional.create = (type2, params) => { }; var ZodNullable = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 === ZodParsedType.null) { + const parsedType4 = this._getType(input); + if (parsedType4 === ZodParsedType.null) { return OK(null); } return this._def.innerType._parse(input); @@ -79199,8 +82382,8 @@ ZodCatch.create = (type2, params) => { }; var ZodNaN = class extends ZodType { _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType.nan) { + const parsedType4 = this._getType(input); + if (parsedType4 !== ZodParsedType.nan) { const ctx = this._getOrReturnCtx(input); addIssueToContext(ctx, { code: ZodIssueCode.invalid_type, @@ -80076,15 +83259,15 @@ function query({ const allMcpServers = {}; const sdkMcpServers = /* @__PURE__ */ new Map(); if (mcpServers) { - for (const [name, config3] of Object.entries(mcpServers)) { - if (config3.type === "sdk" && "instance" in config3) { - sdkMcpServers.set(name, config3.instance); + for (const [name, config2] of Object.entries(mcpServers)) { + if (config2.type === "sdk" && "instance" in config2) { + sdkMcpServers.set(name, config2.instance); allMcpServers[name] = { type: "sdk", name }; } else { - allMcpServers[name] = config3; + allMcpServers[name] = config2; } } } @@ -81237,8 +84420,8 @@ var Hkt = class { // ../node_modules/.pnpm/@ark+util@0.56.0/node_modules/@ark/util/out/isomorphic.js var fileName2 = () => { try { - const error42 = new Error(); - const stackLine = error42.stack?.split("\n")[2]?.trim() || ""; + const error41 = new Error(); + const stackLine = error41.stack?.split("\n")[2]?.trim() || ""; const filePath = stackLine.match(/\(?(.+?)(?::\d+:\d+)?\)?$/)?.[1] || "unknown"; return filePath.replace(/^file:\/\//, ""); } catch { @@ -81467,20 +84650,20 @@ var _serialize = (data, opts, seen) => { return data; } }; -var describeCollapsibleDate = (date4) => { - const year = date4.getFullYear(); - const month = date4.getMonth(); - const dayOfMonth = date4.getDate(); - const hours = date4.getHours(); - const minutes = date4.getMinutes(); - const seconds = date4.getSeconds(); - const milliseconds = date4.getMilliseconds(); +var describeCollapsibleDate = (date2) => { + const year = date2.getFullYear(); + const month = date2.getMonth(); + const dayOfMonth = date2.getDate(); + const hours = date2.getHours(); + const minutes = date2.getMinutes(); + const seconds = date2.getSeconds(); + const milliseconds = date2.getMilliseconds(); if (month === 0 && dayOfMonth === 1 && hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) return `${year}`; const datePortion = `${months[month]} ${dayOfMonth}, ${year}`; if (hours === 0 && minutes === 0 && seconds === 0 && milliseconds === 0) return datePortion; - let timePortion = date4.toLocaleTimeString(); + let timePortion = date2.toLocaleTimeString(); const suffix2 = timePortion.endsWith(" AM") || timePortion.endsWith(" PM") ? timePortion.slice(-3) : ""; if (suffix2) timePortion = timePortion.slice(0, -suffix2.length); @@ -81942,8 +85125,8 @@ var ToJsonSchema = { // ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/config.js $ark.config ??= {}; -var configureSchema = (config3) => { - const result = Object.assign($ark.config, mergeConfigs($ark.config, config3)); +var configureSchema = (config2) => { + const result = Object.assign($ark.config, mergeConfigs($ark.config, config2)); if ($ark.resolvedConfig) $ark.resolvedConfig = mergeConfigs($ark.resolvedConfig, result); return result; @@ -82070,26 +85253,26 @@ var ArkError = class _ArkError extends CastableBase { get expected() { if (this.input.expected) return this.input.expected; - const config3 = this.meta?.expected ?? this.nodeConfig.expected; - return typeof config3 === "function" ? config3(this.input) : config3; + const config2 = this.meta?.expected ?? this.nodeConfig.expected; + return typeof config2 === "function" ? config2(this.input) : config2; } get actual() { if (this.input.actual) return this.input.actual; - const config3 = this.meta?.actual ?? this.nodeConfig.actual; - return typeof config3 === "function" ? config3(this.data) : config3; + const config2 = this.meta?.actual ?? this.nodeConfig.actual; + return typeof config2 === "function" ? config2(this.data) : config2; } get problem() { if (this.input.problem) return this.input.problem; - const config3 = this.meta?.problem ?? this.nodeConfig.problem; - return typeof config3 === "function" ? config3(this) : config3; + const config2 = this.meta?.problem ?? this.nodeConfig.problem; + return typeof config2 === "function" ? config2(this) : config2; } get message() { if (this.input.message) return this.input.message; - const config3 = this.meta?.message ?? this.nodeConfig.message; - return typeof config3 === "function" ? config3(this) : config3; + const config2 = this.meta?.message ?? this.nodeConfig.message; + return typeof config2 === "function" ? config2(this) : config2; } get flat() { return this.hasCode("intersection") ? [...this.errors] : [this]; @@ -82161,25 +85344,25 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray2 { /** * Append an ArkError to this array, ignoring duplicates. */ - add(error42) { - const existing = this.byPath[error42.propString]; + add(error41) { + const existing = this.byPath[error41.propString]; if (existing) { - if (error42 === existing) + if (error41 === existing) return; if (existing.hasCode("union") && existing.errors.length === 0) return; - const errorIntersection = error42.hasCode("union") && error42.errors.length === 0 ? error42 : new ArkError({ + const errorIntersection = error41.hasCode("union") && error41.errors.length === 0 ? error41 : new ArkError({ code: "intersection", - errors: existing.hasCode("intersection") ? [...existing.errors, error42] : [existing, error42] + errors: existing.hasCode("intersection") ? [...existing.errors, error41] : [existing, error41] }, this.ctx); const existingIndex = this.indexOf(existing); this.mutable[existingIndex === -1 ? this.length : existingIndex] = errorIntersection; - this.byPath[error42.propString] = errorIntersection; - this.addAncestorPaths(error42); + this.byPath[error41.propString] = errorIntersection; + this.addAncestorPaths(error41); } else { - this.byPath[error42.propString] = error42; - this.addAncestorPaths(error42); - this.mutable.push(error42); + this.byPath[error41.propString] = error41; + this.addAncestorPaths(error41); + this.mutable.push(error41); } this.count++; } @@ -82230,9 +85413,9 @@ var ArkErrors = class _ArkErrors extends ReadonlyArray2 { toString() { return this.join("\n"); } - addAncestorPaths(error42) { - for (const propString of error42.path.stringifyAncestors()) { - this.byAncestorPath[propString] = append2(this.byAncestorPath[propString], error42); + addAncestorPaths(error41) { + for (const propString of error41.path.stringifyAncestors()) { + this.byAncestorPath[propString] = append2(this.byAncestorPath[propString], error41); } } }; @@ -82242,14 +85425,14 @@ var TraversalError = class extends Error { if (errors.length === 1) super(errors.summary); else - super("\n" + errors.map((error42) => ` \u2022 ${indent(error42)}`).join("\n")); + super("\n" + errors.map((error41) => ` \u2022 ${indent(error41)}`).join("\n")); Object.defineProperty(this, "arkErrors", { value: errors, enumerable: false }); } }; -var indent = (error42) => error42.toString().split("\n").join("\n "); +var indent = (error41) => error41.toString().split("\n").join("\n "); // ../node_modules/.pnpm/@ark+schema@0.56.0/node_modules/@ark/schema/out/shared/traversal.js var Traversal = class { @@ -82282,9 +85465,9 @@ var Traversal = class { queuedMorphs = []; branches = []; seen = {}; - constructor(root2, config3) { + constructor(root2, config2) { this.root = root2; - this.config = config3; + this.config = config2; } /** * #### the data being validated or morphed @@ -82385,12 +85568,12 @@ var Traversal = class { return this.errorFromContext(input); } errorFromContext(errCtx) { - const error42 = new ArkError(errCtx, this); + const error41 = new ArkError(errCtx, this); if (this.currentBranch) - this.currentBranch.error = error42; + this.currentBranch.error = error41; else - this.errors.add(error42); - return error42; + this.errors.add(error41); + return error41; } applyQueuedMorphs() { while (this.queuedMorphs.length) { @@ -82534,10 +85717,10 @@ var BaseNode = class extends Callable { }; case "optimistic": this.contextFreeMorph = this.shallowMorphs[0]; - const clone3 = this.$.resolvedConfig.clone; + const clone2 = this.$.resolvedConfig.clone; return (data, onFail) => { if (this.allows(data)) { - return this.contextFreeMorph(clone3 && (typeof data === "object" && data !== null || typeof data === "function") ? clone3(data) : data); + return this.contextFreeMorph(clone2 && (typeof data === "object" && data !== null || typeof data === "function") ? clone2(data) : data); } const ctx = new Traversal(data, this.$.resolvedConfig); this.traverseApply(data, ctx); @@ -84611,7 +87794,7 @@ var implementation13 = implementNode({ numberAllowsNaN: {} }, normalize: (schema2) => typeof schema2 === "string" ? { domain: schema2 } : hasKey(schema2, "numberAllowsNaN") && schema2.domain !== "number" ? throwParseError2(Domain.writeBadAllowNanMessage(schema2.domain)) : schema2, - applyConfig: (schema2, config3) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config3.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, + applyConfig: (schema2, config2) => schema2.numberAllowsNaN === void 0 && schema2.domain === "number" && config2.numberAllowsNaN ? { ...schema2, numberAllowsNaN: true } : schema2, defaults: { description: (node2) => domainDescriptions2[node2.domain], actual: (data) => Number.isNaN(data) ? "NaN" : domainDescriptions2[domainOf2(data)] @@ -85071,8 +88254,8 @@ var implementation16 = implementNode({ throwParseError2(Proto.writeBadInvalidDateMessage(normalized.proto)); return normalized; }, - applyConfig: (schema2, config3) => { - if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config3.dateAllowsInvalid) + applyConfig: (schema2, config2) => { + if (schema2.dateAllowsInvalid === void 0 && schema2.proto === Date && config2.dateAllowsInvalid) return { ...schema2, dateAllowsInvalid: true }; return schema2; }, @@ -86342,11 +89525,11 @@ var implementation22 = implementNode({ kind: "structure", hasAssociatedError: false, normalize: (schema2) => schema2, - applyConfig: (schema2, config3) => { - if (!schema2.undeclared && config3.onUndeclaredKey !== "ignore") { + applyConfig: (schema2, config2) => { + if (!schema2.undeclared && config2.onUndeclaredKey !== "ignore") { return { ...schema2, - undeclared: config3.onUndeclaredKey + undeclared: config2.onUndeclaredKey }; } return schema2; @@ -87121,9 +90304,9 @@ var BaseScope = class { resolved = false; nodesByHash = {}; intrinsic; - constructor(def, config3) { - this.config = mergeConfigs($ark.config, config3); - this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config3); + constructor(def, config2) { + this.config = mergeConfigs($ark.config, config2); + this.resolvedConfig = mergeConfigs($ark.resolvedConfig, config2); this.name = this.resolvedConfig.name ?? `anonymousScope${Object.keys(scopesByName).length}`; if (this.name in scopesByName) throwParseError2(`A Scope already named ${this.name} already exists`); @@ -87200,10 +90383,10 @@ var BaseScope = class { }); }; lazyResolutions = []; - lazilyResolve(resolve, syntheticAlias) { + lazilyResolve(resolve2, syntheticAlias) { const node2 = this.node("alias", { reference: syntheticAlias ?? "synthetic", - resolve + resolve: resolve2 }, { prereduced: true }); if (!this.resolved) this.lazyResolutions.push(node2); @@ -87273,11 +90456,11 @@ var BaseScope = class { return $ark.ambient; } maybeResolve(name) { - const cached5 = this.resolutions[name]; - if (cached5) { - if (typeof cached5 !== "string") - return this.bindReference(cached5); - const v = nodesByRegisteredId[cached5]; + const cached4 = this.resolutions[name]; + if (cached4) { + if (typeof cached4 !== "string") + return this.bindReference(cached4); + const v = nodesByRegisteredId[cached4]; if (hasArkKind(v, "root")) return this.resolutions[name] = v; if (hasArkKind(v, "context")) { @@ -87294,7 +90477,7 @@ var BaseScope = class { nodesByRegisteredId[v.id] = node2; return this.resolutions[name] = node2; } - return throwInternalError2(`Unexpected nodesById entry for ${cached5}: ${printable2(v)}`); + return throwInternalError2(`Unexpected nodesById entry for ${cached4}: ${printable2(v)}`); } let def = this.aliases[name] ?? this.ambient?.[name]; if (!def) @@ -87442,7 +90625,7 @@ var maybeResolveSubalias = (base, name) => { } throwInternalError2(`Unexpected resolution for alias '${name}': ${printable2(resolution)}`); }; -var schemaScope = (aliases, config3) => new SchemaScope(aliases, config3); +var schemaScope = (aliases, config2) => new SchemaScope(aliases, config2); var rootSchemaScope = new SchemaScope({}); var resolutionsOfModule = ($2, typeSet) => { const result = {}; @@ -87588,8 +90771,8 @@ var parseEnclosed = (s, enclosing) => { } else if (isKeyOf2(enclosing, enclosingQuote)) s.root = s.ctx.$.node("unit", { unit: enclosed }); else { - const date4 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); - s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date4 }); + const date2 = tryParseDate(enclosed, writeInvalidDateMessage(enclosed)); + s.root = s.ctx.$.node("unit", { meta: enclosed, unit: date2 }); } }; var enclosingQuote = { @@ -88599,9 +91782,9 @@ var InternalScope = class _InternalScope extends BaseScope { if (hasArkKind(def, "module") || hasArkKind(def, "generic")) return [alias, def]; const qualifiedName = this.name === "ark" ? alias : alias === "root" ? this.name : `${this.name}.${alias}`; - const config3 = this.resolvedConfig.keywords?.[qualifiedName]; - if (config3) - def = [def, "@", config3]; + const config2 = this.resolvedConfig.keywords?.[qualifiedName]; + if (config2) + def = [def, "@", config2]; return [alias, def]; } if (alias[alias.length - 1] !== ">") { @@ -88669,8 +91852,8 @@ var InternalScope = class _InternalScope extends BaseScope { return def; } type = new InternalTypeParser(this); - static scope = ((def, config3 = {}) => new _InternalScope(def, config3)); - static module = ((def, config3 = {}) => this.scope(def, config3).export()); + static scope = ((def, config2 = {}) => new _InternalScope(def, config2)); + static module = ((def, config2 = {}) => this.scope(def, config2).export()); }; var scope = Object.assign(InternalScope.scope, { define: (def) => def @@ -88937,10 +92120,10 @@ var stringDate = Scope.module({ declaredIn: parsableDate, in: "string", morphs: (s, ctx) => { - const date4 = new Date(s); - if (Number.isNaN(date4.valueOf())) + const date2 = new Date(s); + if (Number.isNaN(date2.valueOf())) return ctx.error("a parsable date"); - return date4; + return date2; }, declaredOut: intrinsic.Date }), @@ -88971,10 +92154,10 @@ var ip = Scope.module({ name: "string.ip" }); var jsonStringDescription = "a JSON string"; -var writeJsonSyntaxErrorProblem = (error42) => { - if (!(error42 instanceof SyntaxError)) - throw error42; - return `must be ${jsonStringDescription} (${error42})`; +var writeJsonSyntaxErrorProblem = (error41) => { + if (!(error41 instanceof SyntaxError)) + throw error41; + return `must be ${jsonStringDescription} (${error41})`; }; var jsonRoot = rootSchema({ meta: jsonStringDescription, @@ -89394,7 +92577,7 @@ function getModes({ prompt: `Follow these steps: 1. If the request requires understanding the codebase structure, dependencies, or conventions, gather relevant context. Read AGENTS.md if it exists, ${depsContext} run tests, run builds, and make changes according to best practices). Skip this step if the prompt is trivial and self-contained. -2. Create a branch using ${ghPullfrogMcpName}/create_branch. The branch name should be prefixed with "pullfrog/". The rest of the name should reflect the exact changes you are making. It should be specific to avoid collisions with other branches. Never commit directly to main, master, or production. Do NOT use git commands directly - always use ${ghPullfrogMcpName} MCP tools for git operations. +2. If this is a PR event, the PR branch is already checked out - skip branch creation. Otherwise, create a branch using ${ghPullfrogMcpName}/create_branch. The branch name should be prefixed with "pullfrog/". The rest of the name should reflect the exact changes you are making. It should be specific to avoid collisions with other branches. Never commit directly to main, master, or production. Do NOT use git commands directly (including \`git branch\`, \`git status\`, \`git log\`) - always use ${ghPullfrogMcpName} MCP tools for git operations. 3. Understand the requirements and any existing plan @@ -89544,8 +92727,8 @@ function formatPrepResults(results) { lines.push( `\u26A0\uFE0F ${langDisplay} dependency installation FAILED (using \`${result.packageManager}\`).` ); - for (const issue3 of result.issues) { - lines.push(` - ${issue3}`); + for (const issue2 of result.issues) { + lines.push(` - ${issue2}`); } lines.push( ` You may need to run \`${result.packageManager} install\` or address this issue before proceeding.` @@ -89561,8 +92744,8 @@ function formatPrepResults(results) { lines.push( `\u26A0\uFE0F ${langDisplay} dependency installation FAILED (using \`${result.packageManager}\` from ${result.configFile}).` ); - for (const issue3 of result.issues) { - lines.push(` - ${issue3}`); + for (const issue2 of result.issues) { + lines.push(` - ${issue2}`); } lines.push( ` You may need to run the appropriate install command or address this issue before proceeding.` @@ -89690,6 +92873,8 @@ Tool names may be formatted as \`(server name)/(tool name)\`, for example: \`${g **Do not attempt to configure git credentials manually** - the ${ghPullfrogMcpName} server handles all authentication internally. +**Efficiency**: Trust the tools - do not repeatedly verify file contents or git status after operations. If a tool reports success, proceed to the next step. Only verify if you encounter an actual error. + **Commenting style**: When posting comments via ${ghPullfrogMcpName}, write as a professional team member would. Your final comments should be polished and actionable\u2014do not include intermediate reasoning like "I'll now look at the code" or "Let me respond to the question." **If you get stuck**: If you cannot complete a task due to missing information, ambiguity, or an unrecoverable error: @@ -89769,12 +92954,12 @@ async function acquireTokenViaOIDC() { const tokenData = await tokenResponse.json(); log.info(`Installation token obtained for ${tokenData.repository || "all repositories"}`); return tokenData.token; - } catch (error42) { + } catch (error41) { clearTimeout(timeoutId); - if (error42 instanceof Error && error42.name === "AbortError") { + if (error41 instanceof Error && error41.name === "AbortError") { throw new Error(`Token exchange timed out after ${timeoutMs}ms`); } - throw error42; + throw error41; } } var base64UrlEncode = (str) => { @@ -89861,14 +93046,14 @@ var findInstallationId = async (jwt, repoOwner, repoName) => { }; async function acquireTokenViaGitHubApp() { const repoContext = parseRepoContext(); - const config3 = { + const config2 = { appId: process.env.GITHUB_APP_ID, privateKey: process.env.GITHUB_PRIVATE_KEY?.replace(/\\n/g, "\n"), repoOwner: repoContext.owner, repoName: repoContext.name }; - const jwt = generateJWT(config3.appId, config3.privateKey); - const installationId = await findInstallationId(jwt, config3.repoOwner, config3.repoName); + const jwt = generateJWT(config2.appId, config2.privateKey); + const installationId = await findInstallationId(jwt, config2.repoOwner, config2.repoName); const token = await createInstallationToken(jwt, installationId); return token; } @@ -89909,9 +93094,9 @@ async function revokeGitHubInstallationToken() { } }); log.info("Installation token revoked"); - } catch (error42) { + } catch (error41) { log.warning( - `Failed to revoke installation token: ${error42 instanceof Error ? error42.message : String(error42)}` + `Failed to revoke installation token: ${error41 instanceof Error ? error41.message : String(error41)}` ); } } @@ -89944,14 +93129,14 @@ function setupProcessAgentEnv(agentSpecificVars) { } async function installFromNpmTarball({ packageName, - version: version3, + version: version2, executablePath, installDependencies }) { - let resolvedVersion = version3; - if (version3.startsWith("^") || version3.startsWith("~") || version3 === "latest") { + let resolvedVersion = version2; + if (version2.startsWith("^") || version2.startsWith("~") || version2 === "latest") { const npmRegistry2 = process.env.NPM_REGISTRY || "https://registry.npmjs.org"; - log.info(`Resolving version for ${version3}...`); + log.info(`Resolving version for ${version2}...`); try { const registryResponse = await fetch(`${npmRegistry2}/${packageName}`); if (!registryResponse.ok) { @@ -89960,11 +93145,11 @@ async function installFromNpmTarball({ const registryData = await registryResponse.json(); resolvedVersion = registryData["dist-tags"].latest; log.info(`Resolved to version ${resolvedVersion}`); - } catch (error42) { + } catch (error41) { log.warning( - `Failed to resolve version from registry: ${error42 instanceof Error ? error42.message : String(error42)}` + `Failed to resolve version from registry: ${error41 instanceof Error ? error41.message : String(error41)}` ); - throw error42; + throw error41; } } log.info(`\u{1F4E6} Installing ${packageName}@${resolvedVersion}...`); @@ -90029,7 +93214,7 @@ async function fetchWithRetry(url2, headers, errorMessage) { const waitSeconds = parseInt(retryAfter, 10); if (!Number.isNaN(waitSeconds) && waitSeconds > 0) { log.info(`Rate limited, waiting ${waitSeconds} seconds before retry...`); - await new Promise((resolve) => setTimeout(resolve, waitSeconds * 1e3)); + await new Promise((resolve2) => setTimeout(resolve2, waitSeconds * 1e3)); const retryResponse = await fetch(url2, { headers }); if (!retryResponse.ok) { throw new Error( @@ -90300,9 +93485,9 @@ async function createOutputSchemaFile(schema2) { try { await fs2.writeFile(schemaPath, JSON.stringify(schema2), "utf8"); return { schemaPath, cleanup }; - } catch (error42) { + } catch (error41) { await cleanup(); - throw error42; + throw error41; } } function isJsonObject2(value2) { @@ -90353,8 +93538,8 @@ var Thread = class { let parsed2; try { parsed2 = JSON.parse(item); - } catch (error42) { - throw new Error(`Failed to parse item: ${item}`, { cause: error42 }); + } catch (error41) { + throw new Error(`Failed to parse item: ${item}`, { cause: error41 }); } if (parsed2.type === "thread.started") { this._id = parsed2.thread_id; @@ -90491,10 +93676,10 @@ var CodexExec = class { for await (const line of rl) { yield line; } - const exitCode = new Promise((resolve, reject) => { + const exitCode = new Promise((resolve2, reject) => { child.once("exit", (code) => { if (code === 0) { - resolve(code); + resolve2(code); } else { const stderrBuffer = Buffer.concat(stderrChunks); reject( @@ -90652,8 +93837,8 @@ var codex = agent({ success: true, output: finalOutput2 }; - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); log.error(`Codex execution failed: ${errorMessage}`); return { success: false, @@ -90846,7 +94031,7 @@ var cursor = agent({ } log.info("Running Cursor CLI..."); const startTime = Date.now(); - return new Promise((resolve) => { + return new Promise((resolve2) => { const child = spawn3(cliPath, cursorArgs, { cwd: process.cwd(), env: createAgentEnv({ @@ -90885,36 +94070,36 @@ var cursor = agent({ if (signal) { log.warning(`Cursor CLI terminated by signal: ${signal}`); } - const duration4 = ((Date.now() - startTime) / 1e3).toFixed(1); + const duration2 = ((Date.now() - startTime) / 1e3).toFixed(1); if (code === 0) { - log.success(`Cursor CLI completed successfully in ${duration4}s`); - resolve({ + log.success(`Cursor CLI completed successfully in ${duration2}s`); + resolve2({ success: true, output: stdout.trim() }); } else { const errorMessage = stderr || `Cursor CLI exited with code ${code}`; - log.error(`Cursor CLI failed after ${duration4}s: ${errorMessage}`); - resolve({ + log.error(`Cursor CLI failed after ${duration2}s: ${errorMessage}`); + resolve2({ success: false, error: errorMessage, output: stdout.trim() }); } }); - child.on("error", (error42) => { - const duration4 = ((Date.now() - startTime) / 1e3).toFixed(1); - const errorMessage = error42.message || String(error42); - log.error(`Cursor CLI execution failed after ${duration4}s: ${errorMessage}`); - resolve({ + child.on("error", (error41) => { + const duration2 = ((Date.now() - startTime) / 1e3).toFixed(1); + const errorMessage = error41.message || String(error41); + log.error(`Cursor CLI execution failed after ${duration2}s: ${errorMessage}`); + resolve2({ success: false, error: errorMessage, output: stdout.trim() }); }); }); - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); log.error(`Cursor execution failed: ${errorMessage}`); return { success: false, @@ -90949,7 +94134,7 @@ function configureCursorSandbox({ sandbox }) { const cursorConfigDir = join6(realHome, ".cursor"); const cliConfigPath = join6(cursorConfigDir, "cli-config.json"); mkdirSync3(cursorConfigDir, { recursive: true }); - const config3 = sandbox ? { + const config2 = sandbox ? { // sandbox mode: deny all writes and shell commands permissions: { allow: [ @@ -90970,7 +94155,7 @@ function configureCursorSandbox({ sandbox }) { deny: [] } }; - writeFileSync2(cliConfigPath, JSON.stringify(config3, null, 2), "utf-8"); + writeFileSync2(cliConfigPath, JSON.stringify(config2, null, 2), "utf-8"); log.info(`CLI config written to ${cliConfigPath} (sandbox: ${sandbox})`); } @@ -90984,7 +94169,7 @@ async function spawn4(options) { const startTime = Date.now(); let stdoutBuffer = ""; let stderrBuffer = ""; - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { const child = nodeSpawn(cmd, args3, { env: env3 || { PATH: process.env.PATH || "", @@ -91029,20 +94214,20 @@ async function spawn4(options) { reject(new Error(`Process timed out after ${timeout}ms`)); return; } - resolve({ + resolve2({ stdout: stdoutBuffer, stderr: stderrBuffer, exitCode: exitCode || 0, durationMs }); }); - child.on("error", (error42) => { + child.on("error", (error41) => { const durationMs = Date.now() - startTime; if (timeoutId) { clearTimeout(timeoutId); } - console.error(`[spawn] Process spawn error: ${error42.message}`); - resolve({ + console.error(`[spawn] Process spawn error: ${error41.message}`); + resolve2({ stdout: stdoutBuffer, stderr: stderrBuffer, exitCode: 1, @@ -91206,8 +94391,8 @@ var gemini = agent({ success: true, output: finalOutput2 }; - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); log.error(`Failed to run Gemini CLI: ${errorMessage}`); return { success: false, @@ -91361,10 +94546,10 @@ var messageHandlers4 = { }, result: async (event) => { const status = event.status || "unknown"; - const duration4 = event.stats?.duration_ms || 0; + const duration2 = event.stats?.duration_ms || 0; const toolCalls = event.stats?.tool_calls || 0; log.info( - `\u{1F3C1} OpenCode result: status=${status}, duration=${duration4}ms, tool_calls=${toolCalls}` + `\u{1F3C1} OpenCode result: status=${status}, duration=${duration2}ms, tool_calls=${toolCalls}` ); if (event.status === "error") { log.error(`\u274C OpenCode CLI failed: ${JSON.stringify(event)}`); @@ -91373,7 +94558,7 @@ var messageHandlers4 = { const outputTokens = event.stats?.output_tokens || accumulatedTokens.output || 0; const totalTokens = event.stats?.total_tokens || inputTokens + outputTokens; log.info( - `\u{1F4CA} OpenCode final stats: input=${inputTokens}, output=${outputTokens}, total=${totalTokens}, tool_calls=${toolCalls}, duration=${duration4}ms` + `\u{1F4CA} OpenCode final stats: input=${inputTokens}, output=${outputTokens}, total=${totalTokens}, tool_calls=${toolCalls}, duration=${duration2}ms` ); if ((inputTokens > 0 || outputTokens > 0) && !tokensLogged) { await log.summaryTable([ @@ -91486,8 +94671,8 @@ var opencode = agent({ } } }); - const duration4 = Date.now() - startTime; - log.info(`\u2705 OpenCode CLI completed in ${duration4}ms with exit code ${result.exitCode}`); + const duration2 = Date.now() - startTime; + log.info(`\u2705 OpenCode CLI completed in ${duration2}ms with exit code ${result.exitCode}`); if (!tokensLogged && (accumulatedTokens.input > 0 || accumulatedTokens.output > 0)) { const totalTokens = accumulatedTokens.input + accumulatedTokens.output; await log.summaryTable([ @@ -91536,16 +94721,16 @@ function configureOpenCodeMcpServers({ enabled: true }; } - let config3 = {}; + let config2 = {}; try { if (existsSync3(configPath)) { const existingConfig = readFileSync2(configPath, "utf-8"); - config3 = JSON.parse(existingConfig); + config2 = JSON.parse(existingConfig); } } catch { } - config3.mcp = opencodeMcpServers; - const configJson = JSON.stringify(config3, null, 2); + config2.mcp = opencodeMcpServers; + const configJson = JSON.stringify(config2, null, 2); writeFileSync3(configPath, configJson, "utf-8"); log.info(`MCP config written to ${configPath}`); log.info(`MCP config contents: @@ -91556,16 +94741,16 @@ function configureOpenCodeSandbox({ sandbox }) { const configDir = join7(tempHome, ".config", "opencode"); mkdirSync4(configDir, { recursive: true }); const configPath = join7(configDir, "opencode.json"); - let config3 = {}; + let config2 = {}; try { if (existsSync3(configPath)) { const existingConfig = readFileSync2(configPath, "utf-8"); - config3 = JSON.parse(existingConfig); + config2 = JSON.parse(existingConfig); } } catch { } if (sandbox) { - config3.permission = { + config2.permission = { edit: "deny", bash: "deny", webfetch: "deny", @@ -91573,7 +94758,7 @@ function configureOpenCodeSandbox({ sandbox }) { external_directory: "allow" }; } else { - config3.permission = { + config2.permission = { edit: "allow", bash: "allow", webfetch: "allow", @@ -91581,7 +94766,7 @@ function configureOpenCodeSandbox({ sandbox }) { external_directory: "allow" }; } - writeFileSync3(configPath, JSON.stringify(config3, null, 2), "utf-8"); + writeFileSync3(configPath, JSON.stringify(config2, null, 2), "utf-8"); log.info(`OpenCode config written to ${configPath} (sandbox: ${sandbox})`); } @@ -91657,8 +94842,8 @@ function addHook(state, kind, name, hook2) { } if (kind === "error") { hook2 = (method, options) => { - return Promise.resolve().then(method.bind(null, options)).catch((error42) => { - return orig(error42, options); + return Promise.resolve().then(method.bind(null, options)).catch((error41) => { + return orig(error41, options); }); }; } @@ -92114,26 +95299,26 @@ async function fetchWrapper(requestOptions) { // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }); - } catch (error42) { + } catch (error41) { let message = "Unknown Error"; - if (error42 instanceof Error) { - if (error42.name === "AbortError") { - error42.status = 500; - throw error42; + if (error41 instanceof Error) { + if (error41.name === "AbortError") { + error41.status = 500; + throw error41; } - message = error42.message; - if (error42.name === "TypeError" && "cause" in error42) { - if (error42.cause instanceof Error) { - message = error42.cause.message; - } else if (typeof error42.cause === "string") { - message = error42.cause; + message = error41.message; + if (error41.name === "TypeError" && "cause" in error41) { + if (error41.cause instanceof Error) { + message = error41.cause.message; + } else if (typeof error41.cause === "string") { + message = error41.cause; } } } const requestError = new RequestError(message, 500, { request: requestOptions }); - requestError.cause = error42; + requestError.cause = error41; throw requestError; } const status = fetchResponse.status; @@ -92550,12 +95735,12 @@ function requestLog(octokit) { `${requestOptions.method} ${path4} - ${response.status} with id ${requestId} in ${Date.now() - start}ms` ); return response; - }).catch((error42) => { - const requestId = error42.response?.headers["x-github-request-id"] || "UNKNOWN"; + }).catch((error41) => { + const requestId = error41.response?.headers["x-github-request-id"] || "UNKNOWN"; octokit.log.error( - `${requestOptions.method} ${path4} - ${error42.status} with id ${requestId} in ${Date.now() - start}ms` + `${requestOptions.method} ${path4} - ${error41.status} with id ${requestId} in ${Date.now() - start}ms` ); - throw error42; + throw error41; }); }); } @@ -92620,8 +95805,8 @@ function iterator(octokit, route, parameters) { } } return { value: normalizedResponse }; - } catch (error42) { - if (error42.status !== 409) throw error42; + } catch (error41) { + if (error41.status !== 409) throw error41; url2 = ""; return { value: { @@ -95141,8 +98326,8 @@ var handleToolSuccess = (data) => { ] }; }; -var handleToolError = (error42) => { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); +var handleToolError = (error41) => { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); return { content: [ { @@ -95158,8 +98343,8 @@ var execute = (ctx, fn2) => { try { const result = await fn2(params); return handleToolSuccess(result); - } catch (error42) { - return handleToolError(error42); + } catch (error41) { + return handleToolError(error41); } }; }; @@ -95548,4048 +98733,8 @@ configure({ // mcp/server.ts import { createServer } from "node:net"; -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js -var external_exports = {}; -__export(external_exports, { - BRAND: () => BRAND2, - DIRTY: () => DIRTY2, - EMPTY_PATH: () => EMPTY_PATH2, - INVALID: () => INVALID2, - NEVER: () => NEVER2, - OK: () => OK2, - ParseStatus: () => ParseStatus2, - Schema: () => ZodType2, - ZodAny: () => ZodAny2, - ZodArray: () => ZodArray2, - ZodBigInt: () => ZodBigInt2, - ZodBoolean: () => ZodBoolean2, - ZodBranded: () => ZodBranded2, - ZodCatch: () => ZodCatch2, - ZodDate: () => ZodDate2, - ZodDefault: () => ZodDefault2, - ZodDiscriminatedUnion: () => ZodDiscriminatedUnion2, - ZodEffects: () => ZodEffects2, - ZodEnum: () => ZodEnum2, - ZodError: () => ZodError2, - ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind2, - ZodFunction: () => ZodFunction2, - ZodIntersection: () => ZodIntersection2, - ZodIssueCode: () => ZodIssueCode2, - ZodLazy: () => ZodLazy2, - ZodLiteral: () => ZodLiteral2, - ZodMap: () => ZodMap2, - ZodNaN: () => ZodNaN2, - ZodNativeEnum: () => ZodNativeEnum2, - ZodNever: () => ZodNever2, - ZodNull: () => ZodNull2, - ZodNullable: () => ZodNullable2, - ZodNumber: () => ZodNumber2, - ZodObject: () => ZodObject2, - ZodOptional: () => ZodOptional2, - ZodParsedType: () => ZodParsedType2, - ZodPipeline: () => ZodPipeline2, - ZodPromise: () => ZodPromise2, - ZodReadonly: () => ZodReadonly2, - ZodRecord: () => ZodRecord2, - ZodSchema: () => ZodType2, - ZodSet: () => ZodSet2, - ZodString: () => ZodString2, - ZodSymbol: () => ZodSymbol2, - ZodTransformer: () => ZodEffects2, - ZodTuple: () => ZodTuple2, - ZodType: () => ZodType2, - ZodUndefined: () => ZodUndefined2, - ZodUnion: () => ZodUnion2, - ZodUnknown: () => ZodUnknown2, - ZodVoid: () => ZodVoid2, - addIssueToContext: () => addIssueToContext2, - any: () => anyType2, - array: () => arrayType2, - bigint: () => bigIntType2, - boolean: () => booleanType2, - coerce: () => coerce2, - custom: () => custom2, - date: () => dateType2, - datetimeRegex: () => datetimeRegex2, - defaultErrorMap: () => en_default2, - discriminatedUnion: () => discriminatedUnionType2, - effect: () => effectsType2, - enum: () => enumType2, - function: () => functionType2, - getErrorMap: () => getErrorMap2, - getParsedType: () => getParsedType2, - instanceof: () => instanceOfType2, - intersection: () => intersectionType2, - isAborted: () => isAborted2, - isAsync: () => isAsync2, - isDirty: () => isDirty2, - isValid: () => isValid2, - late: () => late2, - lazy: () => lazyType2, - literal: () => literalType2, - makeIssue: () => makeIssue2, - map: () => mapType2, - nan: () => nanType2, - nativeEnum: () => nativeEnumType2, - never: () => neverType2, - null: () => nullType2, - nullable: () => nullableType2, - number: () => numberType2, - object: () => objectType2, - objectUtil: () => objectUtil2, - oboolean: () => oboolean2, - onumber: () => onumber2, - optional: () => optionalType2, - ostring: () => ostring2, - pipeline: () => pipelineType2, - preprocess: () => preprocessType2, - promise: () => promiseType2, - quotelessJson: () => quotelessJson2, - record: () => recordType2, - set: () => setType2, - setErrorMap: () => setErrorMap2, - strictObject: () => strictObjectType2, - string: () => stringType2, - symbol: () => symbolType2, - transformer: () => effectsType2, - tuple: () => tupleType2, - undefined: () => undefinedType2, - union: () => unionType2, - unknown: () => unknownType2, - util: () => util2, - void: () => voidType2 -}); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js -var util2; -(function(util3) { - util3.assertEqual = (_) => { - }; - function assertIs2(_arg) { - } - util3.assertIs = assertIs2; - function assertNever2(_x) { - throw new Error(); - } - util3.assertNever = assertNever2; - util3.arrayToEnum = (items) => { - const obj = {}; - for (const item of items) { - obj[item] = item; - } - return obj; - }; - util3.getValidEnumValues = (obj) => { - const validKeys = util3.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number"); - const filtered = {}; - for (const k of validKeys) { - filtered[k] = obj[k]; - } - return util3.objectValues(filtered); - }; - util3.objectValues = (obj) => { - return util3.objectKeys(obj).map(function(e) { - return obj[e]; - }); - }; - util3.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object2) => { - const keys = []; - for (const key in object2) { - if (Object.prototype.hasOwnProperty.call(object2, key)) { - keys.push(key); - } - } - return keys; - }; - util3.find = (arr, checker) => { - for (const item of arr) { - if (checker(item)) - return item; - } - return void 0; - }; - util3.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues3(array, separator2 = " | ") { - return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); - } - util3.joinValues = joinValues3; - util3.jsonStringifyReplacer = (_, value2) => { - if (typeof value2 === "bigint") { - return value2.toString(); - } - return value2; - }; -})(util2 || (util2 = {})); -var objectUtil2; -(function(objectUtil4) { - objectUtil4.mergeShapes = (first, second) => { - return { - ...first, - ...second - // second overwrites first - }; - }; -})(objectUtil2 || (objectUtil2 = {})); -var ZodParsedType2 = util2.arrayToEnum([ - "string", - "nan", - "number", - "integer", - "float", - "boolean", - "date", - "bigint", - "symbol", - "function", - "undefined", - "null", - "array", - "object", - "unknown", - "promise", - "void", - "never", - "map", - "set" -]); -var getParsedType2 = (data) => { - const t = typeof data; - switch (t) { - case "undefined": - return ZodParsedType2.undefined; - case "string": - return ZodParsedType2.string; - case "number": - return Number.isNaN(data) ? ZodParsedType2.nan : ZodParsedType2.number; - case "boolean": - return ZodParsedType2.boolean; - case "function": - return ZodParsedType2.function; - case "bigint": - return ZodParsedType2.bigint; - case "symbol": - return ZodParsedType2.symbol; - case "object": - if (Array.isArray(data)) { - return ZodParsedType2.array; - } - if (data === null) { - return ZodParsedType2.null; - } - if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") { - return ZodParsedType2.promise; - } - if (typeof Map !== "undefined" && data instanceof Map) { - return ZodParsedType2.map; - } - if (typeof Set !== "undefined" && data instanceof Set) { - return ZodParsedType2.set; - } - if (typeof Date !== "undefined" && data instanceof Date) { - return ZodParsedType2.date; - } - return ZodParsedType2.object; - default: - return ZodParsedType2.unknown; - } -}; - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js -var ZodIssueCode2 = util2.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 quotelessJson2 = (obj) => { - const json3 = JSON.stringify(obj, null, 2); - return json3.replace(/"([^"]+)":/g, "$1:"); -}; -var ZodError2 = 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(issue3) { - return issue3.message; - }; - const fieldErrors = { _errors: [] }; - const processError = (error42) => { - for (const issue3 of error42.issues) { - if (issue3.code === "invalid_union") { - issue3.unionErrors.map(processError); - } else if (issue3.code === "invalid_return_type") { - processError(issue3.returnTypeError); - } else if (issue3.code === "invalid_arguments") { - processError(issue3.argumentsError); - } else if (issue3.path.length === 0) { - fieldErrors._errors.push(mapper(issue3)); - } else { - let curr = fieldErrors; - let i = 0; - while (i < issue3.path.length) { - const el = issue3.path[i]; - const terminal = i === issue3.path.length - 1; - if (!terminal) { - curr[el] = curr[el] || { _errors: [] }; - } else { - curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue3)); - } - curr = curr[el]; - i++; - } - } - } - }; - processError(this); - return fieldErrors; - } - static assert(value2) { - if (!(value2 instanceof _ZodError)) { - throw new Error(`Not a ZodError: ${value2}`); - } - } - toString() { - return this.message; - } - get message() { - return JSON.stringify(this.issues, util2.jsonStringifyReplacer, 2); - } - get isEmpty() { - return this.issues.length === 0; - } - flatten(mapper = (issue3) => issue3.message) { - const fieldErrors = {}; - const formErrors = []; - for (const sub of this.issues) { - if (sub.path.length > 0) { - const firstEl = sub.path[0]; - fieldErrors[firstEl] = fieldErrors[firstEl] || []; - fieldErrors[firstEl].push(mapper(sub)); - } else { - formErrors.push(mapper(sub)); - } - } - return { formErrors, fieldErrors }; - } - get formErrors() { - return this.flatten(); - } -}; -ZodError2.create = (issues) => { - const error42 = new ZodError2(issues); - return error42; -}; - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js -var errorMap2 = (issue3, _ctx) => { - let message; - switch (issue3.code) { - case ZodIssueCode2.invalid_type: - if (issue3.received === ZodParsedType2.undefined) { - message = "Required"; - } else { - message = `Expected ${issue3.expected}, received ${issue3.received}`; - } - break; - case ZodIssueCode2.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util2.jsonStringifyReplacer)}`; - break; - case ZodIssueCode2.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util2.joinValues(issue3.keys, ", ")}`; - break; - case ZodIssueCode2.invalid_union: - message = `Invalid input`; - break; - case ZodIssueCode2.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util2.joinValues(issue3.options)}`; - break; - case ZodIssueCode2.invalid_enum_value: - message = `Invalid enum value. Expected ${util2.joinValues(issue3.options)}, received '${issue3.received}'`; - break; - case ZodIssueCode2.invalid_arguments: - message = `Invalid function arguments`; - break; - case ZodIssueCode2.invalid_return_type: - message = `Invalid function return type`; - break; - case ZodIssueCode2.invalid_date: - message = `Invalid date`; - break; - case ZodIssueCode2.invalid_string: - if (typeof issue3.validation === "object") { - if ("includes" in issue3.validation) { - message = `Invalid input: must include "${issue3.validation.includes}"`; - if (typeof issue3.validation.position === "number") { - message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; - } - } else if ("startsWith" in issue3.validation) { - message = `Invalid input: must start with "${issue3.validation.startsWith}"`; - } else if ("endsWith" in issue3.validation) { - message = `Invalid input: must end with "${issue3.validation.endsWith}"`; - } else { - util2.assertNever(issue3.validation); - } - } else if (issue3.validation !== "regex") { - message = `Invalid ${issue3.validation}`; - } else { - message = "Invalid"; - } - break; - case ZodIssueCode2.too_small: - if (issue3.type === "array") - message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; - else if (issue3.type === "string") - message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; - else if (issue3.type === "number") - message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; - else if (issue3.type === "bigint") - message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; - else if (issue3.type === "date") - message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode2.too_big: - if (issue3.type === "array") - message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; - else if (issue3.type === "string") - message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; - else if (issue3.type === "number") - message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; - else if (issue3.type === "bigint") - message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; - else if (issue3.type === "date") - message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; - else - message = "Invalid input"; - break; - case ZodIssueCode2.custom: - message = `Invalid input`; - break; - case ZodIssueCode2.invalid_intersection_types: - message = `Intersection results could not be merged`; - break; - case ZodIssueCode2.not_multiple_of: - message = `Number must be a multiple of ${issue3.multipleOf}`; - break; - case ZodIssueCode2.not_finite: - message = "Number must be finite"; - break; - default: - message = _ctx.defaultError; - util2.assertNever(issue3); - } - return { message }; -}; -var en_default2 = errorMap2; - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js -var overrideErrorMap2 = en_default2; -function setErrorMap2(map) { - overrideErrorMap2 = map; -} -function getErrorMap2() { - return overrideErrorMap2; -} - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js -var makeIssue2 = (params) => { - const { data, path: path4, errorMaps, issueData } = params; - const fullPath = [...path4, ...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 map of maps) { - errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message; - } - return { - ...issueData, - path: fullPath, - message: errorMessage - }; -}; -var EMPTY_PATH2 = []; -function addIssueToContext2(ctx, issueData) { - const overrideMap = getErrorMap2(); - const issue3 = makeIssue2({ - 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 === en_default2 ? void 0 : en_default2 - // then global default map - ].filter((x) => !!x) - }); - ctx.common.issues.push(issue3); -} -var ParseStatus2 = 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 INVALID2; - 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 value2 = await pair.value; - syncPairs.push({ - key, - value: value2 - }); - } - return _ParseStatus.mergeObjectSync(status, syncPairs); - } - static mergeObjectSync(status, pairs) { - const finalObject = {}; - for (const pair of pairs) { - const { key, value: value2 } = pair; - if (key.status === "aborted") - return INVALID2; - if (value2.status === "aborted") - return INVALID2; - if (key.status === "dirty") - status.dirty(); - if (value2.status === "dirty") - status.dirty(); - if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) { - finalObject[key.value] = value2.value; - } - } - return { status: status.value, value: finalObject }; - } -}; -var INVALID2 = Object.freeze({ - status: "aborted" -}); -var DIRTY2 = (value2) => ({ status: "dirty", value: value2 }); -var OK2 = (value2) => ({ status: "valid", value: value2 }); -var isAborted2 = (x) => x.status === "aborted"; -var isDirty2 = (x) => x.status === "dirty"; -var isValid2 = (x) => x.status === "valid"; -var isAsync2 = (x) => typeof Promise !== "undefined" && x instanceof Promise; - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js -var errorUtil2; -(function(errorUtil4) { - errorUtil4.errToObj = (message) => typeof message === "string" ? { message } : message || {}; - errorUtil4.toString = (message) => typeof message === "string" ? message : message?.message; -})(errorUtil2 || (errorUtil2 = {})); - -// ../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js -var ParseInputLazyPath2 = class { - constructor(parent, value2, path4, key) { - this._cachedPath = []; - this.parent = parent; - this.data = value2; - this._path = path4; - this._key = key; - } - get path() { - if (!this._cachedPath.length) { - if (Array.isArray(this._key)) { - this._cachedPath.push(...this._path, ...this._key); - } else { - this._cachedPath.push(...this._path, this._key); - } - } - return this._cachedPath; - } -}; -var handleResult2 = (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 error42 = new ZodError2(ctx.common.issues); - this._error = error42; - return this._error; - } - }; - } -}; -function processCreateParams3(params) { - if (!params) - return {}; - const { errorMap: errorMap4, invalid_type_error, required_error, description } = params; - if (errorMap4 && (invalid_type_error || required_error)) { - throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); - } - if (errorMap4) - return { errorMap: errorMap4, description }; - const customMap = (iss, ctx) => { - const { message } = params; - if (iss.code === "invalid_enum_value") { - return { message: message ?? ctx.defaultError }; - } - if (typeof ctx.data === "undefined") { - return { message: message ?? required_error ?? ctx.defaultError }; - } - if (iss.code !== "invalid_type") - return { message: ctx.defaultError }; - return { message: message ?? invalid_type_error ?? ctx.defaultError }; - }; - return { errorMap: customMap, description }; -} -var ZodType2 = class { - get description() { - return this._def.description; - } - _getType(input) { - return getParsedType2(input.data); - } - _getOrReturnCtx(input, ctx) { - return ctx || { - common: input.parent.common, - data: input.data, - parsedType: getParsedType2(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - }; - } - _processInputParams(input) { - return { - status: new ParseStatus2(), - ctx: { - common: input.parent.common, - data: input.data, - parsedType: getParsedType2(input.data), - schemaErrorMap: this._def.errorMap, - path: input.path, - parent: input.parent - } - }; - } - _parseSync(input) { - const result = this._parse(input); - if (isAsync2(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) { - const ctx = { - common: { - issues: [], - async: params?.async ?? false, - contextualErrorMap: params?.errorMap - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType2(data) - }; - const result = this._parseSync({ data, path: ctx.path, parent: ctx }); - return handleResult2(ctx, result); - } - "~validate"(data) { - const ctx = { - common: { - issues: [], - async: !!this["~standard"].async - }, - path: [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType2(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 (err?.message?.toLowerCase()?.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?.errorMap, - async: true - }, - path: params?.path || [], - schemaErrorMap: this._def.errorMap, - parent: null, - data, - parsedType: getParsedType2(data) - }; - const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx }); - const result = await (isAsync2(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult)); - return handleResult2(ctx, result); - } - refine(check, message) { - const getIssueProperties = (val) => { - if (typeof message === "string" || typeof message === "undefined") { - return { message }; - } else if (typeof message === "function") { - return message(val); - } else { - return message; - } - }; - return this._refinement((val, ctx) => { - const result = check(val); - const setError = () => ctx.addIssue({ - code: ZodIssueCode2.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(check, refinementData) { - return this._refinement((val, ctx) => { - if (!check(val)) { - ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData); - return false; - } else { - return true; - } - }); - } - _refinement(refinement) { - return new ZodEffects2({ - schema: this, - typeName: ZodFirstPartyTypeKind2.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 ZodOptional2.create(this, this._def); - } - nullable() { - return ZodNullable2.create(this, this._def); - } - nullish() { - return this.nullable().optional(); - } - array() { - return ZodArray2.create(this); - } - promise() { - return ZodPromise2.create(this, this._def); - } - or(option) { - return ZodUnion2.create([this, option], this._def); - } - and(incoming) { - return ZodIntersection2.create(this, incoming, this._def); - } - transform(transform) { - return new ZodEffects2({ - ...processCreateParams3(this._def), - schema: this, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - effect: { type: "transform", transform } - }); - } - default(def) { - const defaultValueFunc = typeof def === "function" ? def : () => def; - return new ZodDefault2({ - ...processCreateParams3(this._def), - innerType: this, - defaultValue: defaultValueFunc, - typeName: ZodFirstPartyTypeKind2.ZodDefault - }); - } - brand() { - return new ZodBranded2({ - typeName: ZodFirstPartyTypeKind2.ZodBranded, - type: this, - ...processCreateParams3(this._def) - }); - } - catch(def) { - const catchValueFunc = typeof def === "function" ? def : () => def; - return new ZodCatch2({ - ...processCreateParams3(this._def), - innerType: this, - catchValue: catchValueFunc, - typeName: ZodFirstPartyTypeKind2.ZodCatch - }); - } - describe(description) { - const This = this.constructor; - return new This({ - ...this._def, - description - }); - } - pipe(target) { - return ZodPipeline2.create(this, target); - } - readonly() { - return ZodReadonly2.create(this); - } - isOptional() { - return this.safeParse(void 0).success; - } - isNullable() { - return this.safeParse(null).success; - } -}; -var cuidRegex2 = /^c[^\s-]{8,}$/i; -var cuid2Regex2 = /^[0-9a-z]+$/; -var ulidRegex2 = /^[0-9A-HJKMNP-TV-Z]{26}$/i; -var uuidRegex2 = /^[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 nanoidRegex2 = /^[a-z0-9_-]{21}$/i; -var jwtRegex2 = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/; -var durationRegex2 = /^[-+]?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 emailRegex2 = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i; -var _emojiRegex2 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`; -var emojiRegex2; -var ipv4Regex2 = /^(?:(?: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 ipv4CidrRegex2 = /^(?:(?: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 ipv6Regex2 = /^(([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 ipv6CidrRegex2 = /^(([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 base64Regex2 = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/; -var base64urlRegex2 = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/; -var dateRegexSource2 = `((\\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 dateRegex2 = new RegExp(`^${dateRegexSource2}$`); -function timeRegexSource2(args3) { - let secondsRegexSource = `[0-5]\\d`; - if (args3.precision) { - secondsRegexSource = `${secondsRegexSource}\\.\\d{${args3.precision}}`; - } else if (args3.precision == null) { - secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`; - } - const secondsQuantifier = args3.precision ? "+" : "?"; - return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`; -} -function timeRegex2(args3) { - return new RegExp(`^${timeRegexSource2(args3)}$`); -} -function datetimeRegex2(args3) { - let regex3 = `${dateRegexSource2}T${timeRegexSource2(args3)}`; - const opts = []; - opts.push(args3.local ? `Z?` : `Z`); - if (args3.offset) - opts.push(`([+-]\\d{2}:?\\d{2})`); - regex3 = `${regex3}(${opts.join("|")})`; - return new RegExp(`^${regex3}$`); -} -function isValidIP2(ip2, version3) { - if ((version3 === "v4" || !version3) && ipv4Regex2.test(ip2)) { - return true; - } - if ((version3 === "v6" || !version3) && ipv6Regex2.test(ip2)) { - return true; - } - return false; -} -function isValidJWT2(jwt, alg) { - if (!jwtRegex2.test(jwt)) - return false; - try { - const [header] = jwt.split("."); - if (!header) - return false; - const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base644)); - if (typeof decoded !== "object" || decoded === null) - return false; - if ("typ" in decoded && decoded?.typ !== "JWT") - return false; - if (!decoded.alg) - return false; - if (alg && decoded.alg !== alg) - return false; - return true; - } catch { - return false; - } -} -function isValidCidr2(ip2, version3) { - if ((version3 === "v4" || !version3) && ipv4CidrRegex2.test(ip2)) { - return true; - } - if ((version3 === "v6" || !version3) && ipv6CidrRegex2.test(ip2)) { - return true; - } - return false; -} -var ZodString2 = class _ZodString extends ZodType2 { - _parse(input) { - if (this._def.coerce) { - input.data = String(input.data); - } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.string) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.string, - received: ctx2.parsedType - }); - return INVALID2; - } - const status = new ParseStatus2(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.length < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.length > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "length") { - const tooBig = input.data.length > check.value; - const tooSmall = input.data.length < check.value; - if (tooBig || tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - if (tooBig) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } else if (tooSmall) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: check.value, - type: "string", - inclusive: true, - exact: true, - message: check.message - }); - } - status.dirty(); - } - } else if (check.kind === "email") { - if (!emailRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "email", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "emoji") { - if (!emojiRegex2) { - emojiRegex2 = new RegExp(_emojiRegex2, "u"); - } - if (!emojiRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "emoji", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "uuid") { - if (!uuidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "uuid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "nanoid") { - if (!nanoidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "nanoid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid") { - if (!cuidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "cuid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cuid2") { - if (!cuid2Regex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "cuid2", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ulid") { - if (!ulidRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "ulid", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "url") { - try { - new URL(input.data); - } catch { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "url", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "regex") { - check.regex.lastIndex = 0; - const testResult = check.regex.test(input.data); - if (!testResult) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "regex", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "trim") { - input.data = input.data.trim(); - } else if (check.kind === "includes") { - if (!input.data.includes(check.value, check.position)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: { includes: check.value, position: check.position }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "toLowerCase") { - input.data = input.data.toLowerCase(); - } else if (check.kind === "toUpperCase") { - input.data = input.data.toUpperCase(); - } else if (check.kind === "startsWith") { - if (!input.data.startsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: { startsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "endsWith") { - if (!input.data.endsWith(check.value)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: { endsWith: check.value }, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "datetime") { - const regex3 = datetimeRegex2(check); - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: "datetime", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "date") { - const regex3 = dateRegex2; - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: "date", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "time") { - const regex3 = timeRegex2(check); - if (!regex3.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_string, - validation: "time", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "duration") { - if (!durationRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "duration", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "ip") { - if (!isValidIP2(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "ip", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "jwt") { - if (!isValidJWT2(input.data, check.alg)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "jwt", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "cidr") { - if (!isValidCidr2(input.data, check.version)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "cidr", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64") { - if (!base64Regex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "base64", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "base64url") { - if (!base64urlRegex2.test(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - validation: "base64url", - code: ZodIssueCode2.invalid_string, - message: check.message - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _regex(regex3, validation, message) { - return this.refinement((data) => regex3.test(data), { - validation, - code: ZodIssueCode2.invalid_string, - ...errorUtil2.errToObj(message) - }); - } - _addCheck(check) { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - email(message) { - return this._addCheck({ kind: "email", ...errorUtil2.errToObj(message) }); - } - url(message) { - return this._addCheck({ kind: "url", ...errorUtil2.errToObj(message) }); - } - emoji(message) { - return this._addCheck({ kind: "emoji", ...errorUtil2.errToObj(message) }); - } - uuid(message) { - return this._addCheck({ kind: "uuid", ...errorUtil2.errToObj(message) }); - } - nanoid(message) { - return this._addCheck({ kind: "nanoid", ...errorUtil2.errToObj(message) }); - } - cuid(message) { - return this._addCheck({ kind: "cuid", ...errorUtil2.errToObj(message) }); - } - cuid2(message) { - return this._addCheck({ kind: "cuid2", ...errorUtil2.errToObj(message) }); - } - ulid(message) { - return this._addCheck({ kind: "ulid", ...errorUtil2.errToObj(message) }); - } - base64(message) { - return this._addCheck({ kind: "base64", ...errorUtil2.errToObj(message) }); - } - base64url(message) { - return this._addCheck({ - kind: "base64url", - ...errorUtil2.errToObj(message) - }); - } - jwt(options) { - return this._addCheck({ kind: "jwt", ...errorUtil2.errToObj(options) }); - } - ip(options) { - return this._addCheck({ kind: "ip", ...errorUtil2.errToObj(options) }); - } - cidr(options) { - return this._addCheck({ kind: "cidr", ...errorUtil2.errToObj(options) }); - } - datetime(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "datetime", - precision: null, - offset: false, - local: false, - message: options - }); - } - return this._addCheck({ - kind: "datetime", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - offset: options?.offset ?? false, - local: options?.local ?? false, - ...errorUtil2.errToObj(options?.message) - }); - } - date(message) { - return this._addCheck({ kind: "date", message }); - } - time(options) { - if (typeof options === "string") { - return this._addCheck({ - kind: "time", - precision: null, - message: options - }); - } - return this._addCheck({ - kind: "time", - precision: typeof options?.precision === "undefined" ? null : options?.precision, - ...errorUtil2.errToObj(options?.message) - }); - } - duration(message) { - return this._addCheck({ kind: "duration", ...errorUtil2.errToObj(message) }); - } - regex(regex3, message) { - return this._addCheck({ - kind: "regex", - regex: regex3, - ...errorUtil2.errToObj(message) - }); - } - includes(value2, options) { - return this._addCheck({ - kind: "includes", - value: value2, - position: options?.position, - ...errorUtil2.errToObj(options?.message) - }); - } - startsWith(value2, message) { - return this._addCheck({ - kind: "startsWith", - value: value2, - ...errorUtil2.errToObj(message) - }); - } - endsWith(value2, message) { - return this._addCheck({ - kind: "endsWith", - value: value2, - ...errorUtil2.errToObj(message) - }); - } - min(minLength, message) { - return this._addCheck({ - kind: "min", - value: minLength, - ...errorUtil2.errToObj(message) - }); - } - max(maxLength, message) { - return this._addCheck({ - kind: "max", - value: maxLength, - ...errorUtil2.errToObj(message) - }); - } - length(len, message) { - return this._addCheck({ - kind: "length", - value: len, - ...errorUtil2.errToObj(message) - }); - } - /** - * Equivalent to `.min(1)` - */ - nonempty(message) { - return this.min(1, errorUtil2.errToObj(message)); - } - trim() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "trim" }] - }); - } - toLowerCase() { - return new _ZodString({ - ...this._def, - checks: [...this._def.checks, { kind: "toLowerCase" }] - }); - } - toUpperCase() { - return new _ZodString({ - ...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; - } -}; -ZodString2.create = (params) => { - return new ZodString2({ - checks: [], - typeName: ZodFirstPartyTypeKind2.ZodString, - coerce: params?.coerce ?? false, - ...processCreateParams3(params) - }); -}; -function floatSafeRemainder2(val, step) { - const valDecCount = (val.toString().split(".")[1] || "").length; - const stepDecCount = (step.toString().split(".")[1] || "").length; - 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 ZodNumber2 = class _ZodNumber extends ZodType2 { - 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 parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.number) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.number, - received: ctx2.parsedType - }); - return INVALID2; - } - let ctx = void 0; - const status = new ParseStatus2(); - for (const check of this._def.checks) { - if (check.kind === "int") { - if (!util2.isInteger(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: "integer", - received: "float", - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: check.value, - type: "number", - inclusive: check.inclusive, - exact: false, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (floatSafeRemainder2(input.data, check.value) !== 0) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "finite") { - if (!Number.isFinite(input.data)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.not_finite, - message: check.message - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil2.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil2.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil2.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil2.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new _ZodNumber({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value: value2, - inclusive, - message: errorUtil2.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodNumber({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - int(message) { - return this._addCheck({ - kind: "int", - message: errorUtil2.toString(message) - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: false, - message: errorUtil2.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: false, - message: errorUtil2.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: 0, - inclusive: true, - message: errorUtil2.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: 0, - inclusive: true, - message: errorUtil2.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil2.toString(message) - }); - } - finite(message) { - return this._addCheck({ - kind: "finite", - message: errorUtil2.toString(message) - }); - } - safe(message) { - return this._addCheck({ - kind: "min", - inclusive: true, - value: Number.MIN_SAFE_INTEGER, - message: errorUtil2.toString(message) - })._addCheck({ - kind: "max", - inclusive: true, - value: Number.MAX_SAFE_INTEGER, - message: errorUtil2.toString(message) - }); - } - 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" && util2.isInteger(ch.value)); - } - get isFinite() { - let max = null; - let 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); - } -}; -ZodNumber2.create = (params) => { - return new ZodNumber2({ - checks: [], - typeName: ZodFirstPartyTypeKind2.ZodNumber, - coerce: params?.coerce || false, - ...processCreateParams3(params) - }); -}; -var ZodBigInt2 = class _ZodBigInt extends ZodType2 { - constructor() { - super(...arguments); - this.min = this.gte; - this.max = this.lte; - } - _parse(input) { - if (this._def.coerce) { - try { - input.data = BigInt(input.data); - } catch { - return this._getInvalidInput(input); - } - } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.bigint) { - return this._getInvalidInput(input); - } - let ctx = void 0; - const status = new ParseStatus2(); - for (const check of this._def.checks) { - if (check.kind === "min") { - const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value; - if (tooSmall) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - type: "bigint", - minimum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "max") { - const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value; - if (tooBig) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - type: "bigint", - maximum: check.value, - inclusive: check.inclusive, - message: check.message - }); - status.dirty(); - } - } else if (check.kind === "multipleOf") { - if (input.data % check.value !== BigInt(0)) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.not_multiple_of, - multipleOf: check.value, - message: check.message - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { status: status.value, value: input.data }; - } - _getInvalidInput(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.bigint, - received: ctx.parsedType - }); - return INVALID2; - } - gte(value2, message) { - return this.setLimit("min", value2, true, errorUtil2.toString(message)); - } - gt(value2, message) { - return this.setLimit("min", value2, false, errorUtil2.toString(message)); - } - lte(value2, message) { - return this.setLimit("max", value2, true, errorUtil2.toString(message)); - } - lt(value2, message) { - return this.setLimit("max", value2, false, errorUtil2.toString(message)); - } - setLimit(kind, value2, inclusive, message) { - return new _ZodBigInt({ - ...this._def, - checks: [ - ...this._def.checks, - { - kind, - value: value2, - inclusive, - message: errorUtil2.toString(message) - } - ] - }); - } - _addCheck(check) { - return new _ZodBigInt({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - positive(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: false, - message: errorUtil2.toString(message) - }); - } - negative(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: false, - message: errorUtil2.toString(message) - }); - } - nonpositive(message) { - return this._addCheck({ - kind: "max", - value: BigInt(0), - inclusive: true, - message: errorUtil2.toString(message) - }); - } - nonnegative(message) { - return this._addCheck({ - kind: "min", - value: BigInt(0), - inclusive: true, - message: errorUtil2.toString(message) - }); - } - multipleOf(value2, message) { - return this._addCheck({ - kind: "multipleOf", - value: value2, - message: errorUtil2.toString(message) - }); - } - 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; - } -}; -ZodBigInt2.create = (params) => { - return new ZodBigInt2({ - checks: [], - typeName: ZodFirstPartyTypeKind2.ZodBigInt, - coerce: params?.coerce ?? false, - ...processCreateParams3(params) - }); -}; -var ZodBoolean2 = class extends ZodType2 { - _parse(input) { - if (this._def.coerce) { - input.data = Boolean(input.data); - } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.boolean) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.boolean, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } -}; -ZodBoolean2.create = (params) => { - return new ZodBoolean2({ - typeName: ZodFirstPartyTypeKind2.ZodBoolean, - coerce: params?.coerce || false, - ...processCreateParams3(params) - }); -}; -var ZodDate2 = class _ZodDate extends ZodType2 { - _parse(input) { - if (this._def.coerce) { - input.data = new Date(input.data); - } - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.date) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.date, - received: ctx2.parsedType - }); - return INVALID2; - } - if (Number.isNaN(input.data.getTime())) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_date - }); - return INVALID2; - } - const status = new ParseStatus2(); - let ctx = void 0; - for (const check of this._def.checks) { - if (check.kind === "min") { - if (input.data.getTime() < check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - message: check.message, - inclusive: true, - exact: false, - minimum: check.value, - type: "date" - }); - status.dirty(); - } - } else if (check.kind === "max") { - if (input.data.getTime() > check.value) { - ctx = this._getOrReturnCtx(input, ctx); - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - message: check.message, - inclusive: true, - exact: false, - maximum: check.value, - type: "date" - }); - status.dirty(); - } - } else { - util2.assertNever(check); - } - } - return { - status: status.value, - value: new Date(input.data.getTime()) - }; - } - _addCheck(check) { - return new _ZodDate({ - ...this._def, - checks: [...this._def.checks, check] - }); - } - min(minDate, message) { - return this._addCheck({ - kind: "min", - value: minDate.getTime(), - message: errorUtil2.toString(message) - }); - } - max(maxDate, message) { - return this._addCheck({ - kind: "max", - value: maxDate.getTime(), - message: errorUtil2.toString(message) - }); - } - 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; - } - 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; - } -}; -ZodDate2.create = (params) => { - return new ZodDate2({ - checks: [], - coerce: params?.coerce || false, - typeName: ZodFirstPartyTypeKind2.ZodDate, - ...processCreateParams3(params) - }); -}; -var ZodSymbol2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.symbol) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.symbol, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } -}; -ZodSymbol2.create = (params) => { - return new ZodSymbol2({ - typeName: ZodFirstPartyTypeKind2.ZodSymbol, - ...processCreateParams3(params) - }); -}; -var ZodUndefined2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.undefined, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } -}; -ZodUndefined2.create = (params) => { - return new ZodUndefined2({ - typeName: ZodFirstPartyTypeKind2.ZodUndefined, - ...processCreateParams3(params) - }); -}; -var ZodNull2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.null) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.null, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } -}; -ZodNull2.create = (params) => { - return new ZodNull2({ - typeName: ZodFirstPartyTypeKind2.ZodNull, - ...processCreateParams3(params) - }); -}; -var ZodAny2 = class extends ZodType2 { - constructor() { - super(...arguments); - this._any = true; - } - _parse(input) { - return OK2(input.data); - } -}; -ZodAny2.create = (params) => { - return new ZodAny2({ - typeName: ZodFirstPartyTypeKind2.ZodAny, - ...processCreateParams3(params) - }); -}; -var ZodUnknown2 = class extends ZodType2 { - constructor() { - super(...arguments); - this._unknown = true; - } - _parse(input) { - return OK2(input.data); - } -}; -ZodUnknown2.create = (params) => { - return new ZodUnknown2({ - typeName: ZodFirstPartyTypeKind2.ZodUnknown, - ...processCreateParams3(params) - }); -}; -var ZodNever2 = class extends ZodType2 { - _parse(input) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.never, - received: ctx.parsedType - }); - return INVALID2; - } -}; -ZodNever2.create = (params) => { - return new ZodNever2({ - typeName: ZodFirstPartyTypeKind2.ZodNever, - ...processCreateParams3(params) - }); -}; -var ZodVoid2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.undefined) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.void, - received: ctx.parsedType - }); - return INVALID2; - } - return OK2(input.data); - } -}; -ZodVoid2.create = (params) => { - return new ZodVoid2({ - typeName: ZodFirstPartyTypeKind2.ZodVoid, - ...processCreateParams3(params) - }); -}; -var ZodArray2 = class _ZodArray extends ZodType2 { - _parse(input) { - const { ctx, status } = this._processInputParams(input); - const def = this._def; - if (ctx.parsedType !== ZodParsedType2.array) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.array, - received: ctx.parsedType - }); - return INVALID2; - } - if (def.exactLength !== null) { - const tooBig = ctx.data.length > def.exactLength.value; - const tooSmall = ctx.data.length < def.exactLength.value; - if (tooBig || tooSmall) { - addIssueToContext2(ctx, { - code: tooBig ? ZodIssueCode2.too_big : ZodIssueCode2.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) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.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) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.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 ParseInputLazyPath2(ctx, item, ctx.path, i)); - })).then((result2) => { - return ParseStatus2.mergeArray(status, result2); - }); - } - const result = [...ctx.data].map((item, i) => { - return def.type._parseSync(new ParseInputLazyPath2(ctx, item, ctx.path, i)); - }); - return ParseStatus2.mergeArray(status, result); - } - get element() { - return this._def.type; - } - min(minLength, message) { - return new _ZodArray({ - ...this._def, - minLength: { value: minLength, message: errorUtil2.toString(message) } - }); - } - max(maxLength, message) { - return new _ZodArray({ - ...this._def, - maxLength: { value: maxLength, message: errorUtil2.toString(message) } - }); - } - length(len, message) { - return new _ZodArray({ - ...this._def, - exactLength: { value: len, message: errorUtil2.toString(message) } - }); - } - nonempty(message) { - return this.min(1, message); - } -}; -ZodArray2.create = (schema2, params) => { - return new ZodArray2({ - type: schema2, - minLength: null, - maxLength: null, - exactLength: null, - typeName: ZodFirstPartyTypeKind2.ZodArray, - ...processCreateParams3(params) - }); -}; -function deepPartialify2(schema2) { - if (schema2 instanceof ZodObject2) { - const newShape = {}; - for (const key in schema2.shape) { - const fieldSchema = schema2.shape[key]; - newShape[key] = ZodOptional2.create(deepPartialify2(fieldSchema)); - } - return new ZodObject2({ - ...schema2._def, - shape: () => newShape - }); - } else if (schema2 instanceof ZodArray2) { - return new ZodArray2({ - ...schema2._def, - type: deepPartialify2(schema2.element) - }); - } else if (schema2 instanceof ZodOptional2) { - return ZodOptional2.create(deepPartialify2(schema2.unwrap())); - } else if (schema2 instanceof ZodNullable2) { - return ZodNullable2.create(deepPartialify2(schema2.unwrap())); - } else if (schema2 instanceof ZodTuple2) { - return ZodTuple2.create(schema2.items.map((item) => deepPartialify2(item))); - } else { - return schema2; - } -} -var ZodObject2 = class _ZodObject extends ZodType2 { - 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 = util2.objectKeys(shape); - this._cached = { shape, keys }; - return this._cached; - } - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.object) { - const ctx2 = this._getOrReturnCtx(input); - addIssueToContext2(ctx2, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.object, - received: ctx2.parsedType - }); - return INVALID2; - } - const { status, ctx } = this._processInputParams(input); - const { shape, keys: shapeKeys } = this._getCached(); - const extraKeys = []; - if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) { - for (const key in ctx.data) { - if (!shapeKeys.includes(key)) { - extraKeys.push(key); - } - } - } - const pairs = []; - for (const key of shapeKeys) { - const keyValidator = shape[key]; - const value2 = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: keyValidator._parse(new ParseInputLazyPath2(ctx, value2, ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (this._def.catchall instanceof ZodNever2) { - 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) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.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 value2 = ctx.data[key]; - pairs.push({ - key: { status: "valid", value: key }, - value: catchall._parse( - new ParseInputLazyPath2(ctx, value2, 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 value2 = await pair.value; - syncPairs.push({ - key, - value: value2, - alwaysSet: pair.alwaysSet - }); - } - return syncPairs; - }).then((syncPairs) => { - return ParseStatus2.mergeObjectSync(status, syncPairs); - }); - } else { - return ParseStatus2.mergeObjectSync(status, pairs); - } - } - get shape() { - return this._def.shape(); - } - strict(message) { - errorUtil2.errToObj; - return new _ZodObject({ - ...this._def, - unknownKeys: "strict", - ...message !== void 0 ? { - errorMap: (issue3, ctx) => { - const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; - if (issue3.code === "unrecognized_keys") - return { - message: errorUtil2.errToObj(message).message ?? defaultError - }; - return { - message: defaultError - }; - } - } : {} - }); - } - strip() { - return new _ZodObject({ - ...this._def, - unknownKeys: "strip" - }); - } - passthrough() { - return new _ZodObject({ - ...this._def, - unknownKeys: "passthrough" - }); - } - // 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 - }) - }); - } - /** - * 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: ZodFirstPartyTypeKind2.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, schema2) { - return this.augment({ [key]: schema2 }); - } - // 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 - }); - } - pick(mask) { - const shape = {}; - for (const key of util2.objectKeys(mask)) { - if (mask[key] && this.shape[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - omit(mask) { - const shape = {}; - for (const key of util2.objectKeys(this.shape)) { - if (!mask[key]) { - shape[key] = this.shape[key]; - } - } - return new _ZodObject({ - ...this._def, - shape: () => shape - }); - } - /** - * @deprecated - */ - deepPartial() { - return deepPartialify2(this); - } - partial(mask) { - const newShape = {}; - for (const key of util2.objectKeys(this.shape)) { - const fieldSchema = this.shape[key]; - if (mask && !mask[key]) { - newShape[key] = fieldSchema; - } else { - newShape[key] = fieldSchema.optional(); - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - required(mask) { - const newShape = {}; - for (const key of util2.objectKeys(this.shape)) { - if (mask && !mask[key]) { - newShape[key] = this.shape[key]; - } else { - const fieldSchema = this.shape[key]; - let newField = fieldSchema; - while (newField instanceof ZodOptional2) { - newField = newField._def.innerType; - } - newShape[key] = newField; - } - } - return new _ZodObject({ - ...this._def, - shape: () => newShape - }); - } - keyof() { - return createZodEnum2(util2.objectKeys(this.shape)); - } -}; -ZodObject2.create = (shape, params) => { - return new ZodObject2({ - shape: () => shape, - unknownKeys: "strip", - catchall: ZodNever2.create(), - typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) - }); -}; -ZodObject2.strictCreate = (shape, params) => { - return new ZodObject2({ - shape: () => shape, - unknownKeys: "strict", - catchall: ZodNever2.create(), - typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) - }); -}; -ZodObject2.lazycreate = (shape, params) => { - return new ZodObject2({ - shape, - unknownKeys: "strip", - catchall: ZodNever2.create(), - typeName: ZodFirstPartyTypeKind2.ZodObject, - ...processCreateParams3(params) - }); -}; -var ZodUnion2 = class extends ZodType2 { - _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 ZodError2(result.ctx.common.issues)); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_union, - unionErrors - }); - return INVALID2; - } - 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 ZodError2(issues2)); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_union, - unionErrors - }); - return INVALID2; - } - } - get options() { - return this._def.options; - } -}; -ZodUnion2.create = (types, params) => { - return new ZodUnion2({ - options: types, - typeName: ZodFirstPartyTypeKind2.ZodUnion, - ...processCreateParams3(params) - }); -}; -var getDiscriminator2 = (type2) => { - if (type2 instanceof ZodLazy2) { - return getDiscriminator2(type2.schema); - } else if (type2 instanceof ZodEffects2) { - return getDiscriminator2(type2.innerType()); - } else if (type2 instanceof ZodLiteral2) { - return [type2.value]; - } else if (type2 instanceof ZodEnum2) { - return type2.options; - } else if (type2 instanceof ZodNativeEnum2) { - return util2.objectValues(type2.enum); - } else if (type2 instanceof ZodDefault2) { - return getDiscriminator2(type2._def.innerType); - } else if (type2 instanceof ZodUndefined2) { - return [void 0]; - } else if (type2 instanceof ZodNull2) { - return [null]; - } else if (type2 instanceof ZodOptional2) { - return [void 0, ...getDiscriminator2(type2.unwrap())]; - } else if (type2 instanceof ZodNullable2) { - return [null, ...getDiscriminator2(type2.unwrap())]; - } else if (type2 instanceof ZodBranded2) { - return getDiscriminator2(type2.unwrap()); - } else if (type2 instanceof ZodReadonly2) { - return getDiscriminator2(type2.unwrap()); - } else if (type2 instanceof ZodCatch2) { - return getDiscriminator2(type2._def.innerType); - } else { - return []; - } -}; -var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.object) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.object, - received: ctx.parsedType - }); - return INVALID2; - } - const discriminator = this.discriminator; - const discriminatorValue = ctx.data[discriminator]; - const option = this.optionsMap.get(discriminatorValue); - if (!option) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_union_discriminator, - options: Array.from(this.optionsMap.keys()), - path: [discriminator] - }); - return INVALID2; - } - 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 - }); - } - } - 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 type2 of options) { - const discriminatorValues = getDiscriminator2(type2.shape[discriminator]); - if (!discriminatorValues.length) { - throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`); - } - for (const value2 of discriminatorValues) { - if (optionsMap.has(value2)) { - throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value2)}`); - } - optionsMap.set(value2, type2); - } - } - return new _ZodDiscriminatedUnion({ - typeName: ZodFirstPartyTypeKind2.ZodDiscriminatedUnion, - discriminator, - options, - optionsMap, - ...processCreateParams3(params) - }); - } -}; -function mergeValues2(a, b) { - const aType = getParsedType2(a); - const bType = getParsedType2(b); - if (a === b) { - return { valid: true, data: a }; - } else if (aType === ZodParsedType2.object && bType === ZodParsedType2.object) { - const bKeys = util2.objectKeys(b); - const sharedKeys = util2.objectKeys(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 }; - } - newObj[key] = sharedValue.data; - } - return { valid: true, data: newObj }; - } else if (aType === ZodParsedType2.array && bType === ZodParsedType2.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 = mergeValues2(itemA, itemB); - if (!sharedValue.valid) { - return { valid: false }; - } - newArray.push(sharedValue.data); - } - return { valid: true, data: newArray }; - } else if (aType === ZodParsedType2.date && bType === ZodParsedType2.date && +a === +b) { - return { valid: true, data: a }; - } else { - return { valid: false }; - } -} -var ZodIntersection2 = class extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - const handleParsed = (parsedLeft, parsedRight) => { - if (isAborted2(parsedLeft) || isAborted2(parsedRight)) { - return INVALID2; - } - const merged = mergeValues2(parsedLeft.value, parsedRight.value); - if (!merged.valid) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_intersection_types - }); - return INVALID2; - } - if (isDirty2(parsedLeft) || isDirty2(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 - })); - } - } -}; -ZodIntersection2.create = (left, right, params) => { - return new ZodIntersection2({ - left, - right, - typeName: ZodFirstPartyTypeKind2.ZodIntersection, - ...processCreateParams3(params) - }); -}; -var ZodTuple2 = class _ZodTuple extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.array) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.array, - received: ctx.parsedType - }); - return INVALID2; - } - if (ctx.data.length < this._def.items.length) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_small, - minimum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - return INVALID2; - } - const rest = this._def.rest; - if (!rest && ctx.data.length > this._def.items.length) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.too_big, - maximum: this._def.items.length, - inclusive: true, - exact: false, - type: "array" - }); - status.dirty(); - } - const items = [...ctx.data].map((item, itemIndex) => { - const schema2 = this._def.items[itemIndex] || this._def.rest; - if (!schema2) - return null; - return schema2._parse(new ParseInputLazyPath2(ctx, item, ctx.path, itemIndex)); - }).filter((x) => !!x); - if (ctx.common.async) { - return Promise.all(items).then((results) => { - return ParseStatus2.mergeArray(status, results); - }); - } else { - return ParseStatus2.mergeArray(status, items); - } - } - get items() { - return this._def.items; - } - rest(rest) { - return new _ZodTuple({ - ...this._def, - rest - }); - } -}; -ZodTuple2.create = (schemas, params) => { - if (!Array.isArray(schemas)) { - throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); - } - return new ZodTuple2({ - items: schemas, - typeName: ZodFirstPartyTypeKind2.ZodTuple, - rest: null, - ...processCreateParams3(params) - }); -}; -var ZodRecord2 = class _ZodRecord extends ZodType2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.object) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.object, - received: ctx.parsedType - }); - return INVALID2; - } - const pairs = []; - const keyType = this._def.keyType; - const valueType = this._def.valueType; - for (const key in ctx.data) { - pairs.push({ - key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, key)), - value: valueType._parse(new ParseInputLazyPath2(ctx, ctx.data[key], ctx.path, key)), - alwaysSet: key in ctx.data - }); - } - if (ctx.common.async) { - return ParseStatus2.mergeObjectAsync(status, pairs); - } else { - return ParseStatus2.mergeObjectSync(status, pairs); - } - } - get element() { - return this._def.valueType; - } - static create(first, second, third) { - if (second instanceof ZodType2) { - return new _ZodRecord({ - keyType: first, - valueType: second, - typeName: ZodFirstPartyTypeKind2.ZodRecord, - ...processCreateParams3(third) - }); - } - return new _ZodRecord({ - keyType: ZodString2.create(), - valueType: first, - typeName: ZodFirstPartyTypeKind2.ZodRecord, - ...processCreateParams3(second) - }); - } -}; -var ZodMap2 = class extends ZodType2 { - get keySchema() { - return this._def.keyType; - } - get valueSchema() { - return this._def.valueType; - } - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.map) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.map, - received: ctx.parsedType - }); - return INVALID2; - } - const keyType = this._def.keyType; - const valueType = this._def.valueType; - const pairs = [...ctx.data.entries()].map(([key, value2], index) => { - return { - key: keyType._parse(new ParseInputLazyPath2(ctx, key, ctx.path, [index, "key"])), - value: valueType._parse(new ParseInputLazyPath2(ctx, value2, 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 value2 = await pair.value; - if (key.status === "aborted" || value2.status === "aborted") { - return INVALID2; - } - if (key.status === "dirty" || value2.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value2.value); - } - return { status: status.value, value: finalMap }; - }); - } else { - const finalMap = /* @__PURE__ */ new Map(); - for (const pair of pairs) { - const key = pair.key; - const value2 = pair.value; - if (key.status === "aborted" || value2.status === "aborted") { - return INVALID2; - } - if (key.status === "dirty" || value2.status === "dirty") { - status.dirty(); - } - finalMap.set(key.value, value2.value); - } - return { status: status.value, value: finalMap }; - } - } -}; -ZodMap2.create = (keyType, valueType, params) => { - return new ZodMap2({ - valueType, - keyType, - typeName: ZodFirstPartyTypeKind2.ZodMap, - ...processCreateParams3(params) - }); -}; -var ZodSet2 = class _ZodSet extends ZodType2 { - _parse(input) { - const { status, ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.set) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.set, - received: ctx.parsedType - }); - return INVALID2; - } - const def = this._def; - if (def.minSize !== null) { - if (ctx.data.size < def.minSize.value) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.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) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.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 INVALID2; - 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 ParseInputLazyPath2(ctx, item, ctx.path, i))); - if (ctx.common.async) { - return Promise.all(elements).then((elements2) => finalizeSet(elements2)); - } else { - return finalizeSet(elements); - } - } - min(minSize, message) { - return new _ZodSet({ - ...this._def, - minSize: { value: minSize, message: errorUtil2.toString(message) } - }); - } - max(maxSize, message) { - return new _ZodSet({ - ...this._def, - maxSize: { value: maxSize, message: errorUtil2.toString(message) } - }); - } - size(size, message) { - return this.min(size, message).max(size, message); - } - nonempty(message) { - return this.min(1, message); - } -}; -ZodSet2.create = (valueType, params) => { - return new ZodSet2({ - valueType, - minSize: null, - maxSize: null, - typeName: ZodFirstPartyTypeKind2.ZodSet, - ...processCreateParams3(params) - }); -}; -var ZodFunction2 = class _ZodFunction extends ZodType2 { - constructor() { - super(...arguments); - this.validate = this.implement; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.function) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.function, - received: ctx.parsedType - }); - return INVALID2; - } - function makeArgsIssue(args3, error42) { - return makeIssue2({ - data: args3, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), - issueData: { - code: ZodIssueCode2.invalid_arguments, - argumentsError: error42 - } - }); - } - function makeReturnsIssue(returns, error42) { - return makeIssue2({ - data: returns, - path: ctx.path, - errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x), - issueData: { - code: ZodIssueCode2.invalid_return_type, - returnTypeError: error42 - } - }); - } - const params = { errorMap: ctx.common.contextualErrorMap }; - const fn2 = ctx.data; - if (this._def.returns instanceof ZodPromise2) { - const me = this; - return OK2(async function(...args3) { - const error42 = new ZodError2([]); - const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error42.addIssue(makeArgsIssue(args3, e)); - throw error42; - }); - const result = await Reflect.apply(fn2, this, parsedArgs); - const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error42.addIssue(makeReturnsIssue(result, e)); - throw error42; - }); - return parsedReturns; - }); - } else { - const me = this; - return OK2(function(...args3) { - const parsedArgs = me._def.args.safeParse(args3, params); - if (!parsedArgs.success) { - throw new ZodError2([makeArgsIssue(args3, parsedArgs.error)]); - } - const result = Reflect.apply(fn2, this, parsedArgs.data); - const parsedReturns = me._def.returns.safeParse(result, params); - if (!parsedReturns.success) { - throw new ZodError2([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: ZodTuple2.create(items).rest(ZodUnknown2.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(args3, returns, params) { - return new _ZodFunction({ - args: args3 ? args3 : ZodTuple2.create([]).rest(ZodUnknown2.create()), - returns: returns || ZodUnknown2.create(), - typeName: ZodFirstPartyTypeKind2.ZodFunction, - ...processCreateParams3(params) - }); - } -}; -var ZodLazy2 = class extends ZodType2 { - 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 }); - } -}; -ZodLazy2.create = (getter, params) => { - return new ZodLazy2({ - getter, - typeName: ZodFirstPartyTypeKind2.ZodLazy, - ...processCreateParams3(params) - }); -}; -var ZodLiteral2 = class extends ZodType2 { - _parse(input) { - if (input.data !== this._def.value) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - received: ctx.data, - code: ZodIssueCode2.invalid_literal, - expected: this._def.value - }); - return INVALID2; - } - return { status: "valid", value: input.data }; - } - get value() { - return this._def.value; - } -}; -ZodLiteral2.create = (value2, params) => { - return new ZodLiteral2({ - value: value2, - typeName: ZodFirstPartyTypeKind2.ZodLiteral, - ...processCreateParams3(params) - }); -}; -function createZodEnum2(values, params) { - return new ZodEnum2({ - values, - typeName: ZodFirstPartyTypeKind2.ZodEnum, - ...processCreateParams3(params) - }); -} -var ZodEnum2 = class _ZodEnum extends ZodType2 { - _parse(input) { - if (typeof input.data !== "string") { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext2(ctx, { - expected: util2.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode2.invalid_type - }); - return INVALID2; - } - if (!this._cache) { - this._cache = new Set(this._def.values); - } - if (!this._cache.has(input.data)) { - const ctx = this._getOrReturnCtx(input); - const expectedValues = this._def.values; - addIssueToContext2(ctx, { - received: ctx.data, - code: ZodIssueCode2.invalid_enum_value, - options: expectedValues - }); - return INVALID2; - } - return OK2(input.data); - } - get options() { - return this._def.values; - } - get enum() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - get Values() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - get Enum() { - const enumValues2 = {}; - for (const val of this._def.values) { - enumValues2[val] = val; - } - return enumValues2; - } - 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 - }); - } -}; -ZodEnum2.create = createZodEnum2; -var ZodNativeEnum2 = class extends ZodType2 { - _parse(input) { - const nativeEnumValues = util2.getValidEnumValues(this._def.values); - const ctx = this._getOrReturnCtx(input); - if (ctx.parsedType !== ZodParsedType2.string && ctx.parsedType !== ZodParsedType2.number) { - const expectedValues = util2.objectValues(nativeEnumValues); - addIssueToContext2(ctx, { - expected: util2.joinValues(expectedValues), - received: ctx.parsedType, - code: ZodIssueCode2.invalid_type - }); - return INVALID2; - } - if (!this._cache) { - this._cache = new Set(util2.getValidEnumValues(this._def.values)); - } - if (!this._cache.has(input.data)) { - const expectedValues = util2.objectValues(nativeEnumValues); - addIssueToContext2(ctx, { - received: ctx.data, - code: ZodIssueCode2.invalid_enum_value, - options: expectedValues - }); - return INVALID2; - } - return OK2(input.data); - } - get enum() { - return this._def.values; - } -}; -ZodNativeEnum2.create = (values, params) => { - return new ZodNativeEnum2({ - values, - typeName: ZodFirstPartyTypeKind2.ZodNativeEnum, - ...processCreateParams3(params) - }); -}; -var ZodPromise2 = class extends ZodType2 { - unwrap() { - return this._def.type; - } - _parse(input) { - const { ctx } = this._processInputParams(input); - if (ctx.parsedType !== ZodParsedType2.promise && ctx.common.async === false) { - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.promise, - received: ctx.parsedType - }); - return INVALID2; - } - const promisified = ctx.parsedType === ZodParsedType2.promise ? ctx.data : Promise.resolve(ctx.data); - return OK2(promisified.then((data) => { - return this._def.type.parseAsync(data, { - path: ctx.path, - errorMap: ctx.common.contextualErrorMap - }); - })); - } -}; -ZodPromise2.create = (schema2, params) => { - return new ZodPromise2({ - type: schema2, - typeName: ZodFirstPartyTypeKind2.ZodPromise, - ...processCreateParams3(params) - }); -}; -var ZodEffects2 = class extends ZodType2 { - innerType() { - return this._def.schema; - } - sourceType() { - return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.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) => { - addIssueToContext2(ctx, arg); - if (arg.fatal) { - status.abort(); - } else { - status.dirty(); - } - }, - get path() { - return ctx.path; - } - }; - 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 INVALID2; - const result = await this._def.schema._parseAsync({ - data: processed2, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID2; - if (result.status === "dirty") - return DIRTY2(result.value); - if (status.value === "dirty") - return DIRTY2(result.value); - return result; - }); - } else { - if (status.value === "aborted") - return INVALID2; - const result = this._def.schema._parseSync({ - data: processed, - path: ctx.path, - parent: ctx - }); - if (result.status === "aborted") - return INVALID2; - if (result.status === "dirty") - return DIRTY2(result.value); - if (status.value === "dirty") - return DIRTY2(result.value); - return result; - } - } - 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 INVALID2; - 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 INVALID2; - 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 INVALID2; - 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 INVALID2; - return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ - status: status.value, - value: result - })); - }); - } - } - util2.assertNever(effect); - } -}; -ZodEffects2.create = (schema2, effect, params) => { - return new ZodEffects2({ - schema: schema2, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - effect, - ...processCreateParams3(params) - }); -}; -ZodEffects2.createWithPreprocess = (preprocess, schema2, params) => { - return new ZodEffects2({ - schema: schema2, - effect: { type: "preprocess", transform: preprocess }, - typeName: ZodFirstPartyTypeKind2.ZodEffects, - ...processCreateParams3(params) - }); -}; -var ZodOptional2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 === ZodParsedType2.undefined) { - return OK2(void 0); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } -}; -ZodOptional2.create = (type2, params) => { - return new ZodOptional2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodOptional, - ...processCreateParams3(params) - }); -}; -var ZodNullable2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 === ZodParsedType2.null) { - return OK2(null); - } - return this._def.innerType._parse(input); - } - unwrap() { - return this._def.innerType; - } -}; -ZodNullable2.create = (type2, params) => { - return new ZodNullable2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodNullable, - ...processCreateParams3(params) - }); -}; -var ZodDefault2 = class extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - let data = ctx.data; - if (ctx.parsedType === ZodParsedType2.undefined) { - data = this._def.defaultValue(); - } - return this._def.innerType._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - removeDefault() { - return this._def.innerType; - } -}; -ZodDefault2.create = (type2, params) => { - return new ZodDefault2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodDefault, - defaultValue: typeof params.default === "function" ? params.default : () => params.default, - ...processCreateParams3(params) - }); -}; -var ZodCatch2 = class extends ZodType2 { - _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 - } - }); - if (isAsync2(result)) { - return result.then((result2) => { - return { - status: "valid", - value: result2.status === "valid" ? result2.value : this._def.catchValue({ - get error() { - return new ZodError2(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - }); - } else { - return { - status: "valid", - value: result.status === "valid" ? result.value : this._def.catchValue({ - get error() { - return new ZodError2(newCtx.common.issues); - }, - input: newCtx.data - }) - }; - } - } - removeCatch() { - return this._def.innerType; - } -}; -ZodCatch2.create = (type2, params) => { - return new ZodCatch2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodCatch, - catchValue: typeof params.catch === "function" ? params.catch : () => params.catch, - ...processCreateParams3(params) - }); -}; -var ZodNaN2 = class extends ZodType2 { - _parse(input) { - const parsedType5 = this._getType(input); - if (parsedType5 !== ZodParsedType2.nan) { - const ctx = this._getOrReturnCtx(input); - addIssueToContext2(ctx, { - code: ZodIssueCode2.invalid_type, - expected: ZodParsedType2.nan, - received: ctx.parsedType - }); - return INVALID2; - } - return { status: "valid", value: input.data }; - } -}; -ZodNaN2.create = (params) => { - return new ZodNaN2({ - typeName: ZodFirstPartyTypeKind2.ZodNaN, - ...processCreateParams3(params) - }); -}; -var BRAND2 = Symbol("zod_brand"); -var ZodBranded2 = class extends ZodType2 { - _parse(input) { - const { ctx } = this._processInputParams(input); - const data = ctx.data; - return this._def.type._parse({ - data, - path: ctx.path, - parent: ctx - }); - } - unwrap() { - return this._def.type; - } -}; -var ZodPipeline2 = class _ZodPipeline extends ZodType2 { - _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 INVALID2; - if (inResult.status === "dirty") { - status.dirty(); - return DIRTY2(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 INVALID2; - 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: ZodFirstPartyTypeKind2.ZodPipeline - }); - } -}; -var ZodReadonly2 = class extends ZodType2 { - _parse(input) { - const result = this._def.innerType._parse(input); - const freeze = (data) => { - if (isValid2(data)) { - data.value = Object.freeze(data.value); - } - return data; - }; - return isAsync2(result) ? result.then((data) => freeze(data)) : freeze(result); - } - unwrap() { - return this._def.innerType; - } -}; -ZodReadonly2.create = (type2, params) => { - return new ZodReadonly2({ - innerType: type2, - typeName: ZodFirstPartyTypeKind2.ZodReadonly, - ...processCreateParams3(params) - }); -}; -function cleanParams2(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 custom2(check, _params = {}, fatal) { - if (check) - return ZodAny2.create().superRefine((data, ctx) => { - const r = check(data); - if (r instanceof Promise) { - return r.then((r2) => { - if (!r2) { - const params = cleanParams2(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - }); - } - if (!r) { - const params = cleanParams2(_params, data); - const _fatal = params.fatal ?? fatal ?? true; - ctx.addIssue({ code: "custom", ...params, fatal: _fatal }); - } - return; - }); - return ZodAny2.create(); -} -var late2 = { - object: ZodObject2.lazycreate -}; -var ZodFirstPartyTypeKind2; -(function(ZodFirstPartyTypeKind5) { - ZodFirstPartyTypeKind5["ZodString"] = "ZodString"; - ZodFirstPartyTypeKind5["ZodNumber"] = "ZodNumber"; - ZodFirstPartyTypeKind5["ZodNaN"] = "ZodNaN"; - ZodFirstPartyTypeKind5["ZodBigInt"] = "ZodBigInt"; - ZodFirstPartyTypeKind5["ZodBoolean"] = "ZodBoolean"; - ZodFirstPartyTypeKind5["ZodDate"] = "ZodDate"; - ZodFirstPartyTypeKind5["ZodSymbol"] = "ZodSymbol"; - ZodFirstPartyTypeKind5["ZodUndefined"] = "ZodUndefined"; - ZodFirstPartyTypeKind5["ZodNull"] = "ZodNull"; - ZodFirstPartyTypeKind5["ZodAny"] = "ZodAny"; - ZodFirstPartyTypeKind5["ZodUnknown"] = "ZodUnknown"; - ZodFirstPartyTypeKind5["ZodNever"] = "ZodNever"; - ZodFirstPartyTypeKind5["ZodVoid"] = "ZodVoid"; - ZodFirstPartyTypeKind5["ZodArray"] = "ZodArray"; - ZodFirstPartyTypeKind5["ZodObject"] = "ZodObject"; - ZodFirstPartyTypeKind5["ZodUnion"] = "ZodUnion"; - ZodFirstPartyTypeKind5["ZodDiscriminatedUnion"] = "ZodDiscriminatedUnion"; - ZodFirstPartyTypeKind5["ZodIntersection"] = "ZodIntersection"; - ZodFirstPartyTypeKind5["ZodTuple"] = "ZodTuple"; - ZodFirstPartyTypeKind5["ZodRecord"] = "ZodRecord"; - ZodFirstPartyTypeKind5["ZodMap"] = "ZodMap"; - ZodFirstPartyTypeKind5["ZodSet"] = "ZodSet"; - ZodFirstPartyTypeKind5["ZodFunction"] = "ZodFunction"; - ZodFirstPartyTypeKind5["ZodLazy"] = "ZodLazy"; - ZodFirstPartyTypeKind5["ZodLiteral"] = "ZodLiteral"; - ZodFirstPartyTypeKind5["ZodEnum"] = "ZodEnum"; - ZodFirstPartyTypeKind5["ZodEffects"] = "ZodEffects"; - ZodFirstPartyTypeKind5["ZodNativeEnum"] = "ZodNativeEnum"; - ZodFirstPartyTypeKind5["ZodOptional"] = "ZodOptional"; - ZodFirstPartyTypeKind5["ZodNullable"] = "ZodNullable"; - ZodFirstPartyTypeKind5["ZodDefault"] = "ZodDefault"; - ZodFirstPartyTypeKind5["ZodCatch"] = "ZodCatch"; - ZodFirstPartyTypeKind5["ZodPromise"] = "ZodPromise"; - ZodFirstPartyTypeKind5["ZodBranded"] = "ZodBranded"; - ZodFirstPartyTypeKind5["ZodPipeline"] = "ZodPipeline"; - ZodFirstPartyTypeKind5["ZodReadonly"] = "ZodReadonly"; -})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {})); -var instanceOfType2 = (cls, params = { - message: `Input not instance of ${cls.name}` -}) => custom2((data) => data instanceof cls, params); -var stringType2 = ZodString2.create; -var numberType2 = ZodNumber2.create; -var nanType2 = ZodNaN2.create; -var bigIntType2 = ZodBigInt2.create; -var booleanType2 = ZodBoolean2.create; -var dateType2 = ZodDate2.create; -var symbolType2 = ZodSymbol2.create; -var undefinedType2 = ZodUndefined2.create; -var nullType2 = ZodNull2.create; -var anyType2 = ZodAny2.create; -var unknownType2 = ZodUnknown2.create; -var neverType2 = ZodNever2.create; -var voidType2 = ZodVoid2.create; -var arrayType2 = ZodArray2.create; -var objectType2 = ZodObject2.create; -var strictObjectType2 = ZodObject2.strictCreate; -var unionType2 = ZodUnion2.create; -var discriminatedUnionType2 = ZodDiscriminatedUnion2.create; -var intersectionType2 = ZodIntersection2.create; -var tupleType2 = ZodTuple2.create; -var recordType2 = ZodRecord2.create; -var mapType2 = ZodMap2.create; -var setType2 = ZodSet2.create; -var functionType2 = ZodFunction2.create; -var lazyType2 = ZodLazy2.create; -var literalType2 = ZodLiteral2.create; -var enumType2 = ZodEnum2.create; -var nativeEnumType2 = ZodNativeEnum2.create; -var promiseType2 = ZodPromise2.create; -var effectsType2 = ZodEffects2.create; -var optionalType2 = ZodOptional2.create; -var nullableType2 = ZodNullable2.create; -var preprocessType2 = ZodEffects2.createWithPreprocess; -var pipelineType2 = ZodPipeline2.create; -var ostring2 = () => stringType2().optional(); -var onumber2 = () => numberType2().optional(); -var oboolean2 = () => booleanType2().optional(); -var coerce2 = { - string: ((arg) => ZodString2.create({ ...arg, coerce: true })), - number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })), - boolean: ((arg) => ZodBoolean2.create({ - ...arg, - coerce: true - })), - bigint: ((arg) => ZodBigInt2.create({ ...arg, coerce: true })), - date: ((arg) => ZodDate2.create({ ...arg, coerce: true })) -}; -var NEVER2 = INVALID2; - // ../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +init_zod(); var LATEST_PROTOCOL_VERSION = "2025-06-18"; var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"]; var JSONRPC_VERSION2 = "2.0"; @@ -100609,9 +99754,9 @@ var Protocol = class { this._onclose(); }; const _onerror = (_b = this.transport) === null || _b === void 0 ? void 0 : _b.onerror; - this._transport.onerror = (error42) => { - _onerror === null || _onerror === void 0 ? void 0 : _onerror(error42); - this._onerror(error42); + this._transport.onerror = (error41) => { + _onerror === null || _onerror === void 0 ? void 0 : _onerror(error41); + this._onerror(error41); }; const _onmessage = (_c = this._transport) === null || _c === void 0 ? void 0 : _c.onmessage; this._transport.onmessage = (message, extra) => { @@ -100636,14 +99781,14 @@ var Protocol = class { this._pendingDebouncedNotifications.clear(); this._transport = void 0; (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); - const error42 = new McpError(ErrorCode2.ConnectionClosed, "Connection closed"); + const error41 = new McpError(ErrorCode2.ConnectionClosed, "Connection closed"); for (const handler2 of responseHandlers.values()) { - handler2(error42); + handler2(error41); } } - _onerror(error42) { + _onerror(error41) { var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error42); + (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); } _onnotification(notification) { var _a; @@ -100651,7 +99796,7 @@ var Protocol = class { if (handler2 === void 0) { return; } - Promise.resolve().then(() => handler2(notification)).catch((error42) => this._onerror(new Error(`Uncaught error in notification handler: ${error42}`))); + Promise.resolve().then(() => handler2(notification)).catch((error41) => this._onerror(new Error(`Uncaught error in notification handler: ${error41}`))); } _onrequest(request2, extra) { var _a, _b; @@ -100665,7 +99810,7 @@ var Protocol = class { code: ErrorCode2.MethodNotFound, message: "Method not found" } - }).catch((error42) => this._onerror(new Error(`Failed to send an error response: ${error42}`))); + }).catch((error41) => this._onerror(new Error(`Failed to send an error response: ${error41}`))); return; } const abortController = new AbortController(); @@ -100689,7 +99834,7 @@ var Protocol = class { jsonrpc: "2.0", id: request2.id }); - }, (error42) => { + }, (error41) => { var _a2; if (abortController.signal.aborted) { return; @@ -100698,11 +99843,11 @@ var Protocol = class { jsonrpc: "2.0", id: request2.id, error: { - code: Number.isSafeInteger(error42["code"]) ? error42["code"] : ErrorCode2.InternalError, - message: (_a2 = error42.message) !== null && _a2 !== void 0 ? _a2 : "Internal error" + code: Number.isSafeInteger(error41["code"]) ? error41["code"] : ErrorCode2.InternalError, + message: (_a2 = error41.message) !== null && _a2 !== void 0 ? _a2 : "Internal error" } }); - }).catch((error42) => this._onerror(new Error(`Failed to send response: ${error42}`))).finally(() => { + }).catch((error41) => this._onerror(new Error(`Failed to send response: ${error41}`))).finally(() => { this._requestHandlerAbortControllers.delete(request2.id); }); } @@ -100719,8 +99864,8 @@ var Protocol = class { if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) { try { this._resetTimeout(messageId); - } catch (error42) { - responseHandler(error42); + } catch (error41) { + responseHandler(error41); return; } } @@ -100739,8 +99884,8 @@ var Protocol = class { if (isJSONRPCResponse(response)) { handler2(response); } else { - const error42 = new McpError(response.error.code, response.error.message, response.error.data); - handler2(error42); + const error41 = new McpError(response.error.code, response.error.message, response.error.data); + handler2(error41); } } get transport() { @@ -100760,7 +99905,7 @@ var Protocol = class { */ request(request2, resultSchema, options) { const { relatedRequestId, resumptionToken, onresumptiontoken } = options !== null && options !== void 0 ? options : {}; - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { var _a, _b, _c, _d, _e, _f; if (!this._transport) { reject(new Error("Not connected")); @@ -100798,7 +99943,7 @@ var Protocol = class { requestId: messageId, reason: String(reason) } - }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error42) => this._onerror(new Error(`Failed to send cancellation: ${error42}`))); + }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => this._onerror(new Error(`Failed to send cancellation: ${error41}`))); reject(reason); }; this._responseHandlers.set(messageId, (response) => { @@ -100811,9 +99956,9 @@ var Protocol = class { } try { const result = resultSchema.parse(response.result); - resolve(result); - } catch (error42) { - reject(error42); + resolve2(result); + } catch (error41) { + reject(error41); } }); (_d = options === null || options === void 0 ? void 0 : options.signal) === null || _d === void 0 ? void 0 : _d.addEventListener("abort", () => { @@ -100823,9 +99968,9 @@ var Protocol = class { const timeout = (_e = options === null || options === void 0 ? void 0 : options.timeout) !== null && _e !== void 0 ? _e : DEFAULT_REQUEST_TIMEOUT_MSEC; const timeoutHandler = () => cancel(new McpError(ErrorCode2.RequestTimeout, "Request timed out", { timeout })); this._setupTimeout(messageId, timeout, options === null || options === void 0 ? void 0 : options.maxTotalTimeout, timeoutHandler, (_f = options === null || options === void 0 ? void 0 : options.resetTimeoutOnProgress) !== null && _f !== void 0 ? _f : false); - this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error42) => { + this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error41) => { this._cleanupTimeout(messageId); - reject(error42); + reject(error41); }); }); } @@ -100855,7 +100000,7 @@ var Protocol = class { ...notification, jsonrpc: "2.0" }; - (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error42) => this._onerror(error42)); + (_a2 = this._transport) === null || _a2 === void 0 ? void 0 : _a2.send(jsonrpcNotification2, options).catch((error41) => this._onerror(error41)); }); return; } @@ -101094,11 +100239,11 @@ var Server = class extends Protocol { if (!isValid4) { throw new McpError(ErrorCode2.InvalidParams, `Elicitation response content does not match requested schema: ${ajv.errorsText(validate2.errors)}`); } - } catch (error42) { - if (error42 instanceof McpError) { - throw error42; + } catch (error41) { + if (error41 instanceof McpError) { + throw error41; } - throw new McpError(ErrorCode2.InternalError, `Error validating elicitation response: ${error42}`); + throw new McpError(ErrorCode2.InternalError, `Error validating elicitation response: ${error41}`); } } return result; @@ -101181,9 +100326,9 @@ var StdioServerTransport = class { this._readBuffer.append(chunk); this.processReadBuffer(); }; - this._onerror = (error42) => { + this._onerror = (error41) => { var _a; - (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error42); + (_a = this.onerror) === null || _a === void 0 ? void 0 : _a.call(this, error41); }; } /** @@ -101206,8 +100351,8 @@ var StdioServerTransport = class { break; } (_a = this.onmessage) === null || _a === void 0 ? void 0 : _a.call(this, message); - } catch (error42) { - (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error42); + } catch (error41) { + (_b = this.onerror) === null || _b === void 0 ? void 0 : _b.call(this, error41); } } } @@ -101223,12 +100368,12 @@ var StdioServerTransport = class { (_a = this.onclose) === null || _a === void 0 ? void 0 : _a.call(this); } send(message) { - return new Promise((resolve) => { + return new Promise((resolve2) => { const json3 = serializeMessage(message); if (this._stdout.write(json3)) { - resolve(); + resolve2(); } else { - this._stdout.once("drain", resolve); + this._stdout.once("drain", resolve2); } }); } @@ -102586,8 +101731,8 @@ var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__ }) : target, mod)); var __require2 = /* @__PURE__ */ createRequire(import.meta.url); var AuthenticationMiddleware = class { - constructor(config3 = {}) { - this.config = config3; + constructor(config2 = {}) { + this.config = config2; } getUnauthorizedResponse() { const headers = { "Content-Type": "application/json" }; @@ -102695,10 +101840,10 @@ var util$6; for (const item of arr) if (checker(item)) return item; }; util$7.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val; - function joinValues3(array, separator2 = " | ") { + function joinValues2(array, separator2 = " | ") { return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator2); } - util$7.joinValues = joinValues3; + util$7.joinValues = joinValues2; util$7.jsonStringifyReplacer = (_, value2) => { if (typeof value2 === "bigint") return value2.toString(); return value2; @@ -102801,24 +101946,24 @@ var ZodError3 = class ZodError4 extends Error { this.issues = issues; } format(_mapper) { - const mapper = _mapper || function(issue3) { - return issue3.message; + const mapper = _mapper || function(issue2) { + return issue2.message; }; const fieldErrors = { _errors: [] }; - const processError = (error42) => { - for (const issue3 of error42.issues) if (issue3.code === "invalid_union") issue3.unionErrors.map(processError); - else if (issue3.code === "invalid_return_type") processError(issue3.returnTypeError); - else if (issue3.code === "invalid_arguments") processError(issue3.argumentsError); - else if (issue3.path.length === 0) fieldErrors._errors.push(mapper(issue3)); + const processError = (error41) => { + for (const issue2 of error41.issues) if (issue2.code === "invalid_union") issue2.unionErrors.map(processError); + else if (issue2.code === "invalid_return_type") processError(issue2.returnTypeError); + else if (issue2.code === "invalid_arguments") processError(issue2.argumentsError); + else if (issue2.path.length === 0) fieldErrors._errors.push(mapper(issue2)); else { let curr = fieldErrors; let i$3 = 0; - while (i$3 < issue3.path.length) { - const el = issue3.path[i$3]; - if (!(i$3 === issue3.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; + while (i$3 < issue2.path.length) { + const el = issue2.path[i$3]; + if (!(i$3 === issue2.path.length - 1)) curr[el] = curr[el] || { _errors: [] }; else { curr[el] = curr[el] || { _errors: [] }; - curr[el]._errors.push(mapper(issue3)); + curr[el]._errors.push(mapper(issue2)); } curr = curr[el]; i$3++; @@ -102840,7 +101985,7 @@ var ZodError3 = class ZodError4 extends Error { get isEmpty() { return this.issues.length === 0; } - flatten(mapper = (issue3) => issue3.message) { + flatten(mapper = (issue2) => issue2.message) { const fieldErrors = {}; const formErrors = []; for (const sub of this.issues) if (sub.path.length > 0) { @@ -102860,27 +102005,27 @@ var ZodError3 = class ZodError4 extends Error { ZodError3.create = (issues) => { return new ZodError3(issues); }; -var errorMap3 = (issue3, _ctx) => { +var errorMap3 = (issue2, _ctx) => { let message; - switch (issue3.code) { + switch (issue2.code) { case ZodIssueCode3.invalid_type: - if (issue3.received === ZodParsedType3.undefined) message = "Required"; - else message = `Expected ${issue3.expected}, received ${issue3.received}`; + if (issue2.received === ZodParsedType3.undefined) message = "Required"; + else message = `Expected ${issue2.expected}, received ${issue2.received}`; break; case ZodIssueCode3.invalid_literal: - message = `Invalid literal value, expected ${JSON.stringify(issue3.expected, util$6.jsonStringifyReplacer)}`; + message = `Invalid literal value, expected ${JSON.stringify(issue2.expected, util$6.jsonStringifyReplacer)}`; break; case ZodIssueCode3.unrecognized_keys: - message = `Unrecognized key(s) in object: ${util$6.joinValues(issue3.keys, ", ")}`; + message = `Unrecognized key(s) in object: ${util$6.joinValues(issue2.keys, ", ")}`; break; case ZodIssueCode3.invalid_union: message = `Invalid input`; break; case ZodIssueCode3.invalid_union_discriminator: - message = `Invalid discriminator value. Expected ${util$6.joinValues(issue3.options)}`; + message = `Invalid discriminator value. Expected ${util$6.joinValues(issue2.options)}`; break; case ZodIssueCode3.invalid_enum_value: - message = `Invalid enum value. Expected ${util$6.joinValues(issue3.options)}, received '${issue3.received}'`; + message = `Invalid enum value. Expected ${util$6.joinValues(issue2.options)}, received '${issue2.received}'`; break; case ZodIssueCode3.invalid_arguments: message = `Invalid function arguments`; @@ -102892,29 +102037,29 @@ var errorMap3 = (issue3, _ctx) => { message = `Invalid date`; break; case ZodIssueCode3.invalid_string: - if (typeof issue3.validation === "object") if ("includes" in issue3.validation) { - message = `Invalid input: must include "${issue3.validation.includes}"`; - if (typeof issue3.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue3.validation.position}`; - } else if ("startsWith" in issue3.validation) message = `Invalid input: must start with "${issue3.validation.startsWith}"`; - else if ("endsWith" in issue3.validation) message = `Invalid input: must end with "${issue3.validation.endsWith}"`; - else util$6.assertNever(issue3.validation); - else if (issue3.validation !== "regex") message = `Invalid ${issue3.validation}`; + if (typeof issue2.validation === "object") if ("includes" in issue2.validation) { + message = `Invalid input: must include "${issue2.validation.includes}"`; + if (typeof issue2.validation.position === "number") message = `${message} at one or more positions greater than or equal to ${issue2.validation.position}`; + } else if ("startsWith" in issue2.validation) message = `Invalid input: must start with "${issue2.validation.startsWith}"`; + else if ("endsWith" in issue2.validation) message = `Invalid input: must end with "${issue2.validation.endsWith}"`; + else util$6.assertNever(issue2.validation); + else if (issue2.validation !== "regex") message = `Invalid ${issue2.validation}`; else message = "Invalid"; break; case ZodIssueCode3.too_small: - if (issue3.type === "array") message = `Array must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `more than`} ${issue3.minimum} element(s)`; - else if (issue3.type === "string") message = `String must contain ${issue3.exact ? "exactly" : issue3.inclusive ? `at least` : `over`} ${issue3.minimum} character(s)`; - else if (issue3.type === "number") message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; - else if (issue3.type === "bigint") message = `Number must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${issue3.minimum}`; - else if (issue3.type === "date") message = `Date must be ${issue3.exact ? `exactly equal to ` : issue3.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue3.minimum))}`; + if (issue2.type === "array") message = `Array must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `more than`} ${issue2.minimum} element(s)`; + else if (issue2.type === "string") message = `String must contain ${issue2.exact ? "exactly" : issue2.inclusive ? `at least` : `over`} ${issue2.minimum} character(s)`; + else if (issue2.type === "number") message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; + else if (issue2.type === "bigint") message = `Number must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${issue2.minimum}`; + else if (issue2.type === "date") message = `Date must be ${issue2.exact ? `exactly equal to ` : issue2.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue2.minimum))}`; else message = "Invalid input"; break; case ZodIssueCode3.too_big: - if (issue3.type === "array") message = `Array must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `less than`} ${issue3.maximum} element(s)`; - else if (issue3.type === "string") message = `String must contain ${issue3.exact ? `exactly` : issue3.inclusive ? `at most` : `under`} ${issue3.maximum} character(s)`; - else if (issue3.type === "number") message = `Number must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; - else if (issue3.type === "bigint") message = `BigInt must be ${issue3.exact ? `exactly` : issue3.inclusive ? `less than or equal to` : `less than`} ${issue3.maximum}`; - else if (issue3.type === "date") message = `Date must be ${issue3.exact ? `exactly` : issue3.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue3.maximum))}`; + if (issue2.type === "array") message = `Array must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `less than`} ${issue2.maximum} element(s)`; + else if (issue2.type === "string") message = `String must contain ${issue2.exact ? `exactly` : issue2.inclusive ? `at most` : `under`} ${issue2.maximum} character(s)`; + else if (issue2.type === "number") message = `Number must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; + else if (issue2.type === "bigint") message = `BigInt must be ${issue2.exact ? `exactly` : issue2.inclusive ? `less than or equal to` : `less than`} ${issue2.maximum}`; + else if (issue2.type === "date") message = `Date must be ${issue2.exact ? `exactly` : issue2.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue2.maximum))}`; else message = "Invalid input"; break; case ZodIssueCode3.custom: @@ -102924,14 +102069,14 @@ var errorMap3 = (issue3, _ctx) => { message = `Intersection results could not be merged`; break; case ZodIssueCode3.not_multiple_of: - message = `Number must be a multiple of ${issue3.multipleOf}`; + message = `Number must be a multiple of ${issue2.multipleOf}`; break; case ZodIssueCode3.not_finite: message = "Number must be finite"; break; default: message = _ctx.defaultError; - util$6.assertNever(issue3); + util$6.assertNever(issue2); } return { message }; }; @@ -102966,7 +102111,7 @@ var makeIssue3 = (params) => { }; function addIssueToContext3(ctx, issueData) { const overrideMap = getErrorMap3(); - const issue3 = makeIssue3({ + const issue2 = makeIssue3({ issueData, data: ctx.data, path: ctx.path, @@ -102977,7 +102122,7 @@ function addIssueToContext3(ctx, issueData) { overrideMap === en_default3 ? void 0 : en_default3 ].filter((x) => !!x) }); - ctx.common.issues.push(issue3); + ctx.common.issues.push(issue2); } var ParseStatus3 = class ParseStatus4 { constructor() { @@ -103411,9 +102556,9 @@ function datetimeRegex3(args3) { regex$1 = `${regex$1}(${opts.join("|")})`; return /* @__PURE__ */ new RegExp(`^${regex$1}$`); } -function isValidIP3(ip2, version3) { - if ((version3 === "v4" || !version3) && ipv4Regex3.test(ip2)) return true; - if ((version3 === "v6" || !version3) && ipv6Regex3.test(ip2)) return true; +function isValidIP3(ip2, version2) { + if ((version2 === "v4" || !version2) && ipv4Regex3.test(ip2)) return true; + if ((version2 === "v6" || !version2) && ipv6Regex3.test(ip2)) return true; return false; } function isValidJWT3(jwt, alg) { @@ -103421,8 +102566,8 @@ function isValidJWT3(jwt, alg) { try { const [header] = jwt.split("."); if (!header) return false; - const base644 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); - const decoded = JSON.parse(atob(base644)); + const base643 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "="); + const decoded = JSON.parse(atob(base643)); if (typeof decoded !== "object" || decoded === null) return false; if ("typ" in decoded && decoded?.typ !== "JWT") return false; if (!decoded.alg) return false; @@ -103432,9 +102577,9 @@ function isValidJWT3(jwt, alg) { return false; } } -function isValidCidr3(ip2, version3) { - if ((version3 === "v4" || !version3) && ipv4CidrRegex3.test(ip2)) return true; - if ((version3 === "v6" || !version3) && ipv6CidrRegex3.test(ip2)) return true; +function isValidCidr3(ip2, version2) { + if ((version2 === "v4" || !version2) && ipv4CidrRegex3.test(ip2)) return true; + if ((version2 === "v6" || !version2) && ipv6CidrRegex3.test(ip2)) return true; return false; } var ZodString3 = class ZodString4 extends ZodType3 { @@ -104854,9 +103999,9 @@ var ZodObject3 = class ZodObject4 extends ZodType3 { return new ZodObject4({ ...this._def, unknownKeys: "strict", - ...message !== void 0 ? { errorMap: (issue3, ctx) => { - const defaultError = this._def.errorMap?.(issue3, ctx).message ?? ctx.defaultError; - if (issue3.code === "unrecognized_keys") return { message: errorUtil3.errToObj(message).message ?? defaultError }; + ...message !== void 0 ? { errorMap: (issue2, ctx) => { + const defaultError = this._def.errorMap?.(issue2, ctx).message ?? ctx.defaultError; + if (issue2.code === "unrecognized_keys") return { message: errorUtil3.errToObj(message).message ?? defaultError }; return { message: defaultError }; } } : {} }); @@ -105513,7 +104658,7 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { }); return INVALID3; } - function makeArgsIssue(args3, error42) { + function makeArgsIssue(args3, error41) { return makeIssue3({ data: args3, path: ctx.path, @@ -105525,11 +104670,11 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { ].filter((x) => !!x), issueData: { code: ZodIssueCode3.invalid_arguments, - argumentsError: error42 + argumentsError: error41 } }); } - function makeReturnsIssue(returns, error42) { + function makeReturnsIssue(returns, error41) { return makeIssue3({ data: returns, path: ctx.path, @@ -105541,7 +104686,7 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { ].filter((x) => !!x), issueData: { code: ZodIssueCode3.invalid_return_type, - returnTypeError: error42 + returnTypeError: error41 } }); } @@ -105550,15 +104695,15 @@ var ZodFunction3 = class ZodFunction4 extends ZodType3 { if (this._def.returns instanceof ZodPromise3) { const me = this; return OK3(async function(...args3) { - const error42 = new ZodError3([]); + const error41 = new ZodError3([]); const parsedArgs = await me._def.args.parseAsync(args3, params).catch((e) => { - error42.addIssue(makeArgsIssue(args3, e)); - throw error42; + error41.addIssue(makeArgsIssue(args3, e)); + throw error41; }); const result = await Reflect.apply(fn2, this, parsedArgs); return await me._def.returns._def.type.parseAsync(result, params).catch((e) => { - error42.addIssue(makeReturnsIssue(result, e)); - throw error42; + error41.addIssue(makeReturnsIssue(result, e)); + throw error41; }); }); } else { @@ -106745,7 +105890,7 @@ var require_bytes = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/bytes@3.1. } }) }); var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/node_modules/depd/index.js": ((exports, module) => { - var relative = __require2("path").relative; + var relative2 = __require2("path").relative; module.exports = depd; var basePath = process.cwd(); function containsNamespace(str, namespace) { @@ -106895,7 +106040,7 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ return formatted; } function formatLocation(callSite) { - return relative(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2]; + return relative2(basePath, callSite[0]) + ":" + callSite[1] + ":" + callSite[2]; } function getStack() { var limit = Error.stackTraceLimit; @@ -106943,28 +106088,28 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ Object.defineProperty(obj, prop, descriptor); } function DeprecationError(namespace, message, stack) { - var error42 = /* @__PURE__ */ new Error(); + var error41 = /* @__PURE__ */ new Error(); var stackString; - Object.defineProperty(error42, "constructor", { value: DeprecationError }); - Object.defineProperty(error42, "message", { + Object.defineProperty(error41, "constructor", { value: DeprecationError }); + Object.defineProperty(error41, "message", { configurable: true, enumerable: false, value: message, writable: true }); - Object.defineProperty(error42, "name", { + Object.defineProperty(error41, "name", { enumerable: false, configurable: true, value: "DeprecationError", writable: true }); - Object.defineProperty(error42, "namespace", { + Object.defineProperty(error41, "namespace", { configurable: true, enumerable: false, value: namespace, writable: true }); - Object.defineProperty(error42, "stack", { + Object.defineProperty(error41, "stack", { configurable: true, enumerable: false, get: function() { @@ -106975,7 +106120,7 @@ var require_depd = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/depd@2.0.0/ stackString = val; } }); - return error42; + return error41; } }) }); var require_setprototypeof = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js": ((exports, module) => { @@ -115867,14 +115012,14 @@ var require_lib2 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/iconv-lite@ iconv$1.encodings = null; iconv$1.defaultCharUnicode = "\uFFFD"; iconv$1.defaultCharSingleByte = "?"; - iconv$1.encode = function encode3(str, encoding, options) { + iconv$1.encode = function encode2(str, encoding, options) { str = "" + (str || ""); var encoder = iconv$1.getEncoder(encoding, options); var res = encoder.write(str); var trail = encoder.end(); return trail && trail.length > 0 ? Buffer$1.concat([res, trail]) : res; }; - iconv$1.decode = function decode2(buf, encoding, options) { + iconv$1.decode = function decode(buf, encoding, options) { if (typeof buf === "string") { if (!iconv$1.skipDecodeWarning) { console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"); @@ -116106,8 +115251,8 @@ var require_raw_body = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/raw-bod type: "request.size.invalid" })); else { - var string4 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); - done(null, string4); + var string3 = decoder ? buffer$1 + (decoder.end() || "") : Buffer.concat(buffer$1); + done(null, string3); } } function cleanup() { @@ -116137,10 +115282,10 @@ var require_content_type = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/con var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g; var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g; var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; - exports.parse = parse6; - function parse6(string4) { - if (!string4) throw new TypeError("argument string is required"); - var header = typeof string4 === "object" ? getcontenttype(string4) : string4; + exports.parse = parse4; + function parse4(string3) { + if (!string3) throw new TypeError("argument string is required"); + var header = typeof string3 === "object" ? getcontenttype(string3) : string3; if (typeof header !== "string") throw new TypeError("argument string is required to be a string"); var index = header.indexOf(";"); var type2 = index !== -1 ? header.slice(0, index).trim() : header.trim(); @@ -116260,9 +115405,9 @@ data: ${relativeUrlWithSession} limit: MAXIMUM_MESSAGE_SIZE$1, encoding: (_c = ct.parameters.charset) !== null && _c !== void 0 ? _c : "utf-8" }); - } catch (error42) { - res.writeHead(400).end(String(error42)); - (_d = this.onerror) === null || _d === void 0 || _d.call(this, error42); + } catch (error41) { + res.writeHead(400).end(String(error41)); + (_d = this.onerror) === null || _d === void 0 || _d.call(this, error41); return; } try { @@ -116284,9 +115429,9 @@ data: ${relativeUrlWithSession} let parsedMessage; try { parsedMessage = JSONRPCMessageSchema3.parse(message); - } catch (error42) { - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error42); - throw error42; + } catch (error41) { + (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); + throw error41; } (_b = this.onmessage) === null || _b === void 0 || _b.call(this, parsedMessage, extra); } @@ -116427,9 +115572,9 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(this._standaloneSseStreamId); }); - res.on("error", (error42) => { + res.on("error", (error41) => { var _a; - (_a = this.onerror) === null || _a === void 0 || _a.call(this, error42); + (_a = this.onerror) === null || _a === void 0 || _a.call(this, error41); }); } /** @@ -116455,12 +115600,12 @@ var StreamableHTTPServerTransport = class { } } })); this._streamMapping.set(streamId, res); - res.on("error", (error42) => { + res.on("error", (error41) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error42); + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); }); - } catch (error42) { - (_b = this.onerror) === null || _b === void 0 || _b.call(this, error42); + } catch (error41) { + (_b = this.onerror) === null || _b === void 0 || _b.call(this, error41); } } /** @@ -116591,26 +115736,26 @@ var StreamableHTTPServerTransport = class { res.on("close", () => { this._streamMapping.delete(streamId); }); - res.on("error", (error42) => { + res.on("error", (error41) => { var _a$1; - (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error42); + (_a$1 = this.onerror) === null || _a$1 === void 0 || _a$1.call(this, error41); }); for (const message of messages) (_d = this.onmessage) === null || _d === void 0 || _d.call(this, message, { authInfo, requestInfo }); } - } catch (error42) { + } catch (error41) { res.writeHead(400).end(JSON.stringify({ jsonrpc: "2.0", error: { code: -32700, message: "Parse error", - data: String(error42) + data: String(error41) }, id: null })); - (_e = this.onerror) === null || _e === void 0 || _e.call(this, error42); + (_e = this.onerror) === null || _e === void 0 || _e.call(this, error41); } } /** @@ -116752,8 +115897,8 @@ var getBody = (request2) => { body = Buffer.concat(bodyParts).toString(); try { resolve$4(JSON.parse(body)); - } catch (error42) { - console.error("[mcp-proxy] error parsing body", error42); + } catch (error41) { + console.error("[mcp-proxy] error parsing body", error41); resolve$4(null); } }); @@ -116773,15 +115918,15 @@ var getWWWAuthenticateHeader = (oauth) => { if (!oauth?.protectedResource?.resource) return; return `Bearer resource_metadata="${oauth.protectedResource.resource}/.well-known/oauth-protected-resource"`; }; -var handleResponseError = (error42, res) => { - if (error42 instanceof Response) { +var handleResponseError = (error41, res) => { + if (error41 instanceof Response) { const fixedHeaders = {}; - error42.headers.forEach((value2, key$1) => { + error41.headers.forEach((value2, key$1) => { if (fixedHeaders[key$1]) if (Array.isArray(fixedHeaders[key$1])) fixedHeaders[key$1].push(value2); else fixedHeaders[key$1] = [fixedHeaders[key$1], value2]; else fixedHeaders[key$1] = value2; }); - res.writeHead(error42.status, error42.statusText, fixedHeaders).end(error42.statusText); + res.writeHead(error41.status, error41.statusText, fixedHeaders).end(error41.statusText); return true; } return false; @@ -116790,8 +115935,8 @@ var cleanupServer = async (server, onClose) => { if (onClose) await onClose(server); try { await server.close(); - } catch (error42) { - console.error("[mcp-proxy] error closing server", error42); + } catch (error41) { + console.error("[mcp-proxy] error closing server", error41); } }; var handleStreamRequest = async ({ activeTransports, authenticate, createServer: createServer2, enableJsonResponse, endpoint: endpoint2, eventStore, oauth, onClose, onConnect, req, res, stateless }) => { @@ -116818,9 +115963,9 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : "Unauthorized: Authentication error"; - console.error("Authentication error:", error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : "Unauthorized: Authentication error"; + console.error("Authentication error:", error41); res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); if (wwwAuthHeader) res.setHeader("WWW-Authenticate", wwwAuthHeader); @@ -116867,8 +116012,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: }; try { server = await createServer2(req); - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); @@ -116883,7 +116028,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - if (handleResponseError(error42, res)) return true; + if (handleResponseError(error41, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -116901,8 +116046,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: }); try { server = await createServer2(req); - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); if (errorMessage.includes("Authentication") || errorMessage.includes("Invalid JWT") || errorMessage.includes("Token") || errorMessage.includes("Unauthorized")) { res.setHeader("Content-Type", "application/json"); const wwwAuthHeader = getWWWAuthenticateHeader(oauth); @@ -116917,7 +116062,7 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: })); return true; } - if (handleResponseError(error42, res)) return true; + if (handleResponseError(error41, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -116932,8 +116077,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: } await transport.handleRequest(req, res, body); return true; - } catch (error42) { - console.error("[mcp-proxy] error handling request", error42); + } catch (error41) { + console.error("[mcp-proxy] error handling request", error41); res.setHeader("Content-Type", "application/json"); res.writeHead(500).end(createJsonRpcErrorResponse(-32603, "Internal Server Error")); } @@ -116972,8 +116117,8 @@ var handleStreamRequest = async ({ activeTransports, authenticate, createServer: try { await activeTransport.transport.handleRequest(req, res); await cleanupServer(activeTransport.server, onClose); - } catch (error42) { - console.error("[mcp-proxy] error handling delete request", error42); + } catch (error41) { + console.error("[mcp-proxy] error handling delete request", error41); res.writeHead(500).end("Error handling delete request"); } return true; @@ -116986,8 +116131,8 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e let server; try { server = await createServer2(req); - } catch (error42) { - if (handleResponseError(error42, res)) return true; + } catch (error41) { + if (handleResponseError(error41, res)) return true; res.writeHead(500).end("Error creating server"); return true; } @@ -117009,9 +116154,9 @@ var handleSSERequest = async ({ activeTransports, createServer: createServer2, e params: { message: "SSE Connection established" } }); if (onConnect) await onConnect(server); - } catch (error42) { + } catch (error41) { if (!closed) { - console.error("[mcp-proxy] error connecting to server", error42); + console.error("[mcp-proxy] error connecting to server", error41); res.writeHead(500).end("Error connecting to server"); } } @@ -117048,8 +116193,8 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, Accept, Mcp-Session-Id, Last-Event-Id"); res.setHeader("Access-Control-Expose-Headers", "Mcp-Session-Id"); - } catch (error42) { - console.error("[mcp-proxy] error parsing origin", error42); + } catch (error41) { + console.error("[mcp-proxy] error parsing origin", error41); } if (req.method === "OPTIONS") { res.writeHead(204); @@ -117101,9 +116246,9 @@ var startHTTPServer = async ({ apiKey, authenticate, createServer: createServer2 for (const transport of Object.values(activeSSETransports)) await transport.close(); for (const transport of Object.values(activeStreamTransports)) await transport.transport.close(); return new Promise((resolve$4, reject) => { - httpServer.close((error42) => { - if (error42) { - reject(error42); + httpServer.close((error41) => { + if (error41) { + reject(error41); return; } resolve$4(); @@ -117249,26 +116394,26 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ while (length--) result[length] = fn2(array[length]); return result; } - function mapDomain(string4, fn2) { - var parts = string4.split("@"); + function mapDomain(string3, fn2) { + var parts = string3.split("@"); var result = ""; if (parts.length > 1) { result = parts[0] + "@"; - string4 = parts[1]; + string3 = parts[1]; } - string4 = string4.replace(regexSeparators, "."); - var labels = string4.split("."); + string3 = string3.replace(regexSeparators, "."); + var labels = string3.split("."); var encoded = map$1(labels, fn2).join("."); return result + encoded; } - function ucs2decode(string4) { + function ucs2decode(string3) { var output = []; var counter = 0; - var length = string4.length; + var length = string3.length; while (counter < length) { - var value2 = string4.charCodeAt(counter++); + var value2 = string3.charCodeAt(counter++); if (value2 >= 55296 && value2 <= 56319 && counter < length) { - var extra = string4.charCodeAt(counter++); + var extra = string3.charCodeAt(counter++); if ((extra & 64512) == 56320) output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536); else { output.push(value2); @@ -117297,7 +116442,7 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ for (; delta > baseMinusTMin * tMax >> 1; k += base) delta = floor(delta / baseMinusTMin); return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; - var decode2 = function decode$1(input) { + var decode = function decode$1(input) { var output = []; var inputLength = input.length; var i$3 = 0; @@ -117331,7 +116476,7 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ } return String.fromCodePoint.apply(String, output); }; - var encode3 = function encode$1(input) { + var encode2 = function encode$1(input) { var output = []; input = ucs2decode(input); var inputLength = input.length; @@ -117422,13 +116567,13 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ return output.join(""); }; var toUnicode = function toUnicode$1(input) { - return mapDomain(input, function(string4) { - return regexPunycode.test(string4) ? decode2(string4.slice(4).toLowerCase()) : string4; + return mapDomain(input, function(string3) { + return regexPunycode.test(string3) ? decode(string3.slice(4).toLowerCase()) : string3; }); }; var toASCII = function toASCII$1(input) { - return mapDomain(input, function(string4) { - return regexNonASCII.test(string4) ? "xn--" + encode3(string4) : string4; + return mapDomain(input, function(string3) { + return regexNonASCII.test(string3) ? "xn--" + encode2(string3) : string3; }); }; var punycode = { @@ -117437,8 +116582,8 @@ var require_uri_all3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/uri-js@ "decode": ucs2decode, "encode": ucs2encode }, - "decode": decode2, - "encode": encode3, + "decode": decode, + "encode": encode2, "toASCII": toASCII, "toUnicode": toUnicode }; @@ -119189,8 +118334,8 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 "relative-json-pointer": RELATIVE_JSON_POINTER }; formats$1.full = { - date: date4, - time: time4, + date: date2, + time: time2, "date-time": date_time, uri, "uri-reference": URIREF, @@ -119209,7 +118354,7 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 function isLeapYear(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } - function date4(str) { + function date2(str) { var matches = str.match(DATE); if (!matches) return false; var year = +matches[1]; @@ -119217,7 +118362,7 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 var day = +matches[3]; return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); } - function time4(str, full) { + function time2(str, full) { var matches = str.match(TIME); if (!matches) return false; var hour = matches[1]; @@ -119229,7 +118374,7 @@ var require_formats3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.1 var DATE_TIME_SEPARATOR = /t|\s/i; function date_time(str) { var dateTime = str.split(DATE_TIME_SEPARATOR); - return dateTime.length == 2 && date4(dateTime[0]) && time4(dateTime[1], true); + return dateTime.length == 2 && date2(dateTime[0]) && time2(dateTime[1], true); } var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { @@ -121651,7 +120796,7 @@ var require_data5 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6 }; }) }); var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/node_modules/ajv/lib/ajv.js": ((exports, module) => { - var compileSchema = require_compile3(), resolve = require_resolve3(), Cache = require_cache4(), SchemaObject = require_schema_obj3(), stableStringify = require_fast_json_stable_stringify3(), formats = require_formats3(), rules = require_rules3(), $dataMetaSchema = require_data$1(), util3 = require_util10(); + var compileSchema = require_compile3(), resolve2 = require_resolve3(), Cache = require_cache4(), SchemaObject = require_schema_obj3(), stableStringify = require_fast_json_stable_stringify3(), formats = require_formats3(), rules = require_rules3(), $dataMetaSchema = require_data$1(), util3 = require_util10(); module.exports = Ajv$2; Ajv$2.prototype.validate = validate2; Ajv$2.prototype.compile = compile; @@ -121730,7 +120875,7 @@ var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/ } var id = this._getId(schema2); if (id !== void 0 && typeof id != "string") throw new Error("schema id must be string"); - key$1 = resolve.normalizeId(key$1 || id); + key$1 = resolve2.normalizeId(key$1 || id); checkUnique(this, key$1); this._schemas[key$1] = this._addSchema(schema2, _skipValidation, _meta, true); return this; @@ -121773,7 +120918,7 @@ var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/ } } function _getSchemaFragment(self2, ref) { - var res = resolve.schema.call(self2, { schema: {} }, ref); + var res = resolve2.schema.call(self2, { schema: {} }, ref); if (res) { var schema2 = res.schema, root2 = res.root, baseId = res.baseId; var v = compileSchema.call(self2, schema2, root2, void 0, baseId); @@ -121789,7 +120934,7 @@ var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/ } } function _getSchemaObj(self2, keyRef) { - keyRef = resolve.normalizeId(keyRef); + keyRef = resolve2.normalizeId(keyRef); return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; } function removeSchema(schemaKeyRef) { @@ -121816,7 +120961,7 @@ var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/ this._cache.del(cacheKey); var id = this._getId(schemaKeyRef); if (id) { - id = resolve.normalizeId(id); + id = resolve2.normalizeId(id); delete this._schemas[id]; delete this._refs[id]; } @@ -121836,15 +120981,15 @@ var require_ajv3 = /* @__PURE__ */ __commonJS3({ "node_modules/.pnpm/ajv@6.12.6/ if (typeof schema2 != "object" && typeof schema2 != "boolean") throw new Error("schema should be object or boolean"); var serialize = this._opts.serialize; var cacheKey = serialize ? serialize(schema2) : schema2; - var cached5 = this._cache.get(cacheKey); - if (cached5) return cached5; + var cached4 = this._cache.get(cacheKey); + if (cached4) return cached4; shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; - var id = resolve.normalizeId(this._getId(schema2)); + var id = resolve2.normalizeId(this._getId(schema2)); if (id && shouldAddSchema) checkUnique(this, id); var willValidate = this._opts.validateSchema !== false && !skipValidation; var recursiveMeta; - if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) this.validateSchema(schema2, true); - var localRefs = resolve.ids.call(this, schema2); + if (willValidate && !(recursiveMeta = id && id == resolve2.normalizeId(schema2.$schema))) this.validateSchema(schema2, true); + var localRefs = resolve2.ids.call(this, schema2); var schemaObj = new SchemaObject({ id, schema: schema2, @@ -122576,8 +121721,8 @@ var EventSourceParserStream = class extends TransformStream { onEvent: (event) => { controller.enqueue(event); }, - onError(error42) { - onError === "terminate" ? controller.error(error42) : typeof onError == "function" && onError(error42); + onError(error41) { + onError === "terminate" ? controller.error(error41) : typeof onError == "function" && onError(error41); }, onRetry, onComment @@ -122599,6 +121744,7 @@ import { setTimeout as delay } from "timers/promises"; init_index_CAcLDIRJ(); // ../node_modules/.pnpm/fastmcp@3.20.0_arktype@2.1.28_effect@3.18.4/node_modules/fastmcp/dist/FastMCP.js +init_zod(); var FastMCPError = class extends Error { constructor(message) { super(message); @@ -122743,7 +121889,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { tools, transportType, utils, - version: version3 + version: version2 }) { super(); this.#auth = auth2; @@ -122766,7 +121912,7 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } this.#capabilities.logging = {}; this.#server = new Server( - { name, version: version3 }, + { name, version: version2 }, { capabilities: this.#capabilities, instructions } ); this.#utils = utils; @@ -122800,8 +121946,8 @@ var FastMCPSession = class extends FastMCPSessionEventEmitter { } try { await this.#server.close(); - } catch (error42) { - this.#logger.error("[FastMCP error]", "could not close server", error42); + } catch (error41) { + this.#logger.error("[FastMCP error]", "could not close server", error41); } } async connect(transport) { @@ -122878,13 +122024,13 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` } this.#connectionState = "ready"; this.emit("ready"); - } catch (error42) { + } catch (error41) { this.#connectionState = "error"; const errorEvent = { - error: error42 instanceof Error ? error42 : new Error(String(error42)) + error: error41 instanceof Error ? error41 : new Error(String(error41)) }; this.emit("error", errorEvent); - throw error42; + throw error41; } } async requestSampling(message, options) { @@ -122899,7 +122045,7 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` new Error(`Connection is in ${this.#connectionState} state`) ); } - return new Promise((resolve, reject) => { + return new Promise((resolve2, reject) => { const timeout = setTimeout(() => { reject( new Error( @@ -122909,7 +122055,7 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }, 5e3); this.once("ready", () => { clearTimeout(timeout); - resolve(); + resolve2(); }); this.once("error", (event) => { clearTimeout(timeout); @@ -123055,8 +122201,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` }); } setupErrorHandling() { - this.#server.onerror = (error42) => { - this.#logger.error("[FastMCP error]", error42); + this.#server.onerror = (error41) => { + this.#logger.error("[FastMCP error]", error41); }; } setupLoggingHandlers() { @@ -123103,8 +122249,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` args3, this.#auth ); - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); throw new McpError( ErrorCode2.InternalError, `Failed to load prompt '${request2.params.name}': ${errorMessage}` @@ -123179,8 +122325,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` let maybeArrayResult; try { maybeArrayResult = await resource.load(this.#auth); - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); throw new McpError( ErrorCode2.InternalError, `Failed to load resource '${resource.name}' (${resource.uri}): ${errorMessage}`, @@ -123236,8 +122382,8 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` this.emit("rootsChanged", { roots: roots.roots }); - }).catch((error42) => { - if (error42 instanceof McpError && error42.code === ErrorCode2.MethodNotFound) { + }).catch((error41) => { + if (error41 instanceof McpError && error41.code === ErrorCode2.MethodNotFound) { this.#logger.debug( "[FastMCP debug] listRoots method not supported by client" ); @@ -123245,7 +122391,7 @@ ${e instanceof Error ? e.stack : JSON.stringify(e)}` this.#logger.error( `[FastMCP error] received error listing roots. -${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` +${error41 instanceof Error ? error41.stack : JSON.stringify(error41)}` ); } }); @@ -123291,9 +122437,9 @@ ${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` request2.params.arguments ); if (parsed2.issues) { - const friendlyErrors = this.#utils?.formatInvalidParamsErrorMessage ? this.#utils.formatInvalidParamsErrorMessage(parsed2.issues) : parsed2.issues.map((issue3) => { - const path4 = issue3.path?.join(".") || "root"; - return `${path4}: ${issue3.message}`; + const friendlyErrors = this.#utils?.formatInvalidParamsErrorMessage ? this.#utils.formatInvalidParamsErrorMessage(parsed2.issues) : parsed2.issues.map((issue2) => { + const path4 = issue2.path?.join(".") || "root"; + return `${path4}: ${issue2.message}`; }).join(", "); throw new McpError( ErrorCode2.InvalidParams, @@ -123315,7 +122461,7 @@ ${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` } }); if (this.#needsEventLoopFlush) { - await new Promise((resolve) => setImmediate(resolve)); + await new Promise((resolve2) => setImmediate(resolve2)); } } catch (progressError) { this.#logger.warn( @@ -123373,7 +122519,7 @@ ${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` } }); if (this.#needsEventLoopFlush) { - await new Promise((resolve) => setImmediate(resolve)); + await new Promise((resolve2) => setImmediate(resolve2)); } } catch (streamError) { this.#logger.warn( @@ -123422,15 +122568,15 @@ ${error42 instanceof Error ? error42.stack : JSON.stringify(error42)}` } else { result = ContentResultZodSchema.parse(maybeStringResult); } - } catch (error42) { - if (error42 instanceof UserError) { + } catch (error41) { + if (error41 instanceof UserError) { return { - content: [{ text: error42.message, type: "text" }], + content: [{ text: error41.message, type: "text" }], isError: true, - ...error42.extras ? { structuredContent: error42.extras } : {} + ...error41.extras ? { structuredContent: error41.extras } : {} }; } - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + const errorMessage = error41 instanceof Error ? error41.message : String(error41); return { content: [ { @@ -123556,8 +122702,8 @@ var FastMCP = class extends FastMCPEventEmitter { * Starts the server. */ async start(options) { - const config3 = this.#parseRuntimeConfig(options); - if (config3.transportType === "stdio") { + const config2 = this.#parseRuntimeConfig(options); + if (config2.transportType === "stdio") { const transport = new StdioServerTransport(); let auth2; if (this.#authenticate) { @@ -123565,10 +122711,10 @@ var FastMCP = class extends FastMCPEventEmitter { auth2 = await this.#authenticate( void 0 ); - } catch (error42) { + } catch (error41) { this.#logger.error( "[FastMCP error] Authentication failed for stdio transport:", - error42 instanceof Error ? error42.message : String(error42) + error41 instanceof Error ? error41.message : String(error41) ); } } @@ -123608,8 +122754,8 @@ var FastMCP = class extends FastMCPEventEmitter { this.emit("connect", { session }); - } else if (config3.transportType === "httpStream") { - const httpConfig = config3.httpStream; + } else if (config2.transportType === "httpStream") { + const httpConfig = config2.httpStream; if (httpConfig.stateless) { this.#logger.info( `[FastMCP info] Starting server in stateless mode on HTTP Stream at http://${httpConfig.host}:${httpConfig.port}${httpConfig.endpoint}` @@ -123774,8 +122920,8 @@ var FastMCP = class extends FastMCPEventEmitter { } return; } - } catch (error42) { - this.#logger.error("[FastMCP error] health endpoint error", error42); + } catch (error41) { + this.#logger.error("[FastMCP error] health endpoint error", error41); } } const oauthConfig = this.#options.oauth; @@ -123897,13 +123043,66 @@ function $(cmd, args3, options) { var CheckoutPr = type({ pull_number: type.number.describe("the pull request number to checkout") }); +async function checkoutPrBranch(ctx, pull_number) { + log.info(`\u{1F500} checking out PR #${pull_number}...`); + const pr = await ctx.octokit.rest.pulls.get({ + owner: ctx.owner, + repo: ctx.name, + pull_number + }); + const headRepo = pr.data.head.repo; + if (!headRepo) { + throw new Error(`PR #${pull_number} source repository was deleted`); + } + const isFork = headRepo.full_name !== pr.data.base.repo.full_name; + const baseBranch = pr.data.base.ref; + const headBranch = pr.data.head.ref; + const currentBranch = $("git", ["rev-parse", "--abbrev-ref", "HEAD"], { log: false }).trim(); + const alreadyOnBranch = currentBranch === headBranch; + if (alreadyOnBranch) { + log.info(`already on PR branch ${headBranch}, skipping checkout`); + } else { + log.info(`\u{1F4E5} fetching base branch (${baseBranch})...`); + $("git", ["fetch", "--no-tags", "origin", baseBranch]); + $("git", ["checkout", "-B", baseBranch, `origin/${baseBranch}`]); + log.info(`\u{1F33F} fetching PR #${pull_number} (${headBranch})...`); + $("git", ["fetch", "--no-tags", "origin", `pull/${pull_number}/head:${headBranch}`]); + $("git", ["checkout", headBranch]); + log.info(`\u2713 checked out PR #${pull_number}`); + } + if (alreadyOnBranch) { + log.info(`\u{1F4E5} fetching base branch (${baseBranch})...`); + $("git", ["fetch", "--no-tags", "origin", baseBranch]); + } + if (isFork) { + const remoteName = `pr-${pull_number}`; + const forkUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${headRepo.full_name}.git`; + try { + $("git", ["remote", "add", remoteName, forkUrl]); + log.info(`\u{1F4CC} added remote '${remoteName}' for fork ${headRepo.full_name}`); + } catch { + $("git", ["remote", "set-url", remoteName, forkUrl]); + log.info(`\u{1F4CC} updated remote '${remoteName}' for fork ${headRepo.full_name}`); + } + $("git", ["config", `branch.${headBranch}.pushRemote`, remoteName]); + log.info(`\u{1F4CC} configured branch '${headBranch}' to push to '${remoteName}'`); + if (!pr.data.maintainer_can_modify) { + log.warning( + `\u26A0\uFE0F fork PR has maintainer_can_modify=false - push operations will fail. ask the PR author to enable "Allow edits from maintainers" or the fork may be owned by an organization.` + ); + } + } else { + $("git", ["config", `branch.${headBranch}.pushRemote`, "origin"]); + } + ctx.toolState.prNumber = pull_number; +} function CheckoutPrTool(ctx) { return tool({ name: "checkout_pr", description: "Checkout a pull request branch locally. This fetches the PR branch and sets up push configuration for fork PRs. Use this when you need to work on an existing PR.", parameters: CheckoutPr, execute: execute(ctx, async ({ pull_number }) => { - log.info(`\u{1F500} checking out PR #${pull_number}...`); + await checkoutPrBranch(ctx, pull_number); const pr = await ctx.octokit.rest.pulls.get({ owner: ctx.owner, repo: ctx.name, @@ -123913,43 +123112,13 @@ function CheckoutPrTool(ctx) { if (!headRepo) { throw new Error(`PR #${pull_number} source repository was deleted`); } - const isFork = headRepo.full_name !== pr.data.base.repo.full_name; - const baseBranch = pr.data.base.ref; - const headBranch = pr.data.head.ref; - log.info(`\u{1F4E5} fetching base branch (${baseBranch})...`); - $("git", ["fetch", "--no-tags", "origin", baseBranch]); - log.info(`\u{1F33F} fetching PR #${pull_number} (${headBranch})...`); - $("git", ["fetch", "--no-tags", "origin", `pull/${pull_number}/head:${headBranch}`]); - $("git", ["checkout", headBranch]); - log.info(`\u2713 checked out PR #${pull_number}`); - if (isFork) { - const remoteName = `pr-${pull_number}`; - const forkUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${headRepo.full_name}.git`; - try { - $("git", ["remote", "add", remoteName, forkUrl]); - log.info(`\u{1F4CC} added remote '${remoteName}' for fork ${headRepo.full_name}`); - } catch { - $("git", ["remote", "set-url", remoteName, forkUrl]); - log.info(`\u{1F4CC} updated remote '${remoteName}' for fork ${headRepo.full_name}`); - } - $("git", ["config", `branch.${headBranch}.pushRemote`, remoteName]); - log.info(`\u{1F4CC} configured branch '${headBranch}' to push to '${remoteName}'`); - if (!pr.data.maintainer_can_modify) { - log.warning( - `\u26A0\uFE0F fork PR has maintainer_can_modify=false - push operations will fail. ask the PR author to enable "Allow edits from maintainers" or the fork may be owned by an organization.` - ); - } - } else { - $("git", ["config", `branch.${headBranch}.pushRemote`, "origin"]); - } - ctx.toolState.prNumber = pull_number; return { success: true, number: pr.data.number, title: pr.data.title, - base: baseBranch, - head: headBranch, - isFork, + base: pr.data.base.ref, + head: pr.data.head.ref, + isFork: headRepo.full_name !== pr.data.base.repo.full_name, maintainerCanModify: pr.data.maintainer_can_modify, url: pr.data.html_url, headRepo: headRepo.full_name @@ -124011,7 +123180,7 @@ function GetCheckSuiteLogsTool(ctx) { completed_at: job.completed_at, logs: logsText }; - } catch (error42) { + } catch (error41) { return { job_id: job.id, job_name: job.name, @@ -124019,7 +123188,7 @@ function GetCheckSuiteLogsTool(ctx) { conclusion: job.conclusion, started_at: job.started_at, completed_at: job.completed_at, - error: `failed to fetch logs: ${error42}` + error: `failed to fetch logs: ${error41}` }; } }) @@ -124055,8 +123224,72 @@ var DebugShellCommandTool = tool({ command: "git status", output: result.trim() }); - } catch (error42) { - return handleToolError(error42); + } catch (error41) { + return handleToolError(error41); + } + } +}); + +// mcp/files.ts +import { relative, resolve } from "node:path"; +var ListFiles = type({ + path: type.string.describe("The path to list files from (defaults to current directory)").default(".") +}); +var ListFilesTool = tool({ + name: "list_files", + description: "List files in the repository, including both git-tracked and untracked files. Useful for discovering the file structure and locating files, including newly created files that haven't been committed yet.", + parameters: ListFiles, + execute: async ({ path: path4 }) => { + try { + const pathStr = path4 ?? "."; + const cwd2 = process.cwd(); + let gitFiles = []; + let gitFailed = false; + try { + const gitArgs = pathStr === "." ? ["ls-files"] : ["ls-files", pathStr]; + const gitOutput = $("git", gitArgs, { log: false }); + gitFiles = gitOutput.split("\n").filter((f) => f.trim() !== "").map((f) => f.trim()); + } catch { + gitFailed = true; + } + let filesystemFiles = []; + let findFailed = false; + try { + const findOutput = $( + "find", + [pathStr, "-maxdepth", "3", "-not", "-path", "*/.*", "-type", "f"], + { log: false } + ); + filesystemFiles = findOutput.split("\n").filter((f) => f.trim() !== "").map((f) => { + const trimmed = f.trim(); + try { + return relative(cwd2, resolve(cwd2, trimmed)); + } catch { + return trimmed; + } + }); + } catch { + findFailed = true; + } + if (gitFailed && findFailed) { + return handleToolError( + new Error( + `Failed to list files: both git ls-files and find commands failed. Path: ${pathStr}, working directory: ${cwd2}` + ) + ); + } + const gitFilesSet = new Set(gitFiles); + const allFiles = [.../* @__PURE__ */ new Set([...gitFiles, ...filesystemFiles])].sort(); + const untrackedFiles = filesystemFiles.filter((f) => !gitFilesSet.has(f)); + const untrackedCount = untrackedFiles.length; + return handleToolSuccess({ + files: allFiles, + method: "combined", + trackedCount: gitFiles.length, + untrackedCount + }); + } catch (error41) { + return handleToolError(error41); } } }); @@ -124156,9 +123389,9 @@ function CommitFilesTool(ctx) { `Commit blocked: secrets detected in file ${file}. Please remove any sensitive information (API keys, tokens, passwords) before committing.` ); } - } catch (error42) { - if (error42 instanceof Error && error42.message.includes("Commit blocked")) { - throw error42; + } catch (error41) { + if (error41 instanceof Error && error41.message.includes("Commit blocked")) { + throw error41; } } } @@ -124366,12 +123599,12 @@ function IssueInfoTool(ctx) { description: "Retrieve GitHub issue information by issue number", parameters: IssueInfo, execute: execute(ctx, async ({ issue_number }) => { - const issue3 = await ctx.octokit.rest.issues.get({ + const issue2 = await ctx.octokit.rest.issues.get({ owner: ctx.owner, repo: ctx.name, issue_number }); - const data = issue3.data; + const data = issue2.data; ctx.toolState.issueNumber = issue_number; const hints = []; if (data.comments > 0) { @@ -124587,8 +123820,8 @@ function StartReviewTool(ctx) { reviewId = result.data.id; reviewNodeId = result.data.node_id; log.debug(`created new pending review: id=${reviewId}`); - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : String(error42); + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : String(error41); log.debug(`createReview failed: ${errorMessage}`); if (errorMessage.includes("pending review")) { log.debug(`pending review already exists, fetching existing review...`); @@ -124602,7 +123835,7 @@ function StartReviewTool(ctx) { reviewNodeId = existing.node_id; log.debug(`reusing existing pending review: id=${reviewId}`); } else { - throw error42; + throw error41; } } const scratchpadId = randomBytes(4).toString("hex"); @@ -124899,15 +124132,15 @@ function SelectModeTool(ctx) { // mcp/server.ts async function findAvailablePort(startPort) { const checkPort = (port2) => { - return new Promise((resolve) => { + return new Promise((resolve2) => { const server = createServer(); server.once("error", () => { server.close(); - resolve(false); + resolve2(false); }); server.listen(port2, () => { server.close(() => { - resolve(true); + resolve2(true); }); }); }); @@ -124949,7 +124182,8 @@ async function startMcpHttpServer(ctx) { AddLabelsTool(ctx), CreateBranchTool(ctx), CommitFilesTool(ctx), - PushBranchTool(ctx) + PushBranchTool(ctx), + ListFilesTool ]; if (!isProgressCommentDisabled(ctx)) { tools.push(ReportProgressTool(ctx)); @@ -125227,7 +124461,7 @@ async function detect(options = {}) { return null; } function getNameAndVer(pkg) { - const handelVer = (version3) => version3?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version3; + const handelVer = (version2) => version2?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version2; if (typeof pkg.packageManager === "string") { const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@"); return { name, ver: handelVer(ver) }; @@ -125249,17 +124483,17 @@ async function handlePackageManager(filepath, options) { if (nameAndVer) { const name = nameAndVer.name; const ver = nameAndVer.ver; - let version3 = ver; + let version2 = ver; if (name === "yarn" && ver && Number.parseInt(ver) > 1) { agent2 = "yarn@berry"; - version3 = "berry"; - return { name, agent: agent2, version: version3 }; + version2 = "berry"; + return { name, agent: agent2, version: version2 }; } else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) { agent2 = "pnpm@6"; - return { name, agent: agent2, version: version3 }; + return { name, agent: agent2, version: version2 }; } else if (AGENTS.includes(name)) { agent2 = name; - return { name, agent: agent2, version: version3 }; + return { name, agent: agent2, version: version2 }; } else { return options.onUnknown?.(pkg.packageManager) ?? null; } @@ -125443,12 +124677,12 @@ var installPythonDependencies = { return false; } const cwd2 = process.cwd(); - return PYTHON_CONFIGS.some((config3) => existsSync5(join10(cwd2, config3.file))); + return PYTHON_CONFIGS.some((config2) => existsSync5(join10(cwd2, config2.file))); }, run: async () => { const cwd2 = process.cwd(); - const config3 = PYTHON_CONFIGS.find((c) => existsSync5(join10(cwd2, c.file))); - if (!config3) { + const config2 = PYTHON_CONFIGS.find((c) => existsSync5(join10(cwd2, c.file))); + if (!config2) { return { language: "python", packageManager: "pip", @@ -125457,22 +124691,22 @@ var installPythonDependencies = { issues: ["no python config file found"] }; } - log.info(`\u{1F40D} detected python config: ${config3.file} (using ${config3.tool})`); - const isAvailable = await isCommandAvailable2(config3.tool); + log.info(`\u{1F40D} detected python config: ${config2.file} (using ${config2.tool})`); + const isAvailable = await isCommandAvailable2(config2.tool); if (!isAvailable) { - log.info(`${config3.tool} not found, attempting to install...`); - const installError = await installTool(config3.tool); + log.info(`${config2.tool} not found, attempting to install...`); + const installError = await installTool(config2.tool); if (installError) { return { language: "python", - packageManager: config3.tool, - configFile: config3.file, + packageManager: config2.tool, + configFile: config2.file, dependenciesInstalled: false, issues: [installError] }; } } - const [cmd, ...args3] = config3.installCmd; + const [cmd, ...args3] = config2.installCmd; log.info(`running: ${cmd} ${args3.join(" ")}`); const result = await spawn4({ cmd, @@ -125483,16 +124717,16 @@ var installPythonDependencies = { if (result.exitCode !== 0) { return { language: "python", - packageManager: config3.tool, - configFile: config3.file, + packageManager: config2.tool, + configFile: config2.file, dependenciesInstalled: false, issues: [result.stderr || `${cmd} exited with code ${result.exitCode}`] }; } return { language: "python", - packageManager: config3.tool, - configFile: config3.file, + packageManager: config2.tool, + configFile: config2.file, dependenciesInstalled: true, issues: [] }; @@ -125537,12 +124771,12 @@ function getProgressCommentIdFromEnv2() { return null; } async function reportErrorToComment({ - error: error42, + error: error41, title }) { const formattedError = title ? `${title} -${error42}` : `\u274C ${error42}`; +${error41}` : `\u274C ${error41}`; let commentId = getProgressCommentIdFromEnv2(); if (!commentId) { const runId = process.env.GITHUB_RUN_ID; @@ -125595,9 +124829,9 @@ function setupGitConfig() { }); } log.debug("setupGitConfig: \u2713 Git configuration set successfully (scoped to repo)"); - } catch (error42) { + } catch (error41) { log.warning( - `Failed to set git config: ${error42 instanceof Error ? error42.message : String(error42)}` + `Failed to set git config: ${error41 instanceof Error ? error41.message : String(error41)}` ); } } @@ -125613,9 +124847,16 @@ async function setupGit(ctx) { } catch { log.debug("no existing authentication headers to remove"); } + if (ctx.payload.event.is_pr !== true || !ctx.payload.event.issue_number) { + const originUrl2 = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${ctx.owner}/${ctx.name}.git`; + $("git", ["remote", "set-url", "origin", originUrl2], { cwd: repoDir }); + log.info("\u2713 Updated origin URL with authentication token"); + return; + } + const prNumber = ctx.payload.event.issue_number; const originUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${ctx.owner}/${ctx.name}.git`; $("git", ["remote", "set-url", "origin", originUrl], { cwd: repoDir }); - log.info("\u2713 updated origin URL with authentication token"); + await checkoutPrBranch(ctx, prNumber); } // utils/timer.ts @@ -125627,8 +124868,8 @@ var Timer = class { } checkpoint(name) { const now = Date.now(); - const duration4 = this.lastCheckpointTimestamp ? now - this.lastCheckpointTimestamp : now - this.initialTimestamp; - log.info(`${name}: ${duration4}ms`); + const duration2 = this.lastCheckpointTimestamp ? now - this.lastCheckpointTimestamp : now - this.initialTimestamp; + log.info(`${name}: ${duration2}ms`); this.lastCheckpointTimestamp = now; } }; @@ -125686,8 +124927,8 @@ To use "Fix \u{1F44D}s", add a \u{1F44D} reaction to one or more inline review c const result = await runAgent(ctx); const mainResult = await handleAgentResult(result); return mainResult; - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : "Unknown error occurred"; + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : "Unknown error occurred"; log.error(errorMessage); try { await reportErrorToComment({ error: errorMessage }); @@ -125980,8 +125221,8 @@ async function run() { if (!result.success) { throw new Error(result.error || "Agent execution failed"); } - } catch (error42) { - const errorMessage = error42 instanceof Error ? error42.message : "Unknown error occurred"; + } catch (error41) { + const errorMessage = error41 instanceof Error ? error41.message : "Unknown error occurred"; core3.setFailed(`Action failed: ${errorMessage}`); } } diff --git a/mcp/checkout.ts b/mcp/checkout.ts index 5ae0113..12c5072 100644 --- a/mcp/checkout.ts +++ b/mcp/checkout.ts @@ -20,6 +20,97 @@ export type CheckoutPrResult = { headRepo: string; }; +/** + * Shared helper to checkout a PR branch and configure fork remotes. + * Assumes origin remote is already configured with authentication. + */ +export async function checkoutPrBranch(ctx: Context, pull_number: number): Promise { + log.info(`πŸ”€ checking out PR #${pull_number}...`); + + // fetch PR metadata + const pr = await ctx.octokit.rest.pulls.get({ + owner: ctx.owner, + repo: ctx.name, + pull_number, + }); + + const headRepo = pr.data.head.repo; + if (!headRepo) { + throw new Error(`PR #${pull_number} source repository was deleted`); + } + + const isFork = headRepo.full_name !== pr.data.base.repo.full_name; + const baseBranch = pr.data.base.ref; + const headBranch = pr.data.head.ref; + + // check if we're already on the correct branch + const currentBranch = $("git", ["rev-parse", "--abbrev-ref", "HEAD"], { log: false }).trim(); + const alreadyOnBranch = currentBranch === headBranch; + + if (alreadyOnBranch) { + log.info(`already on PR branch ${headBranch}, skipping checkout`); + } else { + // fetch base branch so origin/ exists for diff operations + log.info(`πŸ“₯ fetching base branch (${baseBranch})...`); + $("git", ["fetch", "--no-tags", "origin", baseBranch]); + + // checkout base branch first to avoid "refusing to fetch into current branch" error + // -B creates or resets the branch to match origin/baseBranch + $("git", ["checkout", "-B", baseBranch, `origin/${baseBranch}`]); + + // fetch PR branch using pull/{n}/head refspec (works for both fork and same-repo PRs) + log.info(`🌿 fetching PR #${pull_number} (${headBranch})...`); + $("git", ["fetch", "--no-tags", "origin", `pull/${pull_number}/head:${headBranch}`]); + + // checkout the branch + $("git", ["checkout", headBranch]); + log.info(`βœ“ checked out PR #${pull_number}`); + } + + // ensure base branch is fetched (needed for diff operations) + // fetch if we skipped checkout (already on branch) - otherwise already fetched above + if (alreadyOnBranch) { + log.info(`πŸ“₯ fetching base branch (${baseBranch})...`); + $("git", ["fetch", "--no-tags", "origin", baseBranch]); + } + + // configure push remote for this branch + // NOTE: This always runs regardless of alreadyOnBranch, because setupGit doesn't configure + // fork remotes. This ensures fork PRs can push even when checkout_pr is called after setupGit. + if (isFork) { + const remoteName = `pr-${pull_number}`; + const forkUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${headRepo.full_name}.git`; + + // add fork as a named remote (ignore error if already exists) + try { + $("git", ["remote", "add", remoteName, forkUrl]); + log.info(`πŸ“Œ added remote '${remoteName}' for fork ${headRepo.full_name}`); + } catch { + // remote already exists, update its URL + $("git", ["remote", "set-url", remoteName, forkUrl]); + log.info(`πŸ“Œ updated remote '${remoteName}' for fork ${headRepo.full_name}`); + } + + // set branch push config so `git push` knows where to push + $("git", ["config", `branch.${headBranch}.pushRemote`, remoteName]); + log.info(`πŸ“Œ configured branch '${headBranch}' to push to '${remoteName}'`); + + // warn if maintainer can't modify (push will likely fail) + if (!pr.data.maintainer_can_modify) { + log.warning( + `⚠️ fork PR has maintainer_can_modify=false - push operations will fail. ` + + `ask the PR author to enable "Allow edits from maintainers" or the fork may be owned by an organization.` + ); + } + } else { + // for same-repo PRs, push to origin + $("git", ["config", `branch.${headBranch}.pushRemote`, "origin"]); + } + + // set PR context + ctx.toolState.prNumber = pull_number; +} + export function CheckoutPrTool(ctx: Context) { return tool({ name: "checkout_pr", @@ -27,9 +118,9 @@ export function CheckoutPrTool(ctx: Context) { "Checkout a pull request branch locally. This fetches the PR branch and sets up push configuration for fork PRs. Use this when you need to work on an existing PR.", parameters: CheckoutPr, execute: execute(ctx, async ({ pull_number }) => { - log.info(`πŸ”€ checking out PR #${pull_number}...`); + await checkoutPrBranch(ctx, pull_number); - // fetch PR metadata + // fetch PR metadata to return result const pr = await ctx.octokit.rest.pulls.get({ owner: ctx.owner, repo: ctx.name, @@ -41,63 +132,13 @@ export function CheckoutPrTool(ctx: Context) { throw new Error(`PR #${pull_number} source repository was deleted`); } - const isFork = headRepo.full_name !== pr.data.base.repo.full_name; - const baseBranch = pr.data.base.ref; - const headBranch = pr.data.head.ref; - - // fetch base branch so origin/ exists for diff operations - log.info(`πŸ“₯ fetching base branch (${baseBranch})...`); - $("git", ["fetch", "--no-tags", "origin", baseBranch]); - - // fetch PR branch using pull/{n}/head refspec (works for both fork and same-repo PRs) - log.info(`🌿 fetching PR #${pull_number} (${headBranch})...`); - $("git", ["fetch", "--no-tags", "origin", `pull/${pull_number}/head:${headBranch}`]); - - // checkout the branch - $("git", ["checkout", headBranch]); - log.info(`βœ“ checked out PR #${pull_number}`); - - // configure push remote for this branch - if (isFork) { - const remoteName = `pr-${pull_number}`; - const forkUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${headRepo.full_name}.git`; - - // add fork as a named remote (ignore error if already exists) - try { - $("git", ["remote", "add", remoteName, forkUrl]); - log.info(`πŸ“Œ added remote '${remoteName}' for fork ${headRepo.full_name}`); - } catch { - // remote already exists, update its URL - $("git", ["remote", "set-url", remoteName, forkUrl]); - log.info(`πŸ“Œ updated remote '${remoteName}' for fork ${headRepo.full_name}`); - } - - // set branch push config so `git push` knows where to push - $("git", ["config", `branch.${headBranch}.pushRemote`, remoteName]); - log.info(`πŸ“Œ configured branch '${headBranch}' to push to '${remoteName}'`); - - // warn if maintainer can't modify (push will likely fail) - if (!pr.data.maintainer_can_modify) { - log.warning( - `⚠️ fork PR has maintainer_can_modify=false - push operations will fail. ` + - `ask the PR author to enable "Allow edits from maintainers" or the fork may be owned by an organization.` - ); - } - } else { - // for same-repo PRs, push to origin - $("git", ["config", `branch.${headBranch}.pushRemote`, "origin"]); - } - - // set PR context - ctx.toolState.prNumber = pull_number; - return { success: true, number: pr.data.number, title: pr.data.title, - base: baseBranch, - head: headBranch, - isFork, + base: pr.data.base.ref, + head: pr.data.head.ref, + isFork: headRepo.full_name !== pr.data.base.repo.full_name, maintainerCanModify: pr.data.maintainer_can_modify, url: pr.data.html_url, headRepo: headRepo.full_name, diff --git a/mcp/files.ts b/mcp/files.ts index a0364b7..7a187fe 100644 --- a/mcp/files.ts +++ b/mcp/files.ts @@ -1,6 +1,7 @@ +import { relative, resolve } from "node:path"; import { type } from "arktype"; import { $ } from "../utils/shell.ts"; -import { handleToolError, handleToolSuccess, tool, type ToolResult } from "./shared.ts"; +import { handleToolError, handleToolSuccess, type ToolResult, tool } from "./shared.ts"; export const ListFiles = type({ path: type.string @@ -12,32 +13,81 @@ export const ListFiles = type({ export const ListFilesTool = tool({ name: "list_files", description: - "List files in the repository using git ls-files. Useful for discovering the file structure and locating files.", + "List files in the repository, including both git-tracked and untracked files. Useful for discovering the file structure and locating files, including newly created files that haven't been committed yet.", parameters: ListFiles, execute: async ({ path }: { path?: string }): Promise => { try { - // Use git ls-files to list tracked files - // This respects .gitignore and gives a clean list of source files const pathStr = path ?? "."; - const output = $("git", pathStr === "." ? ["ls-files"] : ["ls-files", pathStr], { - log: false, - }); - const files = output.split("\n").filter((f) => f.trim() !== ""); + const cwd = process.cwd(); - if (files.length === 0) { - // Fallback for non-git environments or untracked files + // Get git-tracked files + let gitFiles: string[] = []; + let gitFailed = false; + try { + const gitArgs = pathStr === "." ? ["ls-files"] : ["ls-files", pathStr]; + const gitOutput = $("git", gitArgs, { log: false }); + gitFiles = gitOutput + .split("\n") + .filter((f) => f.trim() !== "") + .map((f) => f.trim()); + } catch { + // git might fail, that's ok - we'll use find instead + gitFailed = true; + } + + // Always also check filesystem for untracked files + // This is important because newly created files won't be in git yet + let filesystemFiles: string[] = []; + let findFailed = false; + try { const findOutput = $( "find", [pathStr, "-maxdepth", "3", "-not", "-path", "*/.*", "-type", "f"], { log: false } ); - return handleToolSuccess({ - files: findOutput.split("\n").filter((f) => f.trim() !== ""), - method: "find", - }); + filesystemFiles = findOutput + .split("\n") + .filter((f) => f.trim() !== "") + .map((f) => { + const trimmed = f.trim(); + // normalize to relative paths for comparison + try { + return relative(cwd, resolve(cwd, trimmed)); + } catch { + return trimmed; + } + }); + } catch { + // find might fail, that's ok - we'll just use git files + findFailed = true; } - return handleToolSuccess({ files, method: "git" }); + // if both methods failed, return an error + if (gitFailed && findFailed) { + return handleToolError( + new Error( + `Failed to list files: both git ls-files and find commands failed. ` + + `Path: ${pathStr}, working directory: ${cwd}` + ) + ); + } + + // Create a Set of git files for efficient lookup + const gitFilesSet = new Set(gitFiles); + + // Combine both lists, removing duplicates + const allFiles = [...new Set([...gitFiles, ...filesystemFiles])].sort(); + + // Calculate actual untracked count (files in filesystem but not in git) + const untrackedFiles = filesystemFiles.filter((f) => !gitFilesSet.has(f)); + const untrackedCount = untrackedFiles.length; + + return handleToolSuccess({ + files: allFiles, + method: "combined", + trackedCount: gitFiles.length, + untrackedCount, + }); } catch (error) { return handleToolError(error); } diff --git a/mcp/server.ts b/mcp/server.ts index c9dd663..025d2d3 100644 --- a/mcp/server.ts +++ b/mcp/server.ts @@ -13,6 +13,7 @@ import { ReportProgressTool, } from "./comment.ts"; import { DebugShellCommandTool } from "./debug.ts"; +import { ListFilesTool } from "./files.ts"; import { CommitFilesTool, CreateBranchTool, PushBranchTool } from "./git.ts"; import { IssueTool } from "./issue.ts"; import { GetIssueCommentsTool } from "./issueComments.ts"; @@ -91,6 +92,7 @@ export async function startMcpHttpServer( CreateBranchTool(ctx), CommitFilesTool(ctx), PushBranchTool(ctx), + ListFilesTool, ]; // only include ReportProgressTool if progress comment is not disabled diff --git a/modes.ts b/modes.ts index 888c621..d499873 100644 --- a/modes.ts +++ b/modes.ts @@ -29,7 +29,7 @@ export function getModes({ prompt: `Follow these steps: 1. If the request requires understanding the codebase structure, dependencies, or conventions, gather relevant context. Read AGENTS.md if it exists, ${depsContext} run tests, run builds, and make changes according to best practices). Skip this step if the prompt is trivial and self-contained. -2. Create a branch using ${ghPullfrogMcpName}/create_branch. The branch name should be prefixed with "pullfrog/". The rest of the name should reflect the exact changes you are making. It should be specific to avoid collisions with other branches. Never commit directly to main, master, or production. Do NOT use git commands directly - always use ${ghPullfrogMcpName} MCP tools for git operations. +2. If this is a PR event, the PR branch is already checked out - skip branch creation. Otherwise, create a branch using ${ghPullfrogMcpName}/create_branch. The branch name should be prefixed with "pullfrog/". The rest of the name should reflect the exact changes you are making. It should be specific to avoid collisions with other branches. Never commit directly to main, master, or production. Do NOT use git commands directly (including \`git branch\`, \`git status\`, \`git log\`) - always use ${ghPullfrogMcpName} MCP tools for git operations. 3. Understand the requirements and any existing plan diff --git a/utils/setup.ts b/utils/setup.ts index 4f6ab48..8a9d1b8 100644 --- a/utils/setup.ts +++ b/utils/setup.ts @@ -1,6 +1,7 @@ import { execSync } from "node:child_process"; import { existsSync, rmSync } from "node:fs"; import type { Context } from "../main.ts"; +import { checkoutPrBranch } from "../mcp/checkout.ts"; import { log } from "./cli.ts"; import { $ } from "./shell.ts"; @@ -72,11 +73,11 @@ export function setupGitConfig(): void { /** * Setup git authentication for the repository. - * PR checkout is handled dynamically by the checkout_pr MCP tool. + * For PR events, uses the shared checkoutPrBranch helper (also used by checkout_pr MCP tool). * - * FORK PR ARCHITECTURE (handled by checkout_pr tool): + * FORK PR ARCHITECTURE: * - origin: always points to BASE REPO (where PR targets) - * - checkout_pr sets per-branch pushRemote config for fork PRs + * - checkoutPrBranch sets per-branch pushRemote config for fork PRs * - diff operations use: git diff origin/..HEAD */ export async function setupGit(ctx: Context): Promise { @@ -95,8 +96,21 @@ export async function setupGit(ctx: Context): Promise { log.debug("no existing authentication headers to remove"); } - // authenticate origin - needed for all fetch operations including PR fetches + // non-PR events: set up origin with token, stay on default branch + if (ctx.payload.event.is_pr !== true || !ctx.payload.event.issue_number) { + const originUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${ctx.owner}/${ctx.name}.git`; + $("git", ["remote", "set-url", "origin", originUrl], { cwd: repoDir }); + log.info("βœ“ Updated origin URL with authentication token"); + return; + } + + // PR event: checkout PR branch using shared helper + const prNumber = ctx.payload.event.issue_number; + + // ensure origin is configured with auth token before checkout const originUrl = `https://x-access-token:${ctx.githubInstallationToken}@github.com/${ctx.owner}/${ctx.name}.git`; $("git", ["remote", "set-url", "origin", originUrl], { cwd: repoDir }); - log.info("βœ“ updated origin URL with authentication token"); + + // use shared checkout helper (handles fork remotes, push config, etc.) + await checkoutPrBranch(ctx, prNumber); }