UNPKG

discord-guildpeek

Version:

Get a public preview of a Discord server from its invite code, without authentication.

1,668 lines (1,667 loc) 71.4 kB
function c(e, n, t) { function r(s, p) { var f; Object.defineProperty(s, "_zod", { value: s._zod ?? {}, enumerable: !1 }), (f = s._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), s._zod.traits.add(e), n(s, p); for (const $ in u.prototype) $ in s || Object.defineProperty(s, $, { value: u.prototype[$].bind(s) }); s._zod.constr = u, s._zod.def = p; } const o = t?.Parent ?? Object; class i extends o { } Object.defineProperty(i, "name", { value: e }); function u(s) { var p; const f = t?.Parent ? new i() : this; r(f, s), (p = f._zod).deferred ?? (p.deferred = []); for (const $ of f._zod.deferred) $(); return f; } return Object.defineProperty(u, "init", { value: r }), Object.defineProperty(u, Symbol.hasInstance, { value: (s) => t?.Parent && s instanceof t.Parent ? !0 : s?._zod?.traits?.has(e) }), Object.defineProperty(u, "name", { value: e }), u; } class R extends Error { constructor() { super("Encountered Promise during synchronous parse. Use .parseAsync() instead."); } } const Ne = {}; function P(e) { return Ne; } function on(e) { const n = Object.values(e).filter((r) => typeof r == "number"); return Object.entries(e).filter(([r, o]) => n.indexOf(+r) === -1).map(([r, o]) => o); } function te(e, n) { return typeof n == "bigint" ? n.toString() : n; } function Oe(e) { return { get value() { { const n = e(); return Object.defineProperty(this, "value", { value: n }), n; } } }; } function ce(e) { return e == null; } function se(e) { const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length; return e.slice(n, t); } function un(e, n) { const t = (e.toString().split(".")[1] || "").length, r = (n.toString().split(".")[1] || "").length, o = t > r ? t : r, i = Number.parseInt(e.toFixed(o).replace(".", "")), u = Number.parseInt(n.toFixed(o).replace(".", "")); return i % u / 10 ** o; } function d(e, n, t) { Object.defineProperty(e, n, { get() { { const r = t(); return e[n] = r, r; } }, set(r) { Object.defineProperty(e, n, { value: r // configurable: true, }); }, configurable: !0 }); } function T(e, n, t) { Object.defineProperty(e, n, { value: t, writable: !0, enumerable: !0, configurable: !0 }); } function D(...e) { const n = {}; for (const t of e) { const r = Object.getOwnPropertyDescriptors(t); Object.assign(n, r); } return Object.defineProperties({}, n); } function he(e) { return JSON.stringify(e); } const Ae = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => { }; function re(e) { return typeof e == "object" && e !== null && !Array.isArray(e); } const cn = Oe(() => { if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1; try { const e = Function; return new e(""), !0; } catch { return !1; } }); function oe(e) { if (re(e) === !1) return !1; const n = e.constructor; if (n === void 0) return !0; const t = n.prototype; return !(re(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1); } const sn = /* @__PURE__ */ new Set(["string", "number", "symbol"]); function Y(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function N(e, n, t) { const r = new e._zod.constr(n ?? e._zod.def); return (!n || t?.parent) && (r._zod.parent = e), r; } function a(e) { const n = e; if (!n) return {}; if (typeof n == "string") return { error: () => n }; if (n?.message !== void 0) { if (n?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params"); n.error = n.message; } return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n; } function an(e) { return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional"); } const ln = { 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] }; function pn(e, n) { const t = e._zod.def, r = D(e._zod.def, { get shape() { const o = {}; for (const i in n) { if (!(i in t.shape)) throw new Error(`Unrecognized key: "${i}"`); n[i] && (o[i] = t.shape[i]); } return T(this, "shape", o), o; }, checks: [] }); return N(e, r); } function hn(e, n) { const t = e._zod.def, r = D(e._zod.def, { get shape() { const o = { ...e._zod.def.shape }; for (const i in n) { if (!(i in t.shape)) throw new Error(`Unrecognized key: "${i}"`); n[i] && delete o[i]; } return T(this, "shape", o), o; }, checks: [] }); return N(e, r); } function fn(e, n) { if (!oe(n)) throw new Error("Invalid input to extend: expected a plain object"); const t = D(e._zod.def, { get shape() { const r = { ...e._zod.def.shape, ...n }; return T(this, "shape", r), r; }, checks: [] }); return N(e, t); } function dn(e, n) { const t = D(e._zod.def, { get shape() { const r = { ...e._zod.def.shape, ...n._zod.def.shape }; return T(this, "shape", r), r; }, get catchall() { return n._zod.def.catchall; }, checks: [] // delete existing checks }); return N(e, t); } function mn(e, n, t) { const r = D(n._zod.def, { get shape() { const o = n._zod.def.shape, i = { ...o }; if (t) for (const u in t) { if (!(u in o)) throw new Error(`Unrecognized key: "${u}"`); t[u] && (i[u] = e ? new e({ type: "optional", innerType: o[u] }) : o[u]); } else for (const u in o) i[u] = e ? new e({ type: "optional", innerType: o[u] }) : o[u]; return T(this, "shape", i), i; }, checks: [] }); return N(n, r); } function _n(e, n, t) { const r = D(n._zod.def, { get shape() { const o = n._zod.def.shape, i = { ...o }; if (t) for (const u in t) { if (!(u in i)) throw new Error(`Unrecognized key: "${u}"`); t[u] && (i[u] = new e({ type: "nonoptional", innerType: o[u] })); } else for (const u in o) i[u] = new e({ type: "nonoptional", innerType: o[u] }); return T(this, "shape", i), i; }, checks: [] }); return N(n, r); } function j(e, n = 0) { for (let t = n; t < e.issues.length; t++) if (e.issues[t]?.continue !== !0) return !0; return !1; } function De(e, n) { return n.map((t) => { var r; return (r = t).path ?? (r.path = []), t.path.unshift(e), t; }); } function M(e) { return typeof e == "string" ? e : e?.message; } function S(e, n, t) { const r = { ...e, path: e.path ?? [] }; if (!e.message) { const o = M(e.inst?._zod.def?.error?.(e)) ?? M(n?.error?.(e)) ?? M(t.customError?.(e)) ?? M(t.localeError?.(e)) ?? "Invalid input"; r.message = o; } return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r; } function ae(e) { return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown"; } function U(...e) { const [n, t, r] = e; return typeof n == "string" ? { message: n, code: "custom", input: t, inst: r } : { ...n }; } const je = (e, n) => { e.name = "$ZodError", Object.defineProperty(e, "_zod", { value: e._zod, enumerable: !1 }), Object.defineProperty(e, "issues", { value: n, enumerable: !1 }), e.message = JSON.stringify(n, te, 2), Object.defineProperty(e, "toString", { value: () => e.message, enumerable: !1 }); }, Ce = c("$ZodError", je), Re = c("$ZodError", je, { Parent: Error }); function vn(e, n = (t) => t.message) { const t = {}, r = []; for (const o of e.issues) o.path.length > 0 ? (t[o.path[0]] = t[o.path[0]] || [], t[o.path[0]].push(n(o))) : r.push(n(o)); return { formErrors: r, fieldErrors: t }; } function gn(e, n) { const t = n || function(i) { return i.message; }, r = { _errors: [] }, o = (i) => { for (const u of i.issues) if (u.code === "invalid_union" && u.errors.length) u.errors.map((s) => o({ issues: s })); else if (u.code === "invalid_key") o({ issues: u.issues }); else if (u.code === "invalid_element") o({ issues: u.issues }); else if (u.path.length === 0) r._errors.push(t(u)); else { let s = r, p = 0; for (; p < u.path.length; ) { const f = u.path[p]; p === u.path.length - 1 ? (s[f] = s[f] || { _errors: [] }, s[f]._errors.push(t(u))) : s[f] = s[f] || { _errors: [] }, s = s[f], p++; } } }; return o(e), r; } const bn = (e) => (n, t, r, o) => { const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, u = n._zod.run({ value: t, issues: [] }, i); if (u instanceof Promise) throw new R(); if (u.issues.length) { const s = new (o?.Err ?? e)(u.issues.map((p) => S(p, i, P()))); throw Ae(s, o?.callee), s; } return u.value; }, zn = (e) => async (n, t, r, o) => { const i = r ? Object.assign(r, { async: !0 }) : { async: !0 }; let u = n._zod.run({ value: t, issues: [] }, i); if (u instanceof Promise && (u = await u), u.issues.length) { const s = new (o?.Err ?? e)(u.issues.map((p) => S(p, i, P()))); throw Ae(s, o?.callee), s; } return u.value; }, Ue = (e) => (n, t, r) => { const o = r ? { ...r, async: !1 } : { async: !1 }, i = n._zod.run({ value: t, issues: [] }, o); if (i instanceof Promise) throw new R(); return i.issues.length ? { success: !1, error: new (e ?? Ce)(i.issues.map((u) => S(u, o, P()))) } : { success: !0, data: i.value }; }, wn = /* @__PURE__ */ Ue(Re), Fe = (e) => async (n, t, r) => { const o = r ? Object.assign(r, { async: !0 }) : { async: !0 }; let i = n._zod.run({ value: t, issues: [] }, o); return i instanceof Promise && (i = await i), i.issues.length ? { success: !1, error: new e(i.issues.map((u) => S(u, o, P()))) } : { success: !0, data: i.value }; }, Zn = /* @__PURE__ */ Fe(Re), $n = /^[cC][^\s-]{8,}$/, kn = /^[0-9a-z]+$/, yn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, In = /^[0-9a-vA-V]{20}$/, En = /^[A-Za-z0-9]{27}$/, xn = /^[a-zA-Z0-9_-]{21}$/, Pn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Sn = /^([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})$/, fe = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([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)$/, Tn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Nn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$"; function On() { return new RegExp(Nn, "u"); } const An = /^(?:(?: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])$/, Dn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, jn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Cn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Rn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Le = /^[A-Za-z0-9_-]*$/, Un = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Fn = /^\+(?:[0-9]){6,14}[0-9]$/, Me = "(?:(?:\\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])))", Ln = /* @__PURE__ */ new RegExp(`^${Me}$`); function Ve(e) { const n = "(?:[01]\\d|2[0-3]):[0-5]\\d"; return typeof e.precision == "number" ? e.precision === -1 ? `${n}` : e.precision === 0 ? `${n}:[0-5]\\d` : `${n}:[0-5]\\d\\.\\d{${e.precision}}` : `${n}(?::[0-5]\\d(?:\\.\\d+)?)?`; } function Mn(e) { return new RegExp(`^${Ve(e)}$`); } function Vn(e) { const n = Ve({ precision: e.precision }), t = ["Z"]; e.local && t.push(""), e.offset && t.push("([+-]\\d{2}:\\d{2})"); const r = `${n}(?:${t.join("|")})`; return new RegExp(`^${Me}T(?:${r})$`); } const Gn = (e) => { const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*"; return new RegExp(`^${n}$`); }, Bn = /^\d+$/, Wn = /^-?\d+(?:\.\d+)?/i, Jn = /true|false/i, Kn = /null/i, Yn = /^[^A-Z]*$/, Xn = /^[^a-z]*$/, y = /* @__PURE__ */ c("$ZodCheck", (e, n) => { var t; e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []); }), Ge = { number: "number", bigint: "bigint", object: "date" }, Be = /* @__PURE__ */ c("$ZodCheckLessThan", (e, n) => { y.init(e, n); const t = Ge[typeof n.value]; e._zod.onattach.push((r) => { const o = r._zod.bag, i = (n.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY; n.value < i && (n.inclusive ? o.maximum = n.value : o.exclusiveMaximum = n.value); }), e._zod.check = (r) => { (n.inclusive ? r.value <= n.value : r.value < n.value) || r.issues.push({ origin: t, code: "too_big", maximum: n.value, input: r.value, inclusive: n.inclusive, inst: e, continue: !n.abort }); }; }), We = /* @__PURE__ */ c("$ZodCheckGreaterThan", (e, n) => { y.init(e, n); const t = Ge[typeof n.value]; e._zod.onattach.push((r) => { const o = r._zod.bag, i = (n.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY; n.value > i && (n.inclusive ? o.minimum = n.value : o.exclusiveMinimum = n.value); }), e._zod.check = (r) => { (n.inclusive ? r.value >= n.value : r.value > n.value) || r.issues.push({ origin: t, code: "too_small", minimum: n.value, input: r.value, inclusive: n.inclusive, inst: e, continue: !n.abort }); }; }), qn = /* @__PURE__ */ c("$ZodCheckMultipleOf", (e, n) => { y.init(e, n), e._zod.onattach.push((t) => { var r; (r = t._zod.bag).multipleOf ?? (r.multipleOf = n.value); }), e._zod.check = (t) => { if (typeof t.value != typeof n.value) throw new Error("Cannot mix number and bigint in multiple_of check."); (typeof t.value == "bigint" ? t.value % n.value === BigInt(0) : un(t.value, n.value) === 0) || t.issues.push({ origin: typeof t.value, code: "not_multiple_of", divisor: n.value, input: t.value, inst: e, continue: !n.abort }); }; }), Hn = /* @__PURE__ */ c("$ZodCheckNumberFormat", (e, n) => { y.init(e, n), n.format = n.format || "float64"; const t = n.format?.includes("int"), r = t ? "int" : "number", [o, i] = ln[n.format]; e._zod.onattach.push((u) => { const s = u._zod.bag; s.format = n.format, s.minimum = o, s.maximum = i, t && (s.pattern = Bn); }), e._zod.check = (u) => { const s = u.value; if (t) { if (!Number.isInteger(s)) { u.issues.push({ expected: r, format: n.format, code: "invalid_type", input: s, inst: e }); return; } if (!Number.isSafeInteger(s)) { s > 0 ? u.issues.push({ input: s, code: "too_big", maximum: Number.MAX_SAFE_INTEGER, note: "Integers must be within the safe integer range.", inst: e, origin: r, continue: !n.abort }) : u.issues.push({ input: s, code: "too_small", minimum: Number.MIN_SAFE_INTEGER, note: "Integers must be within the safe integer range.", inst: e, origin: r, continue: !n.abort }); return; } } s < o && u.issues.push({ origin: "number", input: s, code: "too_small", minimum: o, inclusive: !0, inst: e, continue: !n.abort }), s > i && u.issues.push({ origin: "number", input: s, code: "too_big", maximum: i, inst: e }); }; }), Qn = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, n) => { var t; y.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => { const o = r.value; return !ce(o) && o.length !== void 0; }), e._zod.onattach.push((r) => { const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY; n.maximum < o && (r._zod.bag.maximum = n.maximum); }), e._zod.check = (r) => { const o = r.value; if (o.length <= n.maximum) return; const u = ae(o); r.issues.push({ origin: u, code: "too_big", maximum: n.maximum, inclusive: !0, input: o, inst: e, continue: !n.abort }); }; }), et = /* @__PURE__ */ c("$ZodCheckMinLength", (e, n) => { var t; y.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => { const o = r.value; return !ce(o) && o.length !== void 0; }), e._zod.onattach.push((r) => { const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY; n.minimum > o && (r._zod.bag.minimum = n.minimum); }), e._zod.check = (r) => { const o = r.value; if (o.length >= n.minimum) return; const u = ae(o); r.issues.push({ origin: u, code: "too_small", minimum: n.minimum, inclusive: !0, input: o, inst: e, continue: !n.abort }); }; }), nt = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, n) => { var t; y.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => { const o = r.value; return !ce(o) && o.length !== void 0; }), e._zod.onattach.push((r) => { const o = r._zod.bag; o.minimum = n.length, o.maximum = n.length, o.length = n.length; }), e._zod.check = (r) => { const o = r.value, i = o.length; if (i === n.length) return; const u = ae(o), s = i > n.length; r.issues.push({ origin: u, ...s ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length }, inclusive: !0, exact: !0, input: r.value, inst: e, continue: !n.abort }); }; }), X = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, n) => { var t, r; y.init(e, n), e._zod.onattach.push((o) => { const i = o._zod.bag; i.format = n.format, n.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(n.pattern)); }), n.pattern ? (t = e._zod).check ?? (t.check = (o) => { n.pattern.lastIndex = 0, !n.pattern.test(o.value) && o.issues.push({ origin: "string", code: "invalid_format", format: n.format, input: o.value, ...n.pattern ? { pattern: n.pattern.toString() } : {}, inst: e, continue: !n.abort }); }) : (r = e._zod).check ?? (r.check = () => { }); }), tt = /* @__PURE__ */ c("$ZodCheckRegex", (e, n) => { X.init(e, n), e._zod.check = (t) => { n.pattern.lastIndex = 0, !n.pattern.test(t.value) && t.issues.push({ origin: "string", code: "invalid_format", format: "regex", input: t.value, pattern: n.pattern.toString(), inst: e, continue: !n.abort }); }; }), rt = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, n) => { n.pattern ?? (n.pattern = Yn), X.init(e, n); }), ot = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, n) => { n.pattern ?? (n.pattern = Xn), X.init(e, n); }), it = /* @__PURE__ */ c("$ZodCheckIncludes", (e, n) => { y.init(e, n); const t = Y(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t); n.pattern = r, e._zod.onattach.push((o) => { const i = o._zod.bag; i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r); }), e._zod.check = (o) => { o.value.includes(n.includes, n.position) || o.issues.push({ origin: "string", code: "invalid_format", format: "includes", includes: n.includes, input: o.value, inst: e, continue: !n.abort }); }; }), ut = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, n) => { y.init(e, n); const t = new RegExp(`^${Y(n.prefix)}.*`); n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => { const o = r._zod.bag; o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t); }), e._zod.check = (r) => { r.value.startsWith(n.prefix) || r.issues.push({ origin: "string", code: "invalid_format", format: "starts_with", prefix: n.prefix, input: r.value, inst: e, continue: !n.abort }); }; }), ct = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, n) => { y.init(e, n); const t = new RegExp(`.*${Y(n.suffix)}$`); n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => { const o = r._zod.bag; o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t); }), e._zod.check = (r) => { r.value.endsWith(n.suffix) || r.issues.push({ origin: "string", code: "invalid_format", format: "ends_with", suffix: n.suffix, input: r.value, inst: e, continue: !n.abort }); }; }), st = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, n) => { y.init(e, n), e._zod.check = (t) => { t.value = n.tx(t.value); }; }); class at { constructor(n = []) { this.content = [], this.indent = 0, this && (this.args = n); } indented(n) { this.indent += 1, n(this), this.indent -= 1; } write(n) { if (typeof n == "function") { n(this, { execution: "sync" }), n(this, { execution: "async" }); return; } const r = n.split(` `).filter((u) => u), o = Math.min(...r.map((u) => u.length - u.trimStart().length)), i = r.map((u) => u.slice(o)).map((u) => " ".repeat(this.indent * 2) + u); for (const u of i) this.content.push(u); } compile() { const n = Function, t = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)]; return new n(...t, o.join(` `)); } } const lt = { major: 4, minor: 0, patch: 9 }, g = /* @__PURE__ */ c("$ZodType", (e, n) => { var t; e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = lt; const r = [...e._zod.def.checks ?? []]; e._zod.traits.has("$ZodCheck") && r.unshift(e); for (const o of r) for (const i of o._zod.onattach) i(e); if (r.length === 0) (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred?.push(() => { e._zod.run = e._zod.parse; }); else { const o = (i, u, s) => { let p = j(i), f; for (const $ of u) { if ($._zod.def.when) { if (!$._zod.def.when(i)) continue; } else if (p) continue; const h = i.issues.length, m = $._zod.check(i); if (m instanceof Promise && s?.async === !1) throw new R(); if (f || m instanceof Promise) f = (f ?? Promise.resolve()).then(async () => { await m, i.issues.length !== h && (p || (p = j(i, h))); }); else { if (i.issues.length === h) continue; p || (p = j(i, h)); } } return f ? f.then(() => i) : i; }; e._zod.run = (i, u) => { const s = e._zod.parse(i, u); if (s instanceof Promise) { if (u.async === !1) throw new R(); return s.then((p) => o(p, r, u)); } return o(s, r, u); }; } e["~standard"] = { validate: (o) => { try { const i = wn(e, o); return i.success ? { value: i.data } : { issues: i.error?.issues }; } catch { return Zn(e, o).then((u) => u.success ? { value: u.data } : { issues: u.error?.issues }); } }, vendor: "zod", version: 1 }; }), le = /* @__PURE__ */ c("$ZodString", (e, n) => { g.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Gn(e._zod.bag), e._zod.parse = (t, r) => { if (n.coerce) try { t.value = String(t.value); } catch { } return typeof t.value == "string" || t.issues.push({ expected: "string", code: "invalid_type", input: t.value, inst: e }), t; }; }), v = /* @__PURE__ */ c("$ZodStringFormat", (e, n) => { X.init(e, n), le.init(e, n); }), pt = /* @__PURE__ */ c("$ZodGUID", (e, n) => { n.pattern ?? (n.pattern = Sn), v.init(e, n); }), ht = /* @__PURE__ */ c("$ZodUUID", (e, n) => { if (n.version) { const r = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[n.version]; if (r === void 0) throw new Error(`Invalid UUID version: "${n.version}"`); n.pattern ?? (n.pattern = fe(r)); } else n.pattern ?? (n.pattern = fe()); v.init(e, n); }), ft = /* @__PURE__ */ c("$ZodEmail", (e, n) => { n.pattern ?? (n.pattern = Tn), v.init(e, n); }), dt = /* @__PURE__ */ c("$ZodURL", (e, n) => { v.init(e, n), e._zod.check = (t) => { try { const r = t.value.trim(), o = new URL(r); n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(o.hostname) || t.issues.push({ code: "invalid_format", format: "url", note: "Invalid hostname", pattern: Un.source, input: t.value, inst: e, continue: !n.abort })), n.protocol && (n.protocol.lastIndex = 0, n.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || t.issues.push({ code: "invalid_format", format: "url", note: "Invalid protocol", pattern: n.protocol.source, input: t.value, inst: e, continue: !n.abort })), n.normalize ? t.value = o.href : t.value = r; return; } catch { t.issues.push({ code: "invalid_format", format: "url", input: t.value, inst: e, continue: !n.abort }); } }; }), mt = /* @__PURE__ */ c("$ZodEmoji", (e, n) => { n.pattern ?? (n.pattern = On()), v.init(e, n); }), _t = /* @__PURE__ */ c("$ZodNanoID", (e, n) => { n.pattern ?? (n.pattern = xn), v.init(e, n); }), vt = /* @__PURE__ */ c("$ZodCUID", (e, n) => { n.pattern ?? (n.pattern = $n), v.init(e, n); }), gt = /* @__PURE__ */ c("$ZodCUID2", (e, n) => { n.pattern ?? (n.pattern = kn), v.init(e, n); }), bt = /* @__PURE__ */ c("$ZodULID", (e, n) => { n.pattern ?? (n.pattern = yn), v.init(e, n); }), zt = /* @__PURE__ */ c("$ZodXID", (e, n) => { n.pattern ?? (n.pattern = In), v.init(e, n); }), wt = /* @__PURE__ */ c("$ZodKSUID", (e, n) => { n.pattern ?? (n.pattern = En), v.init(e, n); }), Zt = /* @__PURE__ */ c("$ZodISODateTime", (e, n) => { n.pattern ?? (n.pattern = Vn(n)), v.init(e, n); }), $t = /* @__PURE__ */ c("$ZodISODate", (e, n) => { n.pattern ?? (n.pattern = Ln), v.init(e, n); }), kt = /* @__PURE__ */ c("$ZodISOTime", (e, n) => { n.pattern ?? (n.pattern = Mn(n)), v.init(e, n); }), yt = /* @__PURE__ */ c("$ZodISODuration", (e, n) => { n.pattern ?? (n.pattern = Pn), v.init(e, n); }), It = /* @__PURE__ */ c("$ZodIPv4", (e, n) => { n.pattern ?? (n.pattern = An), v.init(e, n), e._zod.onattach.push((t) => { const r = t._zod.bag; r.format = "ipv4"; }); }), Et = /* @__PURE__ */ c("$ZodIPv6", (e, n) => { n.pattern ?? (n.pattern = Dn), v.init(e, n), e._zod.onattach.push((t) => { const r = t._zod.bag; r.format = "ipv6"; }), e._zod.check = (t) => { try { new URL(`http://[${t.value}]`); } catch { t.issues.push({ code: "invalid_format", format: "ipv6", input: t.value, inst: e, continue: !n.abort }); } }; }), xt = /* @__PURE__ */ c("$ZodCIDRv4", (e, n) => { n.pattern ?? (n.pattern = jn), v.init(e, n); }), Pt = /* @__PURE__ */ c("$ZodCIDRv6", (e, n) => { n.pattern ?? (n.pattern = Cn), v.init(e, n), e._zod.check = (t) => { const [r, o] = t.value.split("/"); try { if (!o) throw new Error(); const i = Number(o); if (`${i}` !== o) throw new Error(); if (i < 0 || i > 128) throw new Error(); new URL(`http://[${r}]`); } catch { t.issues.push({ code: "invalid_format", format: "cidrv6", input: t.value, inst: e, continue: !n.abort }); } }; }); function Je(e) { if (e === "") return !0; if (e.length % 4 !== 0) return !1; try { return atob(e), !0; } catch { return !1; } } const St = /* @__PURE__ */ c("$ZodBase64", (e, n) => { n.pattern ?? (n.pattern = Rn), v.init(e, n), e._zod.onattach.push((t) => { t._zod.bag.contentEncoding = "base64"; }), e._zod.check = (t) => { Je(t.value) || t.issues.push({ code: "invalid_format", format: "base64", input: t.value, inst: e, continue: !n.abort }); }; }); function Tt(e) { if (!Le.test(e)) return !1; const n = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), t = n.padEnd(Math.ceil(n.length / 4) * 4, "="); return Je(t); } const Nt = /* @__PURE__ */ c("$ZodBase64URL", (e, n) => { n.pattern ?? (n.pattern = Le), v.init(e, n), e._zod.onattach.push((t) => { t._zod.bag.contentEncoding = "base64url"; }), e._zod.check = (t) => { Tt(t.value) || t.issues.push({ code: "invalid_format", format: "base64url", input: t.value, inst: e, continue: !n.abort }); }; }), Ot = /* @__PURE__ */ c("$ZodE164", (e, n) => { n.pattern ?? (n.pattern = Fn), v.init(e, n); }); function At(e, n = null) { try { const t = e.split("."); if (t.length !== 3) return !1; const [r] = t; if (!r) return !1; const o = JSON.parse(atob(r)); return !("typ" in o && o?.typ !== "JWT" || !o.alg || n && (!("alg" in o) || o.alg !== n)); } catch { return !1; } } const Dt = /* @__PURE__ */ c("$ZodJWT", (e, n) => { v.init(e, n), e._zod.check = (t) => { At(t.value, n.alg) || t.issues.push({ code: "invalid_format", format: "jwt", input: t.value, inst: e, continue: !n.abort }); }; }), Ke = /* @__PURE__ */ c("$ZodNumber", (e, n) => { g.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? Wn, e._zod.parse = (t, r) => { if (n.coerce) try { t.value = Number(t.value); } catch { } const o = t.value; if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o)) return t; const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0; return t.issues.push({ expected: "number", code: "invalid_type", input: o, inst: e, ...i ? { received: i } : {} }), t; }; }), jt = /* @__PURE__ */ c("$ZodNumber", (e, n) => { Hn.init(e, n), Ke.init(e, n); }), Ct = /* @__PURE__ */ c("$ZodBoolean", (e, n) => { g.init(e, n), e._zod.pattern = Jn, e._zod.parse = (t, r) => { if (n.coerce) try { t.value = !!t.value; } catch { } const o = t.value; return typeof o == "boolean" || t.issues.push({ expected: "boolean", code: "invalid_type", input: o, inst: e }), t; }; }), Rt = /* @__PURE__ */ c("$ZodNull", (e, n) => { g.init(e, n), e._zod.pattern = Kn, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, r) => { const o = t.value; return o === null || t.issues.push({ expected: "null", code: "invalid_type", input: o, inst: e }), t; }; }), Ut = /* @__PURE__ */ c("$ZodUnknown", (e, n) => { g.init(e, n), e._zod.parse = (t) => t; }), Ft = /* @__PURE__ */ c("$ZodNever", (e, n) => { g.init(e, n), e._zod.parse = (t, r) => (t.issues.push({ expected: "never", code: "invalid_type", input: t.value, inst: e }), t); }); function de(e, n, t) { e.issues.length && n.issues.push(...De(t, e.issues)), n.value[t] = e.value; } const Lt = /* @__PURE__ */ c("$ZodArray", (e, n) => { g.init(e, n), e._zod.parse = (t, r) => { const o = t.value; if (!Array.isArray(o)) return t.issues.push({ expected: "array", code: "invalid_type", input: o, inst: e }), t; t.value = Array(o.length); const i = []; for (let u = 0; u < o.length; u++) { const s = o[u], p = n.element._zod.run({ value: s, issues: [] }, r); p instanceof Promise ? i.push(p.then((f) => de(f, t, u))) : de(p, t, u); } return i.length ? Promise.all(i).then(() => t) : t; }; }); function V(e, n, t, r) { e.issues.length && n.issues.push(...De(t, e.issues)), e.value === void 0 ? t in r && (n.value[t] = void 0) : n.value[t] = e.value; } const Mt = /* @__PURE__ */ c("$ZodObject", (e, n) => { g.init(e, n); const t = Oe(() => { const h = Object.keys(n.shape); for (const _ of h) if (!(n.shape[_] instanceof g)) throw new Error(`Invalid element at key "${_}": expected a Zod schema`); const m = an(n.shape); return { shape: n.shape, keys: h, keySet: new Set(h), numKeys: h.length, optionalKeys: new Set(m) }; }); d(e._zod, "propValues", () => { const h = n.shape, m = {}; for (const _ in h) { const I = h[_]._zod; if (I.values) { m[_] ?? (m[_] = /* @__PURE__ */ new Set()); for (const x of I.values) m[_].add(x); } } return m; }); const r = (h) => { const m = new at(["shape", "payload", "ctx"]), _ = t.value, I = (E) => { const w = he(E); return `shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`; }; m.write("const input = payload.value;"); const x = /* @__PURE__ */ Object.create(null); let H = 0; for (const E of _.keys) x[E] = `key_${H++}`; m.write("const newResult = {}"); for (const E of _.keys) { const w = x[E], k = he(E); m.write(`const ${w} = ${I(E)};`), m.write(` if (${w}.issues.length) { payload.issues = payload.issues.concat(${w}.issues.map(iss => ({ ...iss, path: iss.path ? [${k}, ...iss.path] : [${k}] }))); } if (${w}.value === undefined) { if (${k} in input) { newResult[${k}] = undefined; } } else { newResult[${k}] = ${w}.value; } `); } m.write("payload.value = newResult;"), m.write("return payload;"); const L = m.compile(); return (E, w) => L(h, E, w); }; let o; const i = re, u = !Ne.jitless, p = u && cn.value, f = n.catchall; let $; e._zod.parse = (h, m) => { $ ?? ($ = t.value); const _ = h.value; if (!i(_)) return h.issues.push({ expected: "object", code: "invalid_type", input: _, inst: e }), h; const I = []; if (u && p && m?.async === !1 && m.jitless !== !0) o || (o = r(n.shape)), h = o(h, m); else { h.value = {}; const w = $.shape; for (const k of $.keys) { const Q = w[k]._zod.run({ value: _[k], issues: [] }, m); Q instanceof Promise ? I.push(Q.then((rn) => V(rn, h, k, _))) : V(Q, h, k, _); } } if (!f) return I.length ? Promise.all(I).then(() => h) : h; const x = [], H = $.keySet, L = f._zod, E = L.def.type; for (const w of Object.keys(_)) { if (H.has(w)) continue; if (E === "never") { x.push(w); continue; } const k = L.run({ value: _[w], issues: [] }, m); k instanceof Promise ? I.push(k.then((pe) => V(pe, h, w, _))) : V(k, h, w, _); } return x.length && h.issues.push({ code: "unrecognized_keys", keys: x, input: _, inst: e }), I.length ? Promise.all(I).then(() => h) : h; }; }); function me(e, n, t, r) { for (const i of e) if (i.issues.length === 0) return n.value = i.value, n; const o = e.filter((i) => !j(i)); return o.length === 1 ? (n.value = o[0].value, o[0]) : (n.issues.push({ code: "invalid_union", input: n.value, inst: t, errors: e.map((i) => i.issues.map((u) => S(u, r, P()))) }), n); } const Vt = /* @__PURE__ */ c("$ZodUnion", (e, n) => { g.init(e, n), d(e._zod, "optin", () => n.options.some((t) => t._zod.optin === "optional") ? "optional" : void 0), d(e._zod, "optout", () => n.options.some((t) => t._zod.optout === "optional") ? "optional" : void 0), d(e._zod, "values", () => { if (n.options.every((t) => t._zod.values)) return new Set(n.options.flatMap((t) => Array.from(t._zod.values))); }), d(e._zod, "pattern", () => { if (n.options.every((t) => t._zod.pattern)) { const t = n.options.map((r) => r._zod.pattern); return new RegExp(`^(${t.map((r) => se(r.source)).join("|")})$`); } }), e._zod.parse = (t, r) => { let o = !1; const i = []; for (const u of n.options) { const s = u._zod.run({ value: t.value, issues: [] }, r); if (s instanceof Promise) i.push(s), o = !0; else { if (s.issues.length === 0) return s; i.push(s); } } return o ? Promise.all(i).then((u) => me(u, t, e, r)) : me(i, t, e, r); }; }), Gt = /* @__PURE__ */ c("$ZodIntersection", (e, n) => { g.init(e, n), e._zod.parse = (t, r) => { const o = t.value, i = n.left._zod.run({ value: o, issues: [] }, r), u = n.right._zod.run({ value: o, issues: [] }, r); return i instanceof Promise || u instanceof Promise ? Promise.all([i, u]).then(([p, f]) => _e(t, p, f)) : _e(t, i, u); }; }); function ie(e, n) { if (e === n) return { valid: !0, data: e }; if (e instanceof Date && n instanceof Date && +e == +n) return { valid: !0, data: e }; if (oe(e) && oe(n)) { const t = Object.keys(n), r = Object.keys(e).filter((i) => t.indexOf(i) !== -1), o = { ...e, ...n }; for (const i of r) { const u = ie(e[i], n[i]); if (!u.valid) return { valid: !1, mergeErrorPath: [i, ...u.mergeErrorPath] }; o[i] = u.data; } return { valid: !0, data: o }; } if (Array.isArray(e) && Array.isArray(n)) { if (e.length !== n.length) return { valid: !1, mergeErrorPath: [] }; const t = []; for (let r = 0; r < e.length; r++) { const o = e[r], i = n[r], u = ie(o, i); if (!u.valid) return { valid: !1, mergeErrorPath: [r, ...u.mergeErrorPath] }; t.push(u.data); } return { valid: !0, data: t }; } return { valid: !1, mergeErrorPath: [] }; } function _e(e, n, t) { if (n.issues.length && e.issues.push(...n.issues), t.issues.length && e.issues.push(...t.issues), j(e)) return e; const r = ie(n.value, t.value); if (!r.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`); return e.value = r.data, e; } const Bt = /* @__PURE__ */ c("$ZodEnum", (e, n) => { g.init(e, n); const t = on(n.entries), r = new Set(t); e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((o) => sn.has(typeof o)).map((o) => typeof o == "string" ? Y(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => { const u = o.value; return r.has(u) || o.issues.push({ code: "invalid_value", values: t, input: u, inst: e }), o; }; }), Wt = /* @__PURE__ */ c("$ZodTransform", (e, n) => { g.init(e, n), e._zod.parse = (t, r) => { const o = n.transform(t.value, t); if (r.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((u) => (t.value = u, t)); if (o instanceof Promise) throw new R(); return t.value = o, t; }; }), Jt = /* @__PURE__ */ c("$ZodOptional", (e, n) => { g.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", d(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), d(e._zod, "pattern", () => { const t = n.innerType._zod.pattern; return t ? new RegExp(`^(${se(t.source)})?$`) : void 0; }), e._zod.parse = (t, r) => n.innerType._zod.optin === "optional" ? n.innerType._zod.run(t, r) : t.value === void 0 ? t : n.innerType._zod.run(t, r); }), Kt = /* @__PURE__ */ c("$ZodNullable", (e, n) => { g.init(e, n), d(e._zod, "optin", () => n.innerType._zod.optin), d(e._zod, "optout", () => n.innerType._zod.optout), d(e._zod, "pattern", () => { const t = n.innerType._zod.pattern; return t ? new RegExp(`^(${se(t.source)}|null)$`) : void 0; }), d(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r); }), Yt = /* @__PURE__ */ c("$ZodDefault", (e, n) => { g.init(e, n), e._zod.optin = "optional", d(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => { if (t.value === void 0) return t.value = n.defaultValue, t; const o = n.innerType._zod.run(t, r); return o instanceof Promise ? o.then((i) => ve(i, n)) : ve(o, n); }; }); function ve(e, n) { return e.value === void 0 && (e.value = n.defaultValue), e; } const Xt = /* @__PURE__ */ c("$ZodPrefault", (e, n) => { g.init(e, n), e._zod.optin = "optional", d(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r)); }), qt = /* @__PURE__ */ c("$ZodNonOptional", (e, n) => { g.init(e, n), d(e._zod, "values", () => { const t = n.innerType._zod.values; return t ? new Set([...t].filter((r) => r !== void 0)) : void 0; }), e._zod.parse = (t, r) => { const o = n.innerType._zod.run(t, r); return o instanceof Promise ? o.then((i) => ge(i, e)) : ge(o, e); }; }); function ge(e, n) { return !e.issues.length && e.value === void 0 && e.issues.push({ code: "invalid_type", expected: "nonoptional", input: e.value, inst: n }), e; } const Ht = /* @__PURE__ */ c("$ZodCatch", (e, n) => { g.init(e, n), d(e._zod, "optin", () => n.innerType._zod.optin), d(e._zod, "optout", () => n.innerType._zod.optout), d(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => { const o = n.innerType._zod.run(t, r); return o instanceof Promise ? o.then((i) => (t.value = i.value, i.issues.length && (t.value = n.catchValue({ ...t, error: { issues: i.issues.map((u) => S(u, r, P())) }, input: t.value }), t.issues = []), t)) : (t.value = o.value, o.issues.length && (t.value = n.catchValue({ ...t, error: { issues: o.issues.map((i) => S(i, r, P())) }, input: t.value }), t.issues = []), t); }; }), Qt = /* @__PURE__ */ c("$ZodPipe", (e, n) => { g.init(e, n), d(e._zod, "values", () => n.in._zod.values), d(e._zod, "optin", () => n.in._zod.optin), d(e._zod, "optout", () => n.out._zod.optout), d(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => { const o = n.in._zod.run(t, r); return o instanceof Promise ? o.then((i) => be(i, n, r)) : be(o, n, r); }; }); function be(e, n, t) { return e.issues.length ? e : n.out._zod.run({ value: e.value, issues: e.issues }, t); } const er = /* @__PURE__ */ c("$ZodReadonly", (e, n) => { g.init(e, n), d(e._zod, "propValues", () => n.innerType._zod.propValues), d(e._zod, "values", () => n.innerType._zod.values), d(e._zod, "optin", () => n.innerType._zod.optin), d(e._zod, "optout", () => n.innerType._zod.optout), e._zod.parse = (t, r) => { const o = n.innerType._zod.run(t, r); return o instanceof Promise ? o.then(ze) : ze(o); }; }); function ze(e) { return e.value = Object.freeze(e.value), e; } const nr = /* @__PURE__ */ c("$ZodCustom", (e, n) => { y.init(e, n), g.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => { const r = t.value, o = n.fn(r); if (o instanceof Promise) return o.then((i) => we(i, t, r, e)); we(o, t, r, e); }; }); function we(e, n, t, r) { if (!e) { const o = { code: "custom", input: t, inst: r, // incorporates params.error into issue reporting path: [...r._zod.def.path ?? []], // incorporates params.error into issue reporting continue: !r._zod.def.abort // params: inst._zod.def.params, }; r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(U(o)); } } class tr { constructor() { this._map = /* @__PURE__ */ new Map(), this._idmap = /* @__PURE__ */ new Map(); } add(n, ...t) { const r = t[0]; if (this._map.set(n, r), r && typeof r == "object" && "id" in r) { if (this._idmap.has(r.id)) throw new Error(`ID ${r.id} already exists in the registry`); this._idmap.set(r.id, n); } return this; } clear() { return this._map = /* @__PURE__ */ new Map(), this._idmap = /* @__PURE__ */ new Map(), this; } remove(n) { const t = this._map.get(n); return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(n), this; } get(n) { const t = n._zod.parent; if (t) { const r = { ...this.get(t) ?? {} }; delete r.id; const o = { ...r, ...this._map.get(n) }; return Object.keys(o).length ? o : void 0; } return this._map.get(n); } has(n) { return this._map.has(n); } } function rr() { return new tr(); } const G = /* @__PURE__ */ rr(); function or(e, n) { return new e({ type: "string", ...a(n) }); } function ir(e, n) { return new e({ type: "string", format: "email", check: "string_format", abort: !1, ...a(n) }); } function Ze(e, n) { return new e({ type: "string", format: "guid", check: "string_format", abort: !1, ...a(n) }); } function ur(e, n) { return new e({ type: "string", format: "uuid", check: "string_format", abort: !1, ...a(n) }); } function cr(e, n) { return new e({ type: "string", format: "uuid", check: "string_format", abort: !1, version: "v4", ...a(n) }); } function sr(e, n) { return new e({ type: "string", format: "uuid", check: "string_format", abort: !1, version: "v6", ...a(n) }); } function ar(e, n) { return new e({ type: "string", format: "uuid", check: "string_format", abort: !1, version: "v7", ...a(n) }); } function lr(e, n) { return new e({ type: "string", format: "url", check: "string_format", abort: !1, ...a(n) }); } function pr(e, n) { return new e({ type: "string", format: "emoji", check: "string_format", abort: !1, ...a(n) }); } function hr(e, n) { return new e({ type: "string", format: "nanoid", check: "string_format", abort: !1, ...a(n) }); } function fr(e, n) { return new e({ type: "string", format: "cuid", check: "string_format", abort: !1, ...a(n) }); } function dr(e, n) { return new e({ type: "string", format: "cuid2", check: "string_format", abort: !1, ...a(n) }); } function mr(e, n) { return new e({ type: "string", format: "ulid", check: "string_format", abort: !1, ...a(n) }); } function _r(e, n) { return new e({ type: "string", format: "xid", check: "string_format", abort: !1, ...a(n) }); } function vr(e, n) { return new e({ type: "string", format: "ksuid", check: "string_format", abort: !1, ...a(n) }); } function gr(e, n) { return new e({ type: "string", format: "ipv4", check: "string_format", abort: !1, ...a(n) }); } function br(e, n) { return new e({ type: "string", format: "ipv6", check: "string_format", abort: !1, ...a(n) }); } function zr(e, n) { return new e({ type: "string", format: "cidrv4", check: "string_format", abort: !1, ...a(n) }); } function wr(e, n) { return new e({ type: "string", format: "cidrv6", check: "string_format", abort: !1, ...a(n) }); } function Zr(e, n) { return new e({ type: "string", format: "base64", check: "string_format", abort: !1, ...a(n) }); } function $r(e, n) { return new e({ type: "string", format: "base64url", check: "string_format", abort: !1, ...a(n) }); } function kr(e, n) { return new e({ type: "string", format: "e164", check: "string_format", abort: !1, ...a(n) }); } function yr(e, n) { return new e({ type: "string", format: "jwt", check: "string_format", abort: !1, ...a(n) }); } function Ir(e, n) { return new e({ type: "string", format: "datetime", check: "string_format", offset: !1, local: !1, precision: null, ...a(n) }); } function Er(e, n) { return new e({ type: "string", format: "date", check: "string_format", ...a(n) }); } function xr(e, n) { return new e({ type: "string", format: "time", check: "string_format", precision: null, ...a(n) }); } function Pr(e, n) { return new e({ type: "string", format: "duration", check: "string_format", ...a(n) }); } function Sr(e, n) { return new e({ type: "number", checks: [], ...a(n) }); } function Tr(e, n) { return new e({ type: "number", check: "number_format", abort: !1, format: "safeint", ...a(n) }); } function Nr(e, n) { return new e({ type: "boolean", ...a(n) }); } function Or(e, n) { return new e({ type: "null", ...a(n) }); } function Ar(e) { return new e({ type: "unknown" }); } function Dr(e, n) { return