@mintlify/validation 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@mintlify/validation"]=t():e["@mintlify/validation"]=t()}(this,(()=>(()=>{"use strict";var e={3607:function(e,t,r){var a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var a,s=0,n=t.length;s<n;s++)!a&&s in t||(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintConfigSchema=t.validateMintConfig=void 0;var n,i,o,d,u,c,l,p=s(r(8841)),h=r(7059),m=r(3555),f=r(5815),y=r(5573),g=r(6217);t.validateMintConfig=function(e){var t,r=new m.MintValidationResults;if(null==e||null==e||0===Object.entries(e).length)return r.errors.push("Mint Config object cannot be empty."),r.status="error",r;var s=(0,y.validateAnchorsWarnings)(e.anchors,e.navigation),n=(0,g.validateVersionsInNavigation)(e.navigation,null!==(t=e.versions)&&void 0!==t?t:[]);r.errors=a(a([],r.errors,!0),n.errors,!0),r.warnings=a(a(a([],r.warnings,!0),n.warnings,!0),s.warnings,!0);var i=h.configSchema.safeParse(e);return 0==i.success&&i.error.issues.forEach((function(e){var t,a;if("invalid_union"===e.code&&(null===(a=e.unionErrors)||void 0===a?void 0:a.length)>0)(t=r.errors).push.apply(t,(0,f.flattenUnionErrorMessages)(e.unionErrors));else{var s=e.message;"Required"===s&&(s="Missing required field: "+e.path.join(".")),r.errors.push(s)}})),r.status=r.errors.length?"error":"success",r},t.mintConfigSchema=(null===(i=null===(n=(l=(0,p.default)(h.configSchema,"Schema")).definitions)||void 0===n?void 0:n.Schema)||void 0===i||delete i.properties.__injected,null===(d=null===(o=l.definitions)||void 0===o?void 0:o.Schema)||void 0===d||delete d.properties.colors.properties.ultraDark,null===(c=null===(u=l.definitions)||void 0===u?void 0:u.Schema)||void 0===c||delete c.properties.colors.properties.ultraLight,l)},1271:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.analyticsSchema=void 0;var a=r(8754),s=a.z.object({apiKey:a.z.string({required_error:"Amplitude apiKey is missing.",invalid_type_error:"Amplitude apiKey must be a string."})},{invalid_type_error:"Amplitude analytics config must be an object with an apiKey property."}),n=a.z.object({siteId:a.z.string({required_error:"Fathom siteId is missing.",invalid_type_error:"Fathom siteId must be a string."})},{invalid_type_error:"Fathom analytics config must be an object with a siteId property."}),i=a.z.object({measurementId:a.z.string({required_error:"Google Analytics measurementId is missing.",invalid_type_error:"Google Analytics measurementId must be a string."}).startsWith("G","Google Analytics measurementId must start with G.")},{invalid_type_error:"Google Analytics config must be an object with a measurementId property."}),o=a.z.object({tagId:a.z.string({required_error:"Google Tag Manager tagId is missing.",invalid_type_error:"Google Tag Manager tagId must be a string."}).startsWith("G","Google Tag Manager tagId must start with G.")},{invalid_type_error:"Google Tag Manager config must be an object with a tagId property."}),d=a.z.object({hjid:a.z.string({required_error:"Hotjar hjid is missing.",invalid_type_error:"Hotjar hjid must be a string."}),hjsv:a.z.string({required_error:"Hotjar hjsv is missing.",invalid_type_error:"Hotjar hjsv must be a string."})},{invalid_type_error:"Hotjar config must be an object with a hjid and hjsv property."}),u=a.z.object({publicApiKey:a.z.string({required_error:"Public Api Key is required for the Koala snippet to run.",invalid_type_error:"Koala Public Api Key must be a string."}).refine((function(e){return e.length>=2}),"Koala Public Api Key must have at least two characters")},{invalid_type_error:"Koala config must be an object with a publicApiKey property."}),c=a.z.object({appId:a.z.string({required_error:"Logrocket appId is missing.",invalid_type_error:"Logrocket appId must be a string."})},{invalid_type_error:"Logrocket config must be an object with an appId property."}),l=a.z.object({projectToken:a.z.string({required_error:"Mixpanel projectToken is missing.",invalid_type_error:"Mixpanel projectToken must be a string."})},{invalid_type_error:"Mixpanel config must be an object with a projectToken property."}),p=a.z.object({id:a.z.string({required_error:"Pirsch id is missing.",invalid_type_error:"Pirsch id must be a string."})},{invalid_type_error:"Pirsch config must be an object with an id property."}),h=a.z.object({apiKey:a.z.string({required_error:"Posthog apiKey is missing.",invalid_type_error:"Posthog apiKey must be a string."}).startsWith("phc_","Posthog apiKey must start with phc_"),apiHost:a.z.string({invalid_type_error:"Posthog apiHost must be a string."}).url("Posthog apiHost must be a valid URL.").optional()},{invalid_type_error:"Posthog config must be an object with an apiKey property."}),m=a.z.object({domain:a.z.string({required_error:"Plausible domain is missing.",invalid_type_error:"Plausible domain must be a string."}).refine((function(e){return!e.startsWith("http://")&&!e.startsWith("https://")}),"Plausible domain must not start with http:// or https://")},{invalid_type_error:"Plausible config must be an object with a domain property. The domain must not start with http:// or https://."});t.analyticsSchema=a.z.object({amplitude:s.optional(),fathom:n.optional(),ga4:i.optional(),gtm:o.optional(),hotjar:d.optional(),koala:u.optional(),logrocket:c.optional(),mixpanel:l.optional(),pirsch:p.optional(),posthog:h.optional(),plausible:m.optional()}).strict("Mintlify only supports analytics integrations from: amplitude, fathom, ga4, gtm, hotjar, koala, logrocket, mixpanel, pirsch, posthog and plausible.")},6249:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.anchorColorSchema=void 0;var a=r(8754),s=r(2609);t.anchorColorSchema=a.z.union([a.z.string({invalid_type_error:"Anchor color must be a string."}).regex(s.hexadecimalPattern,"Anchor color must be a hexadecimal color."),a.z.object({from:a.z.string({invalid_type_error:"Anchor color.from must be a string."}).regex(s.hexadecimalPattern,"Anchor color.from must be a hexadecimal color."),via:a.z.string({invalid_type_error:"Anchor color.via must be a string."}).regex(s.hexadecimalPattern,"Anchor color.via must be undefined or a hexadecimal color.").optional(),to:a.z.string({invalid_type_error:"Anchor color.to must be a string."}).regex(s.hexadecimalPattern,"Anchor color.to must be a hexadecimal color.")}).strict("Anchors with gradient colors can only have properties from, via, and to with valid hexadecimal colors.")],{invalid_type_error:"Anchor color must be a string or an object with from and to properties."})},3838:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.anchorsSchema=void 0;var a=r(8754),s=r(6249);t.anchorsSchema=a.z.object({name:a.z.string({required_error:"Every anchor must have a name.",invalid_type_error:"Anchor name must be a string."}).trim().min(1,"Anchor name is empty."),url:a.z.string({required_error:"Every anchor must have a url",invalid_type_error:"Anchor url must be a string."}).trim().min(1,"Anchor URL is missing."),icon:a.z.string({invalid_type_error:"Anchor icon must be the name of a Font Awesome icon. Visit this link to see all the available icons: https://fontawesome.com/icons"}).refine((function(e){return!e.startsWith("fa-")}),'icon does not need to start with "fa-". Please delete "fa-" and keep the rest of the icon name.').optional(),iconType:a.z.enum(["brands","duotone","light","sharp-solid","solid","thin"],{errorMap:function(){return{message:"anchor iconType must be one of the following strings: brands, duotone, light, sharp-solid, solid, thin"}}}).optional(),color:s.anchorColorSchema.optional(),isDefaultHidden:a.z.boolean({invalid_type_error:"Anchor isDefaultHidden must be a boolean. Try writing true or false without quotes around them."}).optional(),version:a.z.string({invalid_type_error:"Version must be a string in the versions array."}).optional()}).array()},6861:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.colorsSchema=void 0;var a=r(8754),s=r(6249),n=r(2609);t.colorsSchema=a.z.object({primary:a.z.string({invalid_type_error:"Primary color must be a string."}).min(1,"Color primary is missing.").regex(n.hexadecimalPattern,"Primary color must be a hexadecimal color including the # at the start."),light:a.z.string({invalid_type_error:"Light color must be a string."}).regex(n.hexadecimalPattern,"Light color must be a hexadecimal color including the # at the start.").optional(),dark:a.z.string({invalid_type_error:"Dark color must be a string."}).regex(n.hexadecimalPattern,"Dark color must be a hexadecimal color including the # at the start.").optional(),background:a.z.object({light:a.z.string({invalid_type_error:"Background light color must be a string."}).regex(n.hexadecimalPattern,"Background light color must be a hexadecimal color including the # at the start.").optional(),dark:a.z.string({invalid_type_error:"Background dark color must be a string."}).regex(n.hexadecimalPattern,"Background dark color must be a hexadecimal color including the # at the start.").optional()}).optional(),anchors:s.anchorColorSchema.optional(),ultraLight:a.z.any().optional(),ultraDark:a.z.any().optional()},{required_error:'Colors are missing. You need to define at least the primary color. For example: { "colors": { "primary": "#ff0000" } }',invalid_type_error:"Colors must be an object."}).strict("Some of the colors in mint.json are invalid, did you make a typo? We only accept primary, light, dark, background, and anchors.")},7059:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.configSchema=void 0;var a=r(8754),s=r(6861),n=r(5112),i=r(2341),o=r(9294),d=r(7243),u=r(3838),c=r(1271),l=a.z.union([a.z.string().min(3,"Logo needs to be a path to your logo file including the file extension."),a.z.object({light:a.z.string(),dark:a.z.string(),href:a.z.string().optional()})],{invalid_type_error:"Logo must be a string or an object with light and dark properties."}),p=a.z.object({baseUrl:a.z.union([a.z.string().url("api.baseUrl must be a valid URL."),a.z.array(a.z.string().url("api.baseUrl array entries must be valid URLs."))]).optional(),auth:a.z.object({method:a.z.string({invalid_type_error:"api.auth.method has to be a string equal to one of: bearer, basic, key"}).refine((function(e){return"bearer"===e||"basic"===e||"key"===e}),{message:"api.auth.method has to be one of: bearer, basic, key"}).optional(),name:a.z.string().optional(),inputPrefix:a.z.string().optional()}).strict("api.auth can only contain method, name, and inputPrefix.").optional(),hidePlayground:a.z.boolean({invalid_type_error:"hidePlayground must be a boolean. Try writing true or false without the quotes."}).optional()},{invalid_type_error:"api must be an object. The object can have baseUrl, auth, and hidePlayground as properties."}).strict("api can only contain baseUrl, auth, and hidePlayground as properties."),h=a.z.object({default:a.z.string().optional(),isHidden:a.z.boolean({invalid_type_error:"isHidden must be a boolean. Try writing true or false without the quotes."}).optional()}),m=function(e){return a.z.union([a.z.object({type:a.z.literal("link").optional(),name:a.z.string({required_error:"Name must be defined when using a CTA button",invalid_type_error:"Name must be a string"}),url:a.z.string({required_error:e+".url is missing",invalid_type_error:e+".url must be a string"}).min(1,e+".url cannot be empty")}).strict(e+" can only contain name, url, and type properties. Set a different type if you need to set other fields."),a.z.object({type:a.z.literal("github"),url:a.z.string({required_error:e+".url is missing. Please set the url to a link to your GitHub repository.",invalid_type_error:e+".url must be a string. Specifically, set the url to a link to your GitHub repository."}).url(e+".url must be a valid url pointing to your GitHub repository.")}).strict(e+' can only contain url and type properties when type="github". Please delete any other properties you have set.')],{invalid_type_error:e+' must be an object. The object can have type="link" (the default) if you define a url and a name. You can also have type="github" if you define a url pointing to your GitHub repo and set the type in the object.'})},f=a.z.union([a.z.array(a.z.object({type:a.z.string(),url:a.z.string().url("footerSocials url must be a valid url")})),a.z.record(a.z.string().trim().min(1,"footerSocials name (the key in the object) must not be empty"),a.z.string().url("footerSocials url (the value in the object) must be a valid url"))],{invalid_type_error:'footerSocials must be an object where the key is the name of the social media and the value is the url to your profile. For example: { "twitter": "https://twitter.com/mintlify" }'}),y=a.z.object({intercom:a.z.string({invalid_type_error:"integrations.intercom must be a string"}).min(6,"integrations.intercom must be a valid Intercom app ID").optional()},{invalid_type_error:"integrations must be an object"});t.configSchema=a.z.object({$schema:a.z.string().url().optional().default("https://mintlify.com/schema.json"),mintlify:a.z.string().optional(),name:i.nameSchema,logo:l.optional(),favicon:n.faviconSchema,openApi:a.z.string({invalid_type_error:"openApi must be a URL pointing to your OpenAPI file. If you are using a local file, you can delete the openApi property in mint.json"}).url("openApi must be a valid URL. If the openapi file is in your Mintlify folder, we will detect it automatically and you can delete the openApi property in mint.json").optional(),api:p.optional(),modeToggle:h.optional(),versions:o.versionsSchema.optional(),metadata:a.z.record(a.z.string({invalid_type_error:"metadata keys must be strings"}),a.z.string({invalid_type_error:"metadata values must be strings"}).min(1,"metadata values must not be empty")).optional(),colors:s.colorsSchema,topbarCtaButton:m("topbarCtaButton").optional(),topbarLinks:a.z.array(m("topbarLinks")).optional(),navigation:d.navigationConfigSchema,topAnchor:a.z.object({name:a.z.string({required_error:"topAnchor.name is missing, set it or delete the entire topAnchor property.",invalid_type_error:"topAnchor.name must be a string"}),icon:a.z.string({invalid_type_error:"topAnchor.icon must be a string"}).optional(),iconType:a.z.enum(["brands","duotone","light","sharp-solid","solid","thin"],{errorMap:function(){return{message:"topAnchor.iconType must be one of the following strings: brands, duotone, light, sharp-solid, solid, thin"}}}).optional()},{invalid_type_error:"topAnchor must be an object with a name property. Delete the topAnchor if you don't want to customize the values."}).strict("topAnchor can only have name, icon, and iconType properties.").optional(),anchors:u.anchorsSchema.optional(),footerSocials:f.optional(),backgroundImage:a.z.string().optional(),analytics:c.analyticsSchema.optional(),integrations:y.optional(),__injected:a.z.undefined({invalid_type_error:"Do not add __injected to mint.json. Mintlify uses this property internally."})})},5112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.faviconSchema=void 0;var a=r(8754);t.faviconSchema=a.z.string({required_error:"Favicon is missing. Please set favicon to the path of your favicon file. We recommend using a .svg or .png file. Mintlify automatically resizes your favicon to the sizes needed.",invalid_type_error:"Favicon must be a string path pointing to the favicon file in your Mintlify folder."}).refine((function(e){return"ico"!==e.split(".").pop()}),{message:"Favicon cannot be an .ico file."})},2341:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.nameSchema=void 0;var a=r(8754);t.nameSchema=a.z.string({required_error:"Name is missing."}).min(1,"Name cannot be empty.").trim()},7243:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.navigationConfigSchema=void 0;var a=r(8754),s=a.z.lazy((function(){return a.z.object({group:a.z.string({required_error:"Missing navigation group name.",invalid_type_error:"Group must be a string. We use the group name to create the navigation sidebar."}),pages:a.z.array(a.z.union([s,a.z.string().min(1,"Page cannot be an empty string.")])).min(1,"Pages array can't be empty."),version:a.z.string({invalid_type_error:"Version must be a string."}).optional()},{invalid_type_error:"Navigation entry must be an object."}).strict("Navigation entry can only contain group, pages, and version.")}));t.navigationConfigSchema=a.z.array(s,{required_error:"Navigation is missing.",invalid_type_error:"Navigation must be an array."}).min(1,"Navigation cannot be an empty array. Please add at least one group.")},9294:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.versionsSchema=void 0;var a=r(8754);t.versionsSchema=a.z.array(a.z.string({invalid_type_error:"Versions must be an array of strings."})).min(1,"Versions array cannot be empty. Either delete the property or add strings to the array.")},3555:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintValidationResults=void 0;t.MintValidationResults=function(){this.status="success",this.errors=[],this.warnings=[]}},5815:function(e,t){var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var a,s=0,n=t.length;s<n;s++)!a&&s in t||(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.flattenUnionErrorMessages=void 0,t.flattenUnionErrorMessages=function e(t){return t.reduce((function(t,a){return Array.isArray(a.unionErrors)&&a.unionErrors.length>0?r(r([],t,!0),e(a.unionErrors),!0):r(r([],t,!0),[a.message],!1)}),[])}},2609:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hexadecimalPattern=void 0,t.hexadecimalPattern=/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},5573:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAnchorsWarnings=void 0;var a=r(7243),s=r(3555);function n(e,t){return"string"==typeof e?e.startsWith(t):null!=e.pages&&e.pages.some((function(e){return n(e,t)}))}t.validateAnchorsWarnings=function(e,t){var r=new s.MintValidationResults;return null!=e&&Array.isArray(e)&&0!==e.length?t&&!0===a.navigationConfigSchema.safeParse(t).success&&e.forEach((function(e){e.url.startsWith("mailto:")||e.url.startsWith("http")||e.url.startsWith("https")||t.some((function(t){return n(t,e.url)}))||r.warnings.push("No pages in the navigation match anchor "+e.url+" you should have at least one page that starts with "+e.url)})):r.warnings.push("Mintlify runs without anchors but most sites look better with at least one."),r}},6217:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateVersionsInNavigation=t.flattenNavigationVersions=void 0;var a=r(7243),s=r(3555);function n(e,t){return void 0===t&&(t=[]),e.forEach((function(e){return null==e||"string"==typeof e?t:(e.version&&t.push(e.version),Array.isArray(e.pages)?n(e.pages,t):t)})),t}function i(e,t){if("string"==typeof e)return[];var r=[];return e.version&&null!=t&&e.version!==t&&r.push('Please do not set versions on groups nested inside a group that already has a version. The group "'.concat(e.group,'" has version "').concat(e.version,'" set and it is nested in a group that has the version "').concat(t,'" set.')),e.pages?r.concat(e.pages.map((function(r){return i(r,t||e.version)})).flat().filter(Boolean)):[]}t.flattenNavigationVersions=n,t.validateVersionsInNavigation=function(e,t){void 0===t&&(t=[]);var r=new s.MintValidationResults;if(null==e||!1===a.navigationConfigSchema.safeParse(e).success)return r;var o=n(e);return o.forEach((function(e){t.includes(e)||r.errors.push("Version ".concat(e," is not included in the versions array, but is used in the navigation. Please add ").concat(e," to the versions array."))})),0===o.length&&t.length>0&&r.warnings.push("You have versions defined in the config, but no versions are used in the navigation."),e.forEach((function(e){var t;(t=r.warnings).push.apply(t,i(e,null))})),r}},8841:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zodToJsonSchema=void 0;const a=r(4357);Object.defineProperty(t,"zodToJsonSchema",{enumerable:!0,get:function(){return a.zodToJsonSchema}}),t.default=a.zodToJsonSchema},7181:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultOptions=t.defaultOptions=void 0,t.defaultOptions={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1},t.getDefaultOptions=e=>"string"==typeof e?Object.assign(Object.assign({},t.defaultOptions),{name:e}):Object.assign(Object.assign({},t.defaultOptions),e)},1908:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRefs=void 0;const a=r(7181);t.getRefs=e=>{const t=(0,a.getDefaultOptions)(e),r=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return Object.assign(Object.assign({},t),{currentPath:r,propertyPath:void 0,seen:[]})}},6519:(e,t)=>{function r(e,t,r,a){(null==a?void 0:a.errorMessages)&&r&&(e.errorMessage=Object.assign(Object.assign({},e.errorMessage),{[t]:r}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setResponseValueAndErrors=t.addErrorMessage=void 0,t.addErrorMessage=r,t.setResponseValueAndErrors=function(e,t,a,s,n){e[t]=a,r(e,t,s,n)}},9959:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseDef=void 0;const a=r(8754),s=r(6840),n=r(2886),i=r(2722),o=r(5823),d=r(423),u=r(9444),c=r(4117),l=r(3245),p=r(4804),h=r(2105),m=r(2734),f=r(8392),y=r(8716),g=r(2295),v=r(2200),_=r(5907),b=r(993),Z=r(8490),P=r(938),x=r(8289),T=r(1250),I=r(9033),j=r(3564),O=r(9226),k=r(9229),w=r(3133),C=r(9646),D=r(8e3),A=r(34);function N(e,t){const r=t.seen.find((t=>Object.is(t.def,e)));if(r)return S(r,t);const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.push(a);const s=z(e,e.typeName,t);return s&&E(e,s),a.jsonSchema=s,s}t.parseDef=N;const S=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:0===e.path.length?"":1===e.path.length?`${e.path[0]}/`:e.path.join("/")};case"relative":return{$ref:M(t.currentPath,e.path)};case"none":return e.path.length<t.currentPath.length&&e.path.every(((e,r)=>t.currentPath[r]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):e.jsonSchema}},M=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")},z=(e,t,r)=>{switch(t){case a.ZodFirstPartyTypeKind.ZodString:return(0,k.parseStringDef)(e,r);case a.ZodFirstPartyTypeKind.ZodNumber:return(0,Z.parseNumberDef)(e,r);case a.ZodFirstPartyTypeKind.ZodObject:return(0,P.parseObjectDef)(e,r);case a.ZodFirstPartyTypeKind.ZodBigInt:return(0,i.parseBigintDef)();case a.ZodFirstPartyTypeKind.ZodBoolean:return(0,o.parseBooleanDef)();case a.ZodFirstPartyTypeKind.ZodDate:return(0,c.parseDateDef)();case a.ZodFirstPartyTypeKind.ZodUndefined:return(0,C.parseUndefinedDef)();case a.ZodFirstPartyTypeKind.ZodNull:return(0,_.parseNullDef)(r);case a.ZodFirstPartyTypeKind.ZodArray:return(0,n.parseArrayDef)(e,r);case a.ZodFirstPartyTypeKind.ZodUnion:case a.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return(0,D.parseUnionDef)(e,r);case a.ZodFirstPartyTypeKind.ZodIntersection:return(0,m.parseIntersectionDef)(e,r);case a.ZodFirstPartyTypeKind.ZodTuple:return(0,w.parseTupleDef)(e,r);case a.ZodFirstPartyTypeKind.ZodRecord:return(0,j.parseRecordDef)(e,r);case a.ZodFirstPartyTypeKind.ZodLiteral:return(0,f.parseLiteralDef)(e,r);case a.ZodFirstPartyTypeKind.ZodEnum:return(0,h.parseEnumDef)(e);case a.ZodFirstPartyTypeKind.ZodNativeEnum:return(0,g.parseNativeEnumDef)(e);case a.ZodFirstPartyTypeKind.ZodNullable:return(0,b.parseNullableDef)(e,r);case a.ZodFirstPartyTypeKind.ZodOptional:return(0,x.parseOptionalDef)(e,r);case a.ZodFirstPartyTypeKind.ZodMap:return(0,y.parseMapDef)(e,r);case a.ZodFirstPartyTypeKind.ZodSet:return(0,O.parseSetDef)(e,r);case a.ZodFirstPartyTypeKind.ZodLazy:return N(e.getter()._def,r);case a.ZodFirstPartyTypeKind.ZodPromise:return(0,I.parsePromiseDef)(e,r);case a.ZodFirstPartyTypeKind.ZodNaN:case a.ZodFirstPartyTypeKind.ZodNever:return(0,v.parseNeverDef)();case a.ZodFirstPartyTypeKind.ZodEffects:return(0,p.parseEffectsDef)(e,r);case a.ZodFirstPartyTypeKind.ZodAny:return(0,s.parseAnyDef)();case a.ZodFirstPartyTypeKind.ZodUnknown:return(0,A.parseUnknownDef)();case a.ZodFirstPartyTypeKind.ZodDefault:return(0,l.parseDefaultDef)(e,r);case a.ZodFirstPartyTypeKind.ZodBranded:return(0,d.parseBrandedDef)(e,r);case a.ZodFirstPartyTypeKind.ZodCatch:return(0,u.parseCatchDef)(e,r);case a.ZodFirstPartyTypeKind.ZodPipeline:return(0,T.parsePipelineDef)(e,r);case a.ZodFirstPartyTypeKind.ZodFunction:case a.ZodFirstPartyTypeKind.ZodVoid:case a.ZodFirstPartyTypeKind.ZodSymbol:default:return}},E=(e,t)=>(e.description&&(t.description=e.description),t)},6840:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseAnyDef=void 0,t.parseAnyDef=function(){return{}}},2886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseArrayDef=void 0;const a=r(8754),s=r(6519),n=r(9959);t.parseArrayDef=function(e,t){var r,i;const o={type:"array"};return(null===(i=null===(r=e.type)||void 0===r?void 0:r._def)||void 0===i?void 0:i.typeName)!==a.ZodFirstPartyTypeKind.ZodAny&&(o.items=(0,n.parseDef)(e.type._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items"]}))),e.minLength&&(0,s.setResponseValueAndErrors)(o,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&(0,s.setResponseValueAndErrors)(o,"maxItems",e.maxLength.value,e.maxLength.message,t),o}},2722:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBigintDef=void 0,t.parseBigintDef=function(){return{type:"integer",format:"int64"}}},5823:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBooleanDef=void 0,t.parseBooleanDef=function(){return{type:"boolean"}}},423:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBrandedDef=void 0;const a=r(9959);t.parseBrandedDef=function(e,t){return(0,a.parseDef)(e.type._def,t)}},9444:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCatchDef=void 0;const a=r(9959);t.parseCatchDef=(e,t)=>(0,a.parseDef)(e.innerType._def,t)},4117:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseDateDef=void 0,t.parseDateDef=function(){return{type:"string",format:"date-time"}}},3245:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseDefaultDef=void 0;const a=r(9959);t.parseDefaultDef=function(e,t){return Object.assign(Object.assign({},(0,a.parseDef)(e.innerType._def,t)),{default:e.defaultValue()})}},4804:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseEffectsDef=void 0;const a=r(9959);t.parseEffectsDef=function(e,t){return"input"===t.effectStrategy?(0,a.parseDef)(e.schema._def,t):{}}},2105:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseEnumDef=void 0,t.parseEnumDef=function(e){return{type:"string",enum:e.values}}},2734:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseIntersectionDef=void 0;const a=r(9959);t.parseIntersectionDef=function(e,t){const r=[(0,a.parseDef)(e.left._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf","0"]})),(0,a.parseDef)(e.right._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf","1"]}))].filter((e=>!!e));return r.length?{allOf:r}:void 0}},8392:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLiteralDef=void 0,t.parseLiteralDef=function(e,t){const r=typeof e.value;return"bigint"!==r&&"number"!==r&&"boolean"!==r&&"string"!==r?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===r?"integer":r,enum:[e.value]}:{type:"bigint"===r?"integer":r,const:e.value}}},8716:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseMapDef=void 0;const a=r(9959);t.parseMapDef=function(e,t){return{type:"array",maxItems:125,items:{type:"array",items:[(0,a.parseDef)(e.keyType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items","items","0"]}))||{},(0,a.parseDef)(e.valueType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items","items","1"]}))||{}],minItems:2,maxItems:2}}}},2295:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNativeEnumDef=void 0,t.parseNativeEnumDef=function(e){const t=e.values,r=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),a=Array.from(new Set(r.map((e=>typeof e))));return{type:1===a.length?"string"===a[0]?"string":"number":["string","number"],enum:r}}},2200:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNeverDef=void 0,t.parseNeverDef=function(){return{not:{}}}},5907:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNullDef=void 0,t.parseNullDef=function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}},993:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNullableDef=void 0;const a=r(9959),s=r(8e3);t.parseNullableDef=function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:s.primitiveMappings[e.innerType._def.typeName],nullable:!0}:{type:[s.primitiveMappings[e.innerType._def.typeName],"null"]};const r=(0,a.parseDef)(e.innerType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"anyOf","0"]}));return r?"openApi3"===t.target?Object.assign(Object.assign({},r),{nullable:!0}):{anyOf:[r,{type:"null"}]}:void 0}},8490:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumberDef=void 0;const a=r(6519);t.parseNumberDef=function(e,t){const r={type:"number"};if(!e.checks)return r;for(const s of e.checks)switch(s.kind){case"int":r.type="integer",(0,a.addErrorMessage)(r,"type",s.message,t);break;case"min":"jsonSchema7"===t.target?s.inclusive?(0,a.setResponseValueAndErrors)(r,"minimum",s.value,s.message,t):(0,a.setResponseValueAndErrors)(r,"exclusiveMinimum",s.value,s.message,t):(s.inclusive||(r.exclusiveMinimum=!0),(0,a.setResponseValueAndErrors)(r,"minimum",s.value,s.message,t));break;case"max":"jsonSchema7"===t.target?s.inclusive?(0,a.setResponseValueAndErrors)(r,"maximum",s.value,s.message,t):(0,a.setResponseValueAndErrors)(r,"exclusiveMaximum",s.value,s.message,t):(s.inclusive||(r.exclusiveMaximum=!0),(0,a.setResponseValueAndErrors)(r,"maximum",s.value,s.message,t));break;case"multipleOf":(0,a.setResponseValueAndErrors)(r,"multipleOf",s.value,s.message,t)}return r}},938:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseObjectDef=void 0;const a=r(9959);t.parseObjectDef=function(e,t){var r;const s=Object.assign(Object.assign({type:"object"},Object.entries(e.shape()).reduce(((e,[r,s])=>{if(void 0===s||void 0===s._def)return e;const n=(0,a.parseDef)(s._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"properties",r],propertyPath:[...t.currentPath,"properties",r]}));return void 0===n?e:{properties:Object.assign(Object.assign({},e.properties),{[r]:n}),required:s.isOptional()?e.required:[...e.required,r]}}),{properties:{},required:[]})),{additionalProperties:"ZodNever"===e.catchall._def.typeName?"passthrough"===e.unknownKeys:null===(r=(0,a.parseDef)(e.catchall._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"additionalProperties"]})))||void 0===r||r});return s.required.length||delete s.required,s}},8289:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseOptionalDef=void 0;const a=r(9959);t.parseOptionalDef=(e,t)=>{var r;if(t.currentPath.toString()===(null===(r=t.propertyPath)||void 0===r?void 0:r.toString()))return(0,a.parseDef)(e.innerType._def,t);const s=(0,a.parseDef)(e.innerType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"anyOf","1"]}));return s?{anyOf:[{not:{}},s]}:{}}},1250:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parsePipelineDef=void 0;const a=r(9959);t.parsePipelineDef=(e,t)=>{const r=(0,a.parseDef)(e.in._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf","0"]}));return{allOf:[r,(0,a.parseDef)(e.out._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf",r?"1":"0"]}))].filter((e=>void 0!==e))}}},9033:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parsePromiseDef=void 0;const a=r(9959);t.parsePromiseDef=function(e,t){return(0,a.parseDef)(e.type._def,t)}},3564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRecordDef=void 0;const a=r(8754),s=r(9959),n=r(9229);t.parseRecordDef=function(e,t){var r,i,o;const d={type:"object",additionalProperties:(0,s.parseDef)(e.valueType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"additionalProperties"]}))||{}};if((null===(r=e.keyType)||void 0===r?void 0:r._def.typeName)===a.ZodFirstPartyTypeKind.ZodString&&(null===(i=e.keyType._def.checks)||void 0===i?void 0:i.length)){const r=Object.entries((0,n.parseStringDef)(e.keyType._def,t)).reduce(((e,[t,r])=>"type"===t?e:Object.assign(Object.assign({},e),{[t]:r})),{});return Object.assign(Object.assign({},d),{propertyNames:r})}return(null===(o=e.keyType)||void 0===o?void 0:o._def.typeName)===a.ZodFirstPartyTypeKind.ZodEnum?Object.assign(Object.assign({},d),{propertyNames:{enum:e.keyType._def.values}}):d}},9226:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseSetDef=void 0;const a=r(6519),s=r(9959);t.parseSetDef=function(e,t){const r={type:"array",items:(0,s.parseDef)(e.valueType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items"]}))};return e.minSize&&(0,a.setResponseValueAndErrors)(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&(0,a.setResponseValueAndErrors)(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}},9229:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseStringDef=void 0;const a=r(6519);t.parseStringDef=function(e,t){const r={type:"string"};if(e.checks)for(const i of e.checks)switch(i.kind){case"min":(0,a.setResponseValueAndErrors)(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":(0,a.setResponseValueAndErrors)(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"email":(0,a.setResponseValueAndErrors)(r,"format","email",i.message,t);break;case"url":(0,a.setResponseValueAndErrors)(r,"format","uri",i.message,t);break;case"uuid":(0,a.setResponseValueAndErrors)(r,"format","uuid",i.message,t);break;case"regex":n(r,i.regex.source,i.message,t);break;case"cuid":n(r,"^c[^\\s-]{8,}$",i.message,t);break;case"cuid2":n(r,"^[a-z][a-z0-9]*$",i.message,t);break;case"startsWith":n(r,"^"+s(i.value),i.message,t);break;case"endsWith":n(r,s(i.value)+"$",i.message,t);break;case"trim":break;case"datetime":(0,a.setResponseValueAndErrors)(r,"format","date-time",i.message,t);break;case"length":(0,a.setResponseValueAndErrors)(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,i.value):i.value,i.message,t),(0,a.setResponseValueAndErrors)(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,i.value):i.value,i.message,t)}return r};const s=e=>Array.from(e).map((e=>/[a-zA-Z0-9]/.test(e)?e:`\\${e}`)).join(""),n=(e,t,r,s)=>{var n;e.pattern||(null===(n=e.allOf)||void 0===n?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(Object.assign({pattern:e.pattern},e.errorMessage&&s.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push(Object.assign({pattern:t},r&&s.errorMessages&&{errorMessage:{pattern:r}}))):(0,a.setResponseValueAndErrors)(e,"pattern",t,r,s)}},3133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseTupleDef=void 0;const a=r(9959);t.parseTupleDef=function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,r)=>(0,a.parseDef)(e._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items",`${r}`]})))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:(0,a.parseDef)(e.rest._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"additionalItems"]}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,r)=>(0,a.parseDef)(e._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items",`${r}`]})))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}},9646:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUndefinedDef=void 0,t.parseUndefinedDef=function(){return{not:{}}}},8e3:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnionDef=t.primitiveMappings=void 0;const a=r(9959);t.primitiveMappings={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},t.parseUnionDef=function(e,r){if("openApi3"===r.target)return s(e,r);const a=e.options instanceof Map?Array.from(e.options.values()):e.options;if(a.every((e=>e._def.typeName in t.primitiveMappings&&(!e._def.checks||!e._def.checks.length)))){const e=a.reduce(((e,r)=>{const a=t.primitiveMappings[r._def.typeName];return a&&!e.includes(a)?[...e,a]:e}),[]);return{type:e.length>1?e:e[0]}}if(a.every((e=>"ZodLiteral"===e._def.typeName))){const e=a.reduce(((e,t)=>{const r=typeof t._def.value;switch(r){case"string":case"number":case"boolean":return[...e,r];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===a.length){const t=e.filter(((e,t,r)=>r.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:a.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(a.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:a.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return s(e,r)};const s=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,r)=>(0,a.parseDef)(e._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"anyOf",`${r}`]})))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return r.length?{anyOf:r}:void 0}},34:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnknownDef=void 0,t.parseUnknownDef=function(){return{}}},4357:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zodToJsonSchema=void 0;const a=r(9959),s=r(1908);t.zodToJsonSchema=(e,t)=>{var r;const n=(0,s.getRefs)(t),i="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,r])=>{var s;return Object.assign(Object.assign({},e),{[t]:null!==(s=(0,a.parseDef)(r._def,Object.assign(Object.assign({},n),{currentPath:[...n.basePath,n.definitionPath,t]})))&&void 0!==s?s:{}})}),{}):void 0,o="string"==typeof t?t:null==t?void 0:t.name,d=null!==(r=(0,a.parseDef)(e._def,void 0===o?n:Object.assign(Object.assign({},n),{currentPath:[...n.basePath,n.definitionPath,o]})))&&void 0!==r?r:{},u=void 0===o?i?Object.assign(Object.assign({},d),{[n.definitionPath]:i}):d:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:Object.assign(Object.assign({},i),{[o]:d})};return"jsonSchema7"===n.target&&(u.$schema="http://json-schema.org/draft-07/schema#"),u}},8280:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const a=r(9110);t.ZodIssueCode=a.util.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"]),t.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class s extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},r={_errors:[]},a=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(a);else if("invalid_return_type"===s.code)a(s.returnTypeError);else if("invalid_arguments"===s.code)a(s.argumentsError);else if(0===s.path.length)r._errors.push(t(s));else{let e=r,a=0;for(;a<s.path.length;){const r=s.path[a];a===s.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(s))):e[r]=e[r]||{_errors:[]},e=e[r],a++}}};return a(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},r=[];for(const a of this.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}t.ZodError=s,s.create=e=>new s(e)},6996:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;const s=a(r(9349));t.defaultErrorMap=s.default;let n=s.default;t.setErrorMap=function(e){n=e},t.getErrorMap=function(){return n}},6349:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),s(r(6996),t),s(r(3187),t),s(r(116),t),s(r(9110),t),s(r(5433),t),s(r(8280),t)},8762:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0,(r=t.errorUtil||(t.errorUtil={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},r.toString=e=>"string"==typeof e?e:null==e?void 0:e.message},3187:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const s=r(6996),n=a(r(9349));t.makeIssue=e=>{const{data:t,path:r,errorMaps:a,issueData:s}=e,n=[...r,...s.path||[]],i={...s,path:n};let o="";const d=a.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...s,path:n,message:s.message||o}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,r){const a=(0,t.makeIssue)({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,(0,s.getErrorMap)(),n.default].filter((e=>!!e))});e.common.issues.push(a)};class i{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,r){const a=[];for(const s of r){if("aborted"===s.status)return t.INVALID;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const r=[];for(const e of t)r.push({key:await e.key,value:await e.value});return i.mergeObjectSync(e,r)}static mergeObjectSync(e,r){const a={};for(const s of r){const{key:r,value:n}=s;if("aborted"===r.status)return t.INVALID;if("aborted"===n.status)return t.INVALID;"dirty"===r.status&&e.dirty(),"dirty"===n.status&&e.dirty(),(void 0!==n.value||s.alwaysSet)&&(a[r.value]=n.value)}return{status:e.value,value:a}}}t.ParseStatus=i,t.INVALID=Object.freeze({status:"aborted"}),t.DIRTY=e=>({status:"dirty",value:e}),t.OK=e=>({status:"valid",value:e}),t.isAborted=e=>"aborted"===e.status,t.isDirty=e=>"dirty"===e.status,t.isValid=e=>"valid"===e.status,t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise},116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9110:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),a={};for(const e of r)a[e]=t[e];return e.objectValues(a)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r=t.util||(t.util={})),t.ZodParsedType=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),t.getParsedType=e=>{switch(typeof e){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(e)?t.ZodParsedType.array:null===e?t.ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?t.ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?t.ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?t.ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}}},8754:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return s(t,e),t},i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=n(r(6349));t.z=o,i(r(6349),t),t.default=o},9349:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const a=r(9110),s=r(8280);t.default=(e,t)=>{let r;switch(e.code){case s.ZodIssueCode.invalid_type:r=e.received===a.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case s.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,a.util.jsonStringifyReplacer)}`;break;case s.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.util.joinValues(e.keys,", ")}`;break;case s.ZodIssueCode.invalid_union:r="Invalid input";break;case s.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.util.joinValues(e.options)}`;break;case s.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${a.util.joinValues(e.options)}, received '${e.received}'`;break;case s.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case s.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case s.ZodIssueCode.invalid_date:r="Invalid date";break;case s.ZodIssueCode.invalid_string:"object"==typeof e.validation?"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:a.util.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case s.ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:"Invalid input";break;case s.ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:"Invalid input";break;case s.ZodIssueCode.custom:r="Invalid input";break;case s.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case s.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case s.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,a.util.assertNever(e)}return{message:r}}},5433:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.date=t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.objectUtil=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=void 0;const a=r(6996),s=r(8762),n=r(3187),i=r(9110),o=r(8280);class d{constructor(e,t,r,a){this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._path.concat(this._key)}}const u=(e,t)=>{if((0,n.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new o.ZodError(e.common.issues)}};function c(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:a,description:s}=e;if(t&&(r||a))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:s}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=a?a:t.defaultError}:{message:null!=r?r:t.defaultError},description:s}}class l{constructor(e){this.spa=this.safeParseAsync,this._def=e,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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,i.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,i.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new n.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,i.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,n.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const a={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,i.getParsedType)(e)},s=this._parseSync({data:e,path:a.path,parent:a});return u(a,s)}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,i.getParsedType)(e)},a=this._parse({data:e,path:r.path,parent:r}),s=await((0,n.isAsync)(a)?a:Promise.resolve(a));return u(r,s)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,a)=>{const s=e(t),n=()=>a.addIssue({code:o.ZodIssueCode.custom,...r(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(n(),!1))):!!s||(n(),!1)}))}refinement(e,t){return this._refinement(((r,a)=>!!e(r)||(a.addIssue("function"==typeof t?t(r,a):t),!1)))}_refinement(e){return new G({schema:this,typeName:ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return J.create(this,this._def)}nullable(){return Y.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this,this._def)}promise(){return H.create(this,this._def)}or(e){return N.create([this,e],this._def)}and(e){return E.create(this,e,this._def)}transform(e){return new G({...c(this._def),schema:this,typeName:ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Q({...c(this._def),innerType:this,defaultValue:t,typeName:ae.ZodDefault})}brand(){return new te({typeName:ae.ZodBranded,type:this,...c(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new X({...c(this._def),innerType:this,catchValue:t,typeName:ae.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return re.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=l,t.Schema=l,t.ZodSchema=l;const p=/^c[^\s-]{8,}$/i,h=/^[a-z][a-z0-9]*$/,m=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/;class y extends l{constructor(){super(...arguments),this._regex=(e,t,r)=>this.refinement((t=>e.test(t)),{validation:t,code:o.ZodIssueCode.invalid_string,...s.errorUtil.errToObj(r)}),this.nonempty=e=>this.min(1,s.errorUtil.errToObj(e)),this.trim=()=>new y({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.string,received:t.parsedType}),n.INVALID}const t=new n.ParseStatus;let r;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const a=e.data.length>s.value,i=e.data.length<s.value;(a||i)&&(r=this._getOrReturnCtx(e,r),a?(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)f.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"email",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)m.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"uuid",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)p.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"cuid",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)h.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"cuid2",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(a){r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"url",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"regex",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"startsWith"===s.kind?e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?((a=s).precision?a.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`):0===a.precision?a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),t.dirty()):i.util.assertNever(s);var a;return{status:t.value,value:e.data}}_addCheck(e){return new y({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errorUtil.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...s.errorUtil.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errorUtil.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function g(e,t){const r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=r>a?r:a;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}t.ZodString=y,y.create=e=>{var t;return new y({checks:[],typeName:ae.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class v extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.number,received:t.parsedType}),n.INVALID}let t;const r=new n.ParseStatus;for(const a of this._def.checks)"int"===a.kind?i.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"multipleOf"===a.kind?0!==g(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.not_finite,message:a.message}),r.dirty()):i.util.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,r,a){return new v({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.errorUtil.toString(a)}]})}_addCheck(e){return new v({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&i.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}t.ZodNumber=v,v.create=e=>new v({checks:[],typeName:ae.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class _ extends l{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==i.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.bigint,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodBigInt=_,_.create=e=>{var t;return new _({typeName:ae.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class b extends l{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==i.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.boolean,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodBoolean=b,b.create=e=>new b({typeName:ae.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class Z extends l{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.date,received:t.parsedType}),n.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_date}),n.INVALID}const t=new n.ParseStatus;let r;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):i.util.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}t.ZodDate=Z,Z.create=e=>new Z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ae.ZodDate,...c(e)});class P extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.symbol,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodSymbol=P,P.create=e=>new P({typeName:ae.ZodSymbol,...c(e)});class x extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.undefined,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodUndefined=x,x.create=e=>new x({typeName:ae.ZodUndefined,...c(e)});class T extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.null,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodNull=T,T.create=e=>new T({typeName:ae.ZodNull,...c(e)});class I extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodAny=I,I.create=e=>new I({typeName:ae.ZodAny,...c(e)});class j extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodUnknown=j,j.create=e=>new j({typeName:ae.ZodUnknown,...c(e)});class O extends l{_parse(e){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.never,received:t.parsedType}),n.INVALID}}t.ZodNever=O,O.create=e=>new O({typeName:ae.ZodNever,...c(e)});class k extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.void,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodVoid=k,k.create=e=>new k({typeName:ae.ZodVoid,...c(e)});class w extends l{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==i.ZodParsedType.array)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.array,received:t.parsedType}),n.INVALID;if(null!==a.exactLength){const e=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(e||s)&&((0,n.addIssueToContext)(t,{code:e?o.ZodIssueCode.too_big:o.ZodIssueCode.too_small,minimum:s?a.exactLength.value:void 0,maximum:e?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(null!==a.minLength&&t.data.length<a.minLength.value&&((0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),null!==a.maxLength&&t.data.length>a.maxLength.value&&((0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>a.type._parseAsync(new d(t,e,t.path,r))))).then((e=>n.ParseStatus.mergeArray(r,e)));const s=[...t.data].map(((e,r)=>a.type._parseSync(new d(t,e,t.path,r))));return n.ParseStatus.mergeArray(r,s)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}var C;function D(e){if(e instanceof A){const t={};for(const r in e.shape){const a=e.shape[r];t[r]=J.create(D(a))}return new A({...e._def,shape:()=>t})}return e instanceof w?w.create(D(e.element)):e instanceof J?J.create(D(e.unwrap())):e instanceof Y?Y.create(D(e.unwrap())):e instanceof L?L.create(e.items.map((e=>D(e)))):e}t.ZodArray=w,w.create=(e,t)=>new w({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ae.ZodArray,...c(t)}),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(C=t.objectUtil||(t.objectUtil={}));class A extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=i.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.object,received:t.parsedType}),n.INVALID}const{status:t,ctx:r}=this._processInputParams(e),{shape:a,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof O&&"strip"===this._def.unknownKeys))for(const e in r.data)s.includes(e)||u.push(e);const c=[];for(const e of s){const t=a[e],s=r.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new d(r,s,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof O){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of u)c.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)u.length>0&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.unrecognized_keys,keys:u}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of u){const a=r.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new d(r,a,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of c){const r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>n.ParseStatus.mergeObjectSync(t,e))):n.ParseStatus.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(e){return s.errorUtil.errToObj,new A({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var a,n,i,o;const d=null!==(i=null===(n=(a=this._def).errorMap)||void 0===n?void 0:n.call(a,t,r).message)&&void 0!==i?i:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=s.errorUtil.errToObj(e).message)&&void 0!==o?o:d}:{message:d}}}:{}})}strip(){return new A({...this._def,unknownKeys:"strip"})}passthrough(){return new A({...this._def,unknownKeys:"passthrough"})}extend(e){return new A({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new A({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>C.mergeShapes(this._def.shape(),e._def.shape()),typeName:ae.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new A({...this._def,catchall:e})}pick(e){const t={};return i.util.objectKeys(e).forEach((r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])})),new A({...this._def,shape:()=>t})}omit(e){const t={};return i.util.objectKeys(this.shape).forEach((r=>{e[r]||(t[r]=this.shape[r])})),new A({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};return i.util.objectKeys(this.shape).forEach((r=>{const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()})),new A({...this._def,shape:()=>t})}required(e){const t={};return i.util.objectKeys(this.shape).forEach((r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof J;)e=e._def.innerType;t[r]=e}})),new A({...this._def,shape:()=>t})}keyof(){return q(i.util.objectKeys(this.shape))}}t.ZodObject=A,A.create=(e,t)=>new A({shape:()=>e,unknownKeys:"strip",catchall:O.create(),typeName:ae.ZodObject,...c(t)}),A.strictCreate=(e,t)=>new A({shape:()=>e,unknownKeys:"strict",catchall:O.create(),typeName:ae.ZodObject,...c(t)}),A.lazycreate=(e,t)=>new A({shape:e,unknownKeys:"strip",catchall:O.create(),typeName:ae.ZodObject,...c(t)});class N extends l{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map((e=>new o.ZodError(e.ctx.common.issues)));return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union,unionErrors:r}),n.INVALID}));{let e;const a=[];for(const s of r){const r={...t,common:{...t.common,issues:[]},parent:null},n=s._parseSync({data:t.data,path:t.path,parent:r});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=a.map((e=>new o.ZodError(e)));return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union,unionErrors:s}),n.INVALID}}get options(){return this._def.options}}t.ZodUnion=N,N.create=(e,t)=>new N({options:e,typeName:ae.ZodUnion,...c(t)});const S=e=>e instanceof F?S(e.schema):e instanceof G?S(e.innerType()):e instanceof $?[e.value]:e instanceof B?e.options:e instanceof W?Object.keys(e.enum):e instanceof Q?S(e._def.innerType):e instanceof x?[void 0]:e instanceof T?[null]:null;class M extends l{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.ZodParsedType.object)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.object,received:t.parsedType}),n.INVALID;const r=this.discriminator,a=t.data[r],s=this.optionsMap.get(a);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):((0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),n.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const r of t){const t=S(r.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of t){if(a.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);a.set(s,r)}}return new M({typeName:ae.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...c(r)})}}function z(e,t){const r=(0,i.getParsedType)(e),a=(0,i.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(r===i.ZodParsedType.object&&a===i.ZodParsedType.object){const r=i.util.objectKeys(t),a=i.util.objectKeys(e).filter((e=>-1!==r.indexOf(e))),s={...e,...t};for(const r of a){const a=z(e[r],t[r]);if(!a.valid)return{valid:!1};s[r]=a.data}return{valid:!0,data:s}}if(r===i.ZodParsedType.array&&a===i.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const s=z(e[a],t[a]);if(!s.valid)return{valid:!1};r.push(s.data)}return{valid:!0,data:r}}return r===i.ZodParsedType.date&&a===i.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}t.ZodDiscriminatedUnion=M;class E extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(e,a)=>{if((0,n.isAborted)(e)||(0,n.isAborted)(a))return n.INVALID;const s=z(e.value,a.value);return s.valid?(((0,n.isDirty)(e)||(0,n.isDirty)(a))&&t.dirty(),{status:t.value,value:s.data}):((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_intersection_types}),n.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>a(e,t))):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}t.ZodIntersection=E,E.create=(e,t,r)=>new E({left:e,right:t,typeName:ae.ZodIntersection,...c(r)});class L extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.array)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.array,received:r.parsedType}),n.INVALID;if(r.data.length<this._def.items.length)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.INVALID;!this._def.rest&&r.data.length>this._def.items.length&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map(((e,t)=>{const a=this._def.items[t]||this._def.rest;return a?a._parse(new d(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(a).then((e=>n.ParseStatus.mergeArray(t,e))):n.ParseStatus.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new L({...this._def,rest:e})}}t.ZodTuple=L,L.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new L({items:e,typeName:ae.ZodTuple,rest:null,...c(t)})};class V extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.object)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.object,received:r.parsedType}),n.INVALID;const a=[],s=this._def.keyType,u=this._def.valueType;for(const e in r.data)a.push({key:s._parse(new d(r,e,r.path,e)),value:u._parse(new d(r,r.data[e],r.path,e))});return r.common.async?n.ParseStatus.mergeObjectAsync(t,a):n.ParseStatus.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return new V(t instanceof l?{keyType:e,valueType:t,typeName:ae.ZodRecord,...c(r)}:{keyType:y.create(),valueType:e,typeName:ae.ZodRecord,...c(t)})}}t.ZodRecord=V;class R extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.map)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.map,received:r.parsedType}),n.INVALID;const a=this._def.keyType,s=this._def.valueType,u=[...r.data.entries()].map((([e,t],n)=>({key:a._parse(new d(r,e,r.path,[n,"key"])),value:s._parse(new d(r,t,r.path,[n,"value"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of u){const a=await r.key,s=await r.value;if("aborted"===a.status||"aborted"===s.status)return n.INVALID;"dirty"!==a.status&&"dirty"!==s.status||t.dirty(),e.set(a.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of u){const a=r.key,s=r.value;if("aborted"===a.status||"aborted"===s.status)return n.INVALID;"dirty"!==a.status&&"dirty"!==s.status||t.dirty(),e.set(a.value,s.value)}return{status:t.value,value:e}}}}t.ZodMap=R,R.create=(e,t,r)=>new R({valueType:t,keyType:e,typeName:ae.ZodMap,...c(r)});class U extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.set)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.set,received:r.parsedType}),n.INVALID;const a=this._def;null!==a.minSize&&r.data.size<a.minSize.value&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),null!==a.maxSize&&r.data.size>a.maxSize.value&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const s=this._def.valueType;function u(e){const r=new Set;for(const a of e){if("aborted"===a.status)return n.INVALID;"dirty"===a.status&&t.dirty(),r.add(a.value)}return{status:t.value,value:r}}const c=[...r.data.values()].map(((e,t)=>s._parse(new d(r,e,r.path,t))));return r.common.async?Promise.all(c).then((e=>u(e))):u(c)}min(e,t){return new U({...this._def,minSize:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:s.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=U,U.create=(e,t)=>new U({valueType:e,minSize:null,maxSize:null,typeName:ae.ZodSet,...c(t)});class K extends l{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.ZodParsedType.function)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.function,received:t.parsedType}),n.INVALID;function r(e,r){return(0,n.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter((e=>!!e)),issueData:{code:o.ZodIssueCode.invalid_arguments,argumentsError:r}})}function s(e,r){return(0,n.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter((e=>!!e)),issueData:{code:o.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const d={errorMap:t.common.contextualErrorMap},u=t.data;return this._def.returns instanceof H?(0,n.OK)((async(...e)=>{const t=new o.ZodError([]),a=await this._def.args.parseAsync(e,d).catch((a=>{throw t.addIssue(r(e,a)),t})),n=await u(...a);return await this._def.returns._def.type.parseAsync(n,d).catch((e=>{throw t.addIssue(s(n,e)),t}))})):(0,n.OK)(((...e)=>{const t=this._def.args.safeParse(e,d);if(!t.success)throw new o.ZodError([r(e,t.error)]);const a=u(...t.data),n=this._def.returns.safeParse(a,d);if(!n.success)throw new o.ZodError([s(a,n.error)]);return n.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new K({...this._def,args:L.create(e).rest(j.create())})}returns(e){return new K({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new K({args:e||L.create([]).rest(j.create()),returns:t||j.create(),typeName:ae.ZodFunction,...c(r)})}}t.ZodFunction=K;class F extends l{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=F,F.create=(e,t)=>new F({getter:e,typeName:ae.ZodLazy,...c(t)});class $ extends l{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{received:t.data,code:o.ZodIssueCode.invalid_literal,expected:this._def.value}),n.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function q(e,t){return new B({values:e,typeName:ae.ZodEnum,...c(t)})}t.ZodLiteral=$,$.create=(e,t)=>new $({value:e,typeName:ae.ZodLiteral,...c(t)});class B extends l{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return(0,n.addIssueToContext)(t,{expected:i.util.joinValues(r),received:t.parsedType,code:o.ZodIssueCode.invalid_type}),n.INVALID}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return(0,n.addIssueToContext)(t,{received:t.data,code:o.ZodIssueCode.invalid_enum_value,options:r}),n.INVALID}return(0,n.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return B.create(e)}exclude(e){return B.create(this.options.filter((t=>!e.includes(t))))}}t.ZodEnum=B,B.create=q;class W extends l{_parse(e){const t=i.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==i.ZodParsedType.string&&r.parsedType!==i.ZodParsedType.number){const e=i.util.objectValues(t);return(0,n.addIssueToContext)(r,{expected:i.util.joinValues(e),received:r.parsedType,code:o.ZodIssueCode.invalid_type}),n.INVALID}if(-1===t.indexOf(e.data)){const e=i.util.objectValues(t);return(0,n.addIssueToContext)(r,{received:r.data,code:o.ZodIssueCode.invalid_enum_value,options:e}),n.INVALID}return(0,n.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=W,W.create=(e,t)=>new W({values:e,typeName:ae.ZodNativeEnum,...c(t)});class H extends l{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.ZodParsedType.promise&&!1===t.common.async)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.promise,received:t.parsedType}),n.INVALID;const r=t.parsedType===i.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,n.OK)(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}t.ZodPromise=H,H.create=(e,t)=>new H({type:e,typeName:ae.ZodPromise,...c(t)});class G extends l{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null;if("preprocess"===a.type){const e=a.transform(r.data);return r.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r}))):this._def.schema._parseSync({data:e,path:r.path,parent:r})}const s={addIssue:e=>{(0,n.addIssueToContext)(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),"refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===a.status?n.INVALID:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>"aborted"===r.status?n.INVALID:("dirty"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if("transform"===a.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!(0,n.isValid)(e))return e;const i=a.transform(e.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>(0,n.isValid)(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}i.util.assertNever(a)}}t.ZodEffects=G,t.ZodTransformer=G,G.create=(e,t,r)=>new G({schema:e,typeName:ae.ZodEffects,effect:t,...c(r)}),G.createWithPreprocess=(e,t,r)=>new G({schema:t,effect:{type:"preprocess",transform:e},typeName:ae.ZodEffects,...c(r)});class J extends l{_parse(e){return this._getType(e)===i.ZodParsedType.undefined?(0,n.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=J,J.create=(e,t)=>new J({innerType:e,typeName:ae.ZodOptional,...c(t)});class Y extends l{_parse(e){return this._getType(e)===i.ZodParsedType.null?(0,n.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=Y,Y.create=(e,t)=>new Y({innerType:e,typeName:ae.ZodNullable,...c(t)});class Q extends l{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===i.ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=Q,Q.create=(e,t)=>new Q({innerType:e,typeName:ae.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...c(t)});class X extends l{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.innerType._parse({data:t.data,path:t.path,parent:{...t,common:{...t.common,issues:[]}}});return(0,n.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue()}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue()}}removeCatch(){return this._def.innerType}}t.ZodCatch=X,X.create=(e,t)=>new X({innerType:e,typeName:ae.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...c(t)});class ee extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.nan,received:t.parsedType}),n.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=ee,ee.create=e=>new ee({typeName:ae.ZodNaN,...c(e)}),t.BRAND=Symbol("zod_brand");class te extends l{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=te;class re extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?n.INVALID:"dirty"===e.status?(t.dirty(),(0,n.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?n.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new re({in:e,out:t,typeName:ae.ZodPipeline})}}var ae;t.ZodPipeline=re,t.custom=(e,t={},r)=>e?I.create().superRefine(((a,s)=>{if(!e(a)){const e="function"==typeof t?t(a):t,n="string"==typeof e?{message:e}:e;s.addIssue({code:"custom",...n,fatal:r})}})):I.create(),t.late={object:A.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(ae=t.ZodFirstPartyTypeKind||(t.ZodFirstPartyTypeKind={})),t.instanceof=(e,r={message:`Input not instance of ${e.name}`})=>(0,t.custom)((t=>t instanceof e),r,!0);const se=y.create;t.string=se;const ne=v.create;t.number=ne;const ie=ee.create;t.nan=ie;const oe=_.create;t.bigint=oe;const de=b.create;t.boolean=de;const ue=Z.create;t.date=ue;const ce=P.create;t.symbol=ce;const le=x.create;t.undefined=le;const pe=T.create;t.null=pe;const he=I.create;t.any=he;const me=j.create;t.unknown=me;const fe=O.create;t.never=fe;const ye=k.create;t.void=ye;const ge=w.create;t.array=ge;const ve=A.create;t.object=ve;const _e=A.strictCreate;t.strictObject=_e;const be=N.create;t.union=be;const Ze=M.create;t.discriminatedUnion=Ze;const Pe=E.create;t.intersection=Pe;const xe=L.create;t.tuple=xe;const Te=V.create;t.record=Te;const Ie=R.create;t.map=Ie;const je=U.create;t.set=je;const Oe=K.create;t.function=Oe;const ke=F.create;t.lazy=ke;const we=$.create;t.literal=we;const Ce=B.create;t.enum=Ce;const De=W.create;t.nativeEnum=De;const Ae=H.create;t.promise=Ae;const Ne=G.create;t.effect=Ne,t.transformer=Ne;const Se=J.create;t.optional=Se;const Me=Y.create;t.nullable=Me;const ze=G.createWithPreprocess;t.preprocess=ze;const Ee=re.create;t.pipeline=Ee,t.ostring=()=>se().optional(),t.onumber=()=>ne().optional(),t.oboolean=()=>de().optional(),t.coerce={string:e=>y.create({...e,coerce:!0}),number:e=>v.create({...e,coerce:!0}),boolean:e=>b.create({...e,coerce:!0}),bigint:e=>_.create({...e,coerce:!0}),date:e=>Z.create({...e,coerce:!0})},t.NEVER=n.INVALID}},t={};return function r(a){var s=t[a];if(void 0!==s)return s.exports;var n=t[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(3607)})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@mintlify/validation"]=t():e["@mintlify/validation"]=t()}(this,(()=>(()=>{"use strict";var e={3607:function(e,t,r){var a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var a,s=0,n=t.length;s<n;s++)!a&&s in t||(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mintConfigSchema=t.validateMintConfig=void 0;var n,i,o,d,u,c,l,p=s(r(8841)),h=r(7059),m=r(3555),f=r(5815),y=r(5573),g=r(6217);t.validateMintConfig=function(e){var t,r=new m.MintValidationResults;if(null==e||null==e||0===Object.entries(e).length)return r.errors.push("Mint Config object cannot be empty."),r.status="error",r;var s=(0,y.validateAnchorsWarnings)(e.anchors,e.navigation),n=(0,g.validateVersionsInNavigation)(e.navigation,null!==(t=e.versions)&&void 0!==t?t:[]);r.errors=a(a([],r.errors,!0),n.errors,!0),r.warnings=a(a(a([],r.warnings,!0),n.warnings,!0),s.warnings,!0);var i=h.configSchema.safeParse(e);return 0==i.success&&i.error.issues.forEach((function(e){var t,a;if("invalid_union"===e.code&&(null===(a=e.unionErrors)||void 0===a?void 0:a.length)>0)(t=r.errors).push.apply(t,(0,f.flattenUnionErrorMessages)(e.unionErrors));else{var s=e.message;"Required"===s&&(s="Missing required field: "+e.path.join(".")),r.errors.push(s)}})),r.status=r.errors.length?"error":"success",r},t.mintConfigSchema=(null===(i=null===(n=(l=(0,p.default)(h.configSchema,"Schema")).definitions)||void 0===n?void 0:n.Schema)||void 0===i||delete i.properties.__injected,null===(d=null===(o=l.definitions)||void 0===o?void 0:o.Schema)||void 0===d||delete d.properties.colors.properties.ultraDark,null===(c=null===(u=l.definitions)||void 0===u?void 0:u.Schema)||void 0===c||delete c.properties.colors.properties.ultraLight,l)},1271:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.analyticsSchema=void 0;var a=r(8754),s=a.z.object({apiKey:a.z.string({required_error:"Amplitude apiKey is missing.",invalid_type_error:"Amplitude apiKey must be a string."})},{invalid_type_error:"Amplitude analytics config must be an object with an apiKey property."}),n=a.z.object({siteId:a.z.string({required_error:"Fathom siteId is missing.",invalid_type_error:"Fathom siteId must be a string."})},{invalid_type_error:"Fathom analytics config must be an object with a siteId property."}),i=a.z.object({measurementId:a.z.string({required_error:"Google Analytics measurementId is missing.",invalid_type_error:"Google Analytics measurementId must be a string."}).startsWith("G","Google Analytics measurementId must start with G.")},{invalid_type_error:"Google Analytics config must be an object with a measurementId property."}),o=a.z.object({tagId:a.z.string({required_error:"Google Tag Manager tagId is missing.",invalid_type_error:"Google Tag Manager tagId must be a string."}).startsWith("G","Google Tag Manager tagId must start with G.")},{invalid_type_error:"Google Tag Manager config must be an object with a tagId property."}),d=a.z.object({hjid:a.z.string({required_error:"Hotjar hjid is missing.",invalid_type_error:"Hotjar hjid must be a string."}),hjsv:a.z.string({required_error:"Hotjar hjsv is missing.",invalid_type_error:"Hotjar hjsv must be a string."})},{invalid_type_error:"Hotjar config must be an object with a hjid and hjsv property."}),u=a.z.object({publicApiKey:a.z.string({required_error:"Public Api Key is required for the Koala snippet to run.",invalid_type_error:"Koala Public Api Key must be a string."}).refine((function(e){return e.length>=2}),"Koala Public Api Key must have at least two characters")},{invalid_type_error:"Koala config must be an object with a publicApiKey property."}),c=a.z.object({appId:a.z.string({required_error:"Logrocket appId is missing.",invalid_type_error:"Logrocket appId must be a string."})},{invalid_type_error:"Logrocket config must be an object with an appId property."}),l=a.z.object({projectToken:a.z.string({required_error:"Mixpanel projectToken is missing.",invalid_type_error:"Mixpanel projectToken must be a string."})},{invalid_type_error:"Mixpanel config must be an object with a projectToken property."}),p=a.z.object({id:a.z.string({required_error:"Pirsch id is missing.",invalid_type_error:"Pirsch id must be a string."})},{invalid_type_error:"Pirsch config must be an object with an id property."}),h=a.z.object({apiKey:a.z.string({required_error:"Posthog apiKey is missing.",invalid_type_error:"Posthog apiKey must be a string."}).startsWith("phc_","Posthog apiKey must start with phc_"),apiHost:a.z.string({invalid_type_error:"Posthog apiHost must be a string."}).url("Posthog apiHost must be a valid URL.").optional()},{invalid_type_error:"Posthog config must be an object with an apiKey property."}),m=a.z.object({domain:a.z.string({required_error:"Plausible domain is missing.",invalid_type_error:"Plausible domain must be a string."}).refine((function(e){return!e.startsWith("http://")&&!e.startsWith("https://")}),"Plausible domain must not start with http:// or https://")},{invalid_type_error:"Plausible config must be an object with a domain property. The domain must not start with http:// or https://."});t.analyticsSchema=a.z.object({amplitude:s.optional(),fathom:n.optional(),ga4:i.optional(),gtm:o.optional(),hotjar:d.optional(),koala:u.optional(),logrocket:c.optional(),mixpanel:l.optional(),pirsch:p.optional(),posthog:h.optional(),plausible:m.optional()}).strict("Mintlify only supports analytics integrations from: amplitude, fathom, ga4, gtm, hotjar, koala, logrocket, mixpanel, pirsch, posthog and plausible.")},6249:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.anchorColorSchema=void 0;var a=r(8754),s=r(2609);t.anchorColorSchema=a.z.union([a.z.string({invalid_type_error:"Anchor color must be a string."}).regex(s.hexadecimalPattern,"Anchor color must be a hexadecimal color."),a.z.object({from:a.z.string({invalid_type_error:"Anchor color.from must be a string."}).regex(s.hexadecimalPattern,"Anchor color.from must be a hexadecimal color."),via:a.z.string({invalid_type_error:"Anchor color.via must be a string."}).regex(s.hexadecimalPattern,"Anchor color.via must be undefined or a hexadecimal color.").optional(),to:a.z.string({invalid_type_error:"Anchor color.to must be a string."}).regex(s.hexadecimalPattern,"Anchor color.to must be a hexadecimal color.")}).strict("Anchors with gradient colors can only have properties from, via, and to with valid hexadecimal colors.")],{invalid_type_error:"Anchor color must be a string or an object with from and to properties."})},3838:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.anchorsSchema=void 0;var a=r(8754),s=r(6249);t.anchorsSchema=a.z.object({name:a.z.string({required_error:"Every anchor must have a name.",invalid_type_error:"Anchor name must be a string."}).trim().min(1,"Anchor name is empty."),url:a.z.string({required_error:"Every anchor must have a url",invalid_type_error:"Anchor url must be a string."}).trim().min(1,"Anchor URL is missing."),icon:a.z.string({invalid_type_error:"Anchor icon must be the name of a Font Awesome icon. Visit this link to see all the available icons: https://fontawesome.com/icons"}).refine((function(e){return!e.startsWith("fa-")}),'icon does not need to start with "fa-". Please delete "fa-" and keep the rest of the icon name.').optional(),iconType:a.z.enum(["brands","duotone","light","sharp-solid","solid","thin"],{errorMap:function(){return{message:"anchor iconType must be one of the following strings: brands, duotone, light, sharp-solid, solid, thin"}}}).optional(),color:s.anchorColorSchema.optional(),isDefaultHidden:a.z.boolean({invalid_type_error:"Anchor isDefaultHidden must be a boolean. Try writing true or false without quotes around them."}).optional(),version:a.z.string({invalid_type_error:"Version must be a string in the versions array."}).optional()}).array()},6861:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.colorsSchema=void 0;var a=r(8754),s=r(6249),n=r(2609);t.colorsSchema=a.z.object({primary:a.z.string({invalid_type_error:"Primary color must be a string."}).min(1,"Color primary is missing.").regex(n.hexadecimalPattern,"Primary color must be a hexadecimal color including the # at the start."),light:a.z.string({invalid_type_error:"Light color must be a string."}).regex(n.hexadecimalPattern,"Light color must be a hexadecimal color including the # at the start.").optional(),dark:a.z.string({invalid_type_error:"Dark color must be a string."}).regex(n.hexadecimalPattern,"Dark color must be a hexadecimal color including the # at the start.").optional(),background:a.z.object({light:a.z.string({invalid_type_error:"Background light color must be a string."}).regex(n.hexadecimalPattern,"Background light color must be a hexadecimal color including the # at the start.").optional(),dark:a.z.string({invalid_type_error:"Background dark color must be a string."}).regex(n.hexadecimalPattern,"Background dark color must be a hexadecimal color including the # at the start.").optional()}).optional(),anchors:s.anchorColorSchema.optional(),ultraLight:a.z.any().optional(),ultraDark:a.z.any().optional()},{required_error:'Colors are missing. You need to define at least the primary color. For example: { "colors": { "primary": "#ff0000" } }',invalid_type_error:"Colors must be an object."}).strict("Some of the colors in mint.json are invalid, did you make a typo? We only accept primary, light, dark, background, and anchors.")},7059:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.configSchema=void 0;var a=r(8754),s=r(6861),n=r(5112),i=r(2341),o=r(9294),d=r(7243),u=r(3838),c=r(1271),l=a.z.union([a.z.string().min(3,"Logo needs to be a path to your logo file including the file extension."),a.z.object({light:a.z.string(),dark:a.z.string(),href:a.z.string().optional()})],{invalid_type_error:"Logo must be a string or an object with light and dark properties."}),p=a.z.object({baseUrl:a.z.union([a.z.string().url("api.baseUrl must be a valid URL."),a.z.array(a.z.string().url("api.baseUrl array entries must be valid URLs."))]).optional(),auth:a.z.object({method:a.z.string({invalid_type_error:"api.auth.method has to be a string equal to one of: bearer, basic, key"}).refine((function(e){return"bearer"===e||"basic"===e||"key"===e}),{message:"api.auth.method has to be one of: bearer, basic, key"}).optional(),name:a.z.string().optional(),inputPrefix:a.z.string().optional()}).strict("api.auth can only contain method, name, and inputPrefix.").optional(),hidePlayground:a.z.boolean({invalid_type_error:"hidePlayground must be a boolean. Try writing true or false without the quotes."}).optional()},{invalid_type_error:"api must be an object. The object can have baseUrl, auth, and hidePlayground as properties."}).strict("api can only contain baseUrl, auth, and hidePlayground as properties."),h=a.z.object({default:a.z.string().optional(),isHidden:a.z.boolean({invalid_type_error:"isHidden must be a boolean. Try writing true or false without the quotes."}).optional()}),m=function(e){return a.z.union([a.z.object({type:a.z.literal("link").optional(),name:a.z.string({required_error:"Name must be defined when using a CTA button",invalid_type_error:"Name must be a string"}),url:a.z.string({required_error:e+".url is missing",invalid_type_error:e+".url must be a string"}).min(1,e+".url cannot be empty")}).strict(e+" can only contain name, url, and type properties. Set a different type if you need to set other fields."),a.z.object({type:a.z.literal("github"),url:a.z.string({required_error:e+".url is missing. Please set the url to a link to your GitHub repository.",invalid_type_error:e+".url must be a string. Specifically, set the url to a link to your GitHub repository."}).url(e+".url must be a valid url pointing to your GitHub repository.")}).strict(e+' can only contain url and type properties when type="github". Please delete any other properties you have set.')],{invalid_type_error:e+' must be an object. The object can have type="link" (the default) if you define a url and a name. You can also have type="github" if you define a url pointing to your GitHub repo and set the type in the object.'})},f=a.z.union([a.z.array(a.z.object({type:a.z.string(),url:a.z.string().url("footerSocials url must be a valid url")})),a.z.record(a.z.string().trim().min(1,"footerSocials name (the key in the object) must not be empty"),a.z.string().url("footerSocials url (the value in the object) must be a valid url"))],{invalid_type_error:'footerSocials must be an object where the key is the name of the social media and the value is the url to your profile. For example: { "twitter": "https://twitter.com/mintlify" }'}),y=a.z.object({intercom:a.z.string({invalid_type_error:"integrations.intercom must be a string"}).min(6,"integrations.intercom must be a valid Intercom app ID").optional()},{invalid_type_error:"integrations must be an object"});t.configSchema=a.z.object({$schema:a.z.string().url().optional().default("https://mintlify.com/schema.json"),mintlify:a.z.string().optional(),name:i.nameSchema,logo:l.optional(),favicon:n.faviconSchema,openapi:a.z.string({invalid_type_error:"openapi must be a URL pointing to your OpenAPI file. If you are using a local file, you can delete the openapi property in mint.json"}).url("openapi must be a valid URL. If the openapi file is in your Mintlify folder, we will detect it automatically and you can delete the openapi property in mint.json").optional(),api:p.optional(),modeToggle:h.optional(),versions:o.versionsSchema.optional(),metadata:a.z.record(a.z.string({invalid_type_error:"metadata keys must be strings"}),a.z.string({invalid_type_error:"metadata values must be strings"}).min(1,"metadata values must not be empty")).optional(),colors:s.colorsSchema,topbarCtaButton:m("topbarCtaButton").optional(),topbarLinks:a.z.array(m("topbarLinks")).optional(),navigation:d.navigationConfigSchema,topAnchor:a.z.object({name:a.z.string({required_error:"topAnchor.name is missing, set it or delete the entire topAnchor property.",invalid_type_error:"topAnchor.name must be a string"}),icon:a.z.string({invalid_type_error:"topAnchor.icon must be a string"}).optional(),iconType:a.z.enum(["brands","duotone","light","sharp-solid","solid","thin"],{errorMap:function(){return{message:"topAnchor.iconType must be one of the following strings: brands, duotone, light, sharp-solid, solid, thin"}}}).optional()},{invalid_type_error:"topAnchor must be an object with a name property. Delete the topAnchor if you don't want to customize the values."}).strict("topAnchor can only have name, icon, and iconType properties.").optional(),anchors:u.anchorsSchema.optional(),footerSocials:f.optional(),backgroundImage:a.z.string().optional(),analytics:c.analyticsSchema.optional(),integrations:y.optional(),__injected:a.z.undefined({invalid_type_error:"Do not add __injected to mint.json. Mintlify uses this property internally."})})},5112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.faviconSchema=void 0;var a=r(8754);t.faviconSchema=a.z.string({required_error:"Favicon is missing. Please set favicon to the path of your favicon file. We recommend using a .svg or .png file. Mintlify automatically resizes your favicon to the sizes needed.",invalid_type_error:"Favicon must be a string path pointing to the favicon file in your Mintlify folder."}).refine((function(e){return"ico"!==e.split(".").pop()}),{message:"Favicon cannot be an .ico file."})},2341:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.nameSchema=void 0;var a=r(8754);t.nameSchema=a.z.string({required_error:"Name is missing."}).min(1,"Name cannot be empty.").trim()},7243:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.navigationConfigSchema=void 0;var a=r(8754),s=a.z.lazy((function(){return a.z.object({group:a.z.string({required_error:"Missing navigation group name.",invalid_type_error:"Group must be a string. We use the group name to create the navigation sidebar."}),pages:a.z.array(a.z.union([s,a.z.string().min(1,"Page cannot be an empty string.")])).min(1,"Pages array can't be empty."),version:a.z.string({invalid_type_error:"Version must be a string."}).optional()},{invalid_type_error:"Navigation entry must be an object."}).strict("Navigation entry can only contain group, pages, and version.")}));t.navigationConfigSchema=a.z.array(s,{required_error:"Navigation is missing.",invalid_type_error:"Navigation must be an array."}).min(1,"Navigation cannot be an empty array. Please add at least one group.")},9294:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.versionsSchema=void 0;var a=r(8754);t.versionsSchema=a.z.array(a.z.string({invalid_type_error:"Versions must be an array of strings."})).min(1,"Versions array cannot be empty. Either delete the property or add strings to the array.")},3555:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintValidationResults=void 0;t.MintValidationResults=function(){this.status="success",this.errors=[],this.warnings=[]}},5815:function(e,t){var r=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var a,s=0,n=t.length;s<n;s++)!a&&s in t||(a||(a=Array.prototype.slice.call(t,0,s)),a[s]=t[s]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.flattenUnionErrorMessages=void 0,t.flattenUnionErrorMessages=function e(t){return t.reduce((function(t,a){return Array.isArray(a.unionErrors)&&a.unionErrors.length>0?r(r([],t,!0),e(a.unionErrors),!0):r(r([],t,!0),[a.message],!1)}),[])}},2609:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hexadecimalPattern=void 0,t.hexadecimalPattern=/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/},5573:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAnchorsWarnings=void 0;var a=r(7243),s=r(3555);function n(e,t){return"string"==typeof e?e.startsWith(t):null!=e.pages&&e.pages.some((function(e){return n(e,t)}))}t.validateAnchorsWarnings=function(e,t){var r=new s.MintValidationResults;return null!=e&&Array.isArray(e)&&0!==e.length?t&&!0===a.navigationConfigSchema.safeParse(t).success&&e.forEach((function(e){e.url.startsWith("mailto:")||e.url.startsWith("http")||e.url.startsWith("https")||t.some((function(t){return n(t,e.url)}))||r.warnings.push("No pages in the navigation match anchor "+e.url+" you should have at least one page that starts with "+e.url)})):r.warnings.push("Mintlify runs without anchors but most sites look better with at least one."),r}},6217:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateVersionsInNavigation=t.flattenNavigationVersions=void 0;var a=r(7243),s=r(3555);function n(e,t){return void 0===t&&(t=[]),e.forEach((function(e){return null==e||"string"==typeof e?t:(e.version&&t.push(e.version),Array.isArray(e.pages)?n(e.pages,t):t)})),t}function i(e,t){if("string"==typeof e)return[];var r=[];return e.version&&null!=t&&e.version!==t&&r.push('Please do not set versions on groups nested inside a group that already has a version. The group "'.concat(e.group,'" has version "').concat(e.version,'" set and it is nested in a group that has the version "').concat(t,'" set.')),e.pages?r.concat(e.pages.map((function(r){return i(r,t||e.version)})).flat().filter(Boolean)):[]}t.flattenNavigationVersions=n,t.validateVersionsInNavigation=function(e,t){void 0===t&&(t=[]);var r=new s.MintValidationResults;if(null==e||!1===a.navigationConfigSchema.safeParse(e).success)return r;var o=n(e);return o.forEach((function(e){t.includes(e)||r.errors.push("Version ".concat(e," is not included in the versions array, but is used in the navigation. Please add ").concat(e," to the versions array."))})),0===o.length&&t.length>0&&r.warnings.push("You have versions defined in the config, but no versions are used in the navigation."),e.forEach((function(e){var t;(t=r.warnings).push.apply(t,i(e,null))})),r}},8841:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zodToJsonSchema=void 0;const a=r(4357);Object.defineProperty(t,"zodToJsonSchema",{enumerable:!0,get:function(){return a.zodToJsonSchema}}),t.default=a.zodToJsonSchema},7181:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultOptions=t.defaultOptions=void 0,t.defaultOptions={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1},t.getDefaultOptions=e=>"string"==typeof e?Object.assign(Object.assign({},t.defaultOptions),{name:e}):Object.assign(Object.assign({},t.defaultOptions),e)},1908:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRefs=void 0;const a=r(7181);t.getRefs=e=>{const t=(0,a.getDefaultOptions)(e),r=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return Object.assign(Object.assign({},t),{currentPath:r,propertyPath:void 0,seen:[]})}},6519:(e,t)=>{function r(e,t,r,a){(null==a?void 0:a.errorMessages)&&r&&(e.errorMessage=Object.assign(Object.assign({},e.errorMessage),{[t]:r}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setResponseValueAndErrors=t.addErrorMessage=void 0,t.addErrorMessage=r,t.setResponseValueAndErrors=function(e,t,a,s,n){e[t]=a,r(e,t,s,n)}},9959:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseDef=void 0;const a=r(8754),s=r(6840),n=r(2886),i=r(2722),o=r(5823),d=r(423),u=r(9444),c=r(4117),l=r(3245),p=r(4804),h=r(2105),m=r(2734),f=r(8392),y=r(8716),g=r(2295),v=r(2200),_=r(5907),b=r(993),Z=r(8490),P=r(938),x=r(8289),T=r(1250),I=r(9033),j=r(3564),O=r(9226),k=r(9229),w=r(3133),C=r(9646),D=r(8e3),N=r(34);function A(e,t){const r=t.seen.find((t=>Object.is(t.def,e)));if(r)return S(r,t);const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.push(a);const s=z(e,e.typeName,t);return s&&E(e,s),a.jsonSchema=s,s}t.parseDef=A;const S=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:0===e.path.length?"":1===e.path.length?`${e.path[0]}/`:e.path.join("/")};case"relative":return{$ref:M(t.currentPath,e.path)};case"none":return e.path.length<t.currentPath.length&&e.path.every(((e,r)=>t.currentPath[r]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):e.jsonSchema}},M=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")},z=(e,t,r)=>{switch(t){case a.ZodFirstPartyTypeKind.ZodString:return(0,k.parseStringDef)(e,r);case a.ZodFirstPartyTypeKind.ZodNumber:return(0,Z.parseNumberDef)(e,r);case a.ZodFirstPartyTypeKind.ZodObject:return(0,P.parseObjectDef)(e,r);case a.ZodFirstPartyTypeKind.ZodBigInt:return(0,i.parseBigintDef)();case a.ZodFirstPartyTypeKind.ZodBoolean:return(0,o.parseBooleanDef)();case a.ZodFirstPartyTypeKind.ZodDate:return(0,c.parseDateDef)();case a.ZodFirstPartyTypeKind.ZodUndefined:return(0,C.parseUndefinedDef)();case a.ZodFirstPartyTypeKind.ZodNull:return(0,_.parseNullDef)(r);case a.ZodFirstPartyTypeKind.ZodArray:return(0,n.parseArrayDef)(e,r);case a.ZodFirstPartyTypeKind.ZodUnion:case a.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return(0,D.parseUnionDef)(e,r);case a.ZodFirstPartyTypeKind.ZodIntersection:return(0,m.parseIntersectionDef)(e,r);case a.ZodFirstPartyTypeKind.ZodTuple:return(0,w.parseTupleDef)(e,r);case a.ZodFirstPartyTypeKind.ZodRecord:return(0,j.parseRecordDef)(e,r);case a.ZodFirstPartyTypeKind.ZodLiteral:return(0,f.parseLiteralDef)(e,r);case a.ZodFirstPartyTypeKind.ZodEnum:return(0,h.parseEnumDef)(e);case a.ZodFirstPartyTypeKind.ZodNativeEnum:return(0,g.parseNativeEnumDef)(e);case a.ZodFirstPartyTypeKind.ZodNullable:return(0,b.parseNullableDef)(e,r);case a.ZodFirstPartyTypeKind.ZodOptional:return(0,x.parseOptionalDef)(e,r);case a.ZodFirstPartyTypeKind.ZodMap:return(0,y.parseMapDef)(e,r);case a.ZodFirstPartyTypeKind.ZodSet:return(0,O.parseSetDef)(e,r);case a.ZodFirstPartyTypeKind.ZodLazy:return A(e.getter()._def,r);case a.ZodFirstPartyTypeKind.ZodPromise:return(0,I.parsePromiseDef)(e,r);case a.ZodFirstPartyTypeKind.ZodNaN:case a.ZodFirstPartyTypeKind.ZodNever:return(0,v.parseNeverDef)();case a.ZodFirstPartyTypeKind.ZodEffects:return(0,p.parseEffectsDef)(e,r);case a.ZodFirstPartyTypeKind.ZodAny:return(0,s.parseAnyDef)();case a.ZodFirstPartyTypeKind.ZodUnknown:return(0,N.parseUnknownDef)();case a.ZodFirstPartyTypeKind.ZodDefault:return(0,l.parseDefaultDef)(e,r);case a.ZodFirstPartyTypeKind.ZodBranded:return(0,d.parseBrandedDef)(e,r);case a.ZodFirstPartyTypeKind.ZodCatch:return(0,u.parseCatchDef)(e,r);case a.ZodFirstPartyTypeKind.ZodPipeline:return(0,T.parsePipelineDef)(e,r);case a.ZodFirstPartyTypeKind.ZodFunction:case a.ZodFirstPartyTypeKind.ZodVoid:case a.ZodFirstPartyTypeKind.ZodSymbol:default:return}},E=(e,t)=>(e.description&&(t.description=e.description),t)},6840:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseAnyDef=void 0,t.parseAnyDef=function(){return{}}},2886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseArrayDef=void 0;const a=r(8754),s=r(6519),n=r(9959);t.parseArrayDef=function(e,t){var r,i;const o={type:"array"};return(null===(i=null===(r=e.type)||void 0===r?void 0:r._def)||void 0===i?void 0:i.typeName)!==a.ZodFirstPartyTypeKind.ZodAny&&(o.items=(0,n.parseDef)(e.type._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items"]}))),e.minLength&&(0,s.setResponseValueAndErrors)(o,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&(0,s.setResponseValueAndErrors)(o,"maxItems",e.maxLength.value,e.maxLength.message,t),o}},2722:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBigintDef=void 0,t.parseBigintDef=function(){return{type:"integer",format:"int64"}}},5823:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBooleanDef=void 0,t.parseBooleanDef=function(){return{type:"boolean"}}},423:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseBrandedDef=void 0;const a=r(9959);t.parseBrandedDef=function(e,t){return(0,a.parseDef)(e.type._def,t)}},9444:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseCatchDef=void 0;const a=r(9959);t.parseCatchDef=(e,t)=>(0,a.parseDef)(e.innerType._def,t)},4117:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseDateDef=void 0,t.parseDateDef=function(){return{type:"string",format:"date-time"}}},3245:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseDefaultDef=void 0;const a=r(9959);t.parseDefaultDef=function(e,t){return Object.assign(Object.assign({},(0,a.parseDef)(e.innerType._def,t)),{default:e.defaultValue()})}},4804:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseEffectsDef=void 0;const a=r(9959);t.parseEffectsDef=function(e,t){return"input"===t.effectStrategy?(0,a.parseDef)(e.schema._def,t):{}}},2105:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseEnumDef=void 0,t.parseEnumDef=function(e){return{type:"string",enum:e.values}}},2734:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseIntersectionDef=void 0;const a=r(9959);t.parseIntersectionDef=function(e,t){const r=[(0,a.parseDef)(e.left._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf","0"]})),(0,a.parseDef)(e.right._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf","1"]}))].filter((e=>!!e));return r.length?{allOf:r}:void 0}},8392:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseLiteralDef=void 0,t.parseLiteralDef=function(e,t){const r=typeof e.value;return"bigint"!==r&&"number"!==r&&"boolean"!==r&&"string"!==r?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===r?"integer":r,enum:[e.value]}:{type:"bigint"===r?"integer":r,const:e.value}}},8716:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseMapDef=void 0;const a=r(9959);t.parseMapDef=function(e,t){return{type:"array",maxItems:125,items:{type:"array",items:[(0,a.parseDef)(e.keyType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items","items","0"]}))||{},(0,a.parseDef)(e.valueType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items","items","1"]}))||{}],minItems:2,maxItems:2}}}},2295:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNativeEnumDef=void 0,t.parseNativeEnumDef=function(e){const t=e.values,r=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),a=Array.from(new Set(r.map((e=>typeof e))));return{type:1===a.length?"string"===a[0]?"string":"number":["string","number"],enum:r}}},2200:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNeverDef=void 0,t.parseNeverDef=function(){return{not:{}}}},5907:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNullDef=void 0,t.parseNullDef=function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}},993:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNullableDef=void 0;const a=r(9959),s=r(8e3);t.parseNullableDef=function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:s.primitiveMappings[e.innerType._def.typeName],nullable:!0}:{type:[s.primitiveMappings[e.innerType._def.typeName],"null"]};const r=(0,a.parseDef)(e.innerType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"anyOf","0"]}));return r?"openApi3"===t.target?Object.assign(Object.assign({},r),{nullable:!0}):{anyOf:[r,{type:"null"}]}:void 0}},8490:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseNumberDef=void 0;const a=r(6519);t.parseNumberDef=function(e,t){const r={type:"number"};if(!e.checks)return r;for(const s of e.checks)switch(s.kind){case"int":r.type="integer",(0,a.addErrorMessage)(r,"type",s.message,t);break;case"min":"jsonSchema7"===t.target?s.inclusive?(0,a.setResponseValueAndErrors)(r,"minimum",s.value,s.message,t):(0,a.setResponseValueAndErrors)(r,"exclusiveMinimum",s.value,s.message,t):(s.inclusive||(r.exclusiveMinimum=!0),(0,a.setResponseValueAndErrors)(r,"minimum",s.value,s.message,t));break;case"max":"jsonSchema7"===t.target?s.inclusive?(0,a.setResponseValueAndErrors)(r,"maximum",s.value,s.message,t):(0,a.setResponseValueAndErrors)(r,"exclusiveMaximum",s.value,s.message,t):(s.inclusive||(r.exclusiveMaximum=!0),(0,a.setResponseValueAndErrors)(r,"maximum",s.value,s.message,t));break;case"multipleOf":(0,a.setResponseValueAndErrors)(r,"multipleOf",s.value,s.message,t)}return r}},938:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseObjectDef=void 0;const a=r(9959);t.parseObjectDef=function(e,t){var r;const s=Object.assign(Object.assign({type:"object"},Object.entries(e.shape()).reduce(((e,[r,s])=>{if(void 0===s||void 0===s._def)return e;const n=(0,a.parseDef)(s._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"properties",r],propertyPath:[...t.currentPath,"properties",r]}));return void 0===n?e:{properties:Object.assign(Object.assign({},e.properties),{[r]:n}),required:s.isOptional()?e.required:[...e.required,r]}}),{properties:{},required:[]})),{additionalProperties:"ZodNever"===e.catchall._def.typeName?"passthrough"===e.unknownKeys:null===(r=(0,a.parseDef)(e.catchall._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"additionalProperties"]})))||void 0===r||r});return s.required.length||delete s.required,s}},8289:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseOptionalDef=void 0;const a=r(9959);t.parseOptionalDef=(e,t)=>{var r;if(t.currentPath.toString()===(null===(r=t.propertyPath)||void 0===r?void 0:r.toString()))return(0,a.parseDef)(e.innerType._def,t);const s=(0,a.parseDef)(e.innerType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"anyOf","1"]}));return s?{anyOf:[{not:{}},s]}:{}}},1250:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parsePipelineDef=void 0;const a=r(9959);t.parsePipelineDef=(e,t)=>{const r=(0,a.parseDef)(e.in._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf","0"]}));return{allOf:[r,(0,a.parseDef)(e.out._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"allOf",r?"1":"0"]}))].filter((e=>void 0!==e))}}},9033:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parsePromiseDef=void 0;const a=r(9959);t.parsePromiseDef=function(e,t){return(0,a.parseDef)(e.type._def,t)}},3564:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRecordDef=void 0;const a=r(8754),s=r(9959),n=r(9229);t.parseRecordDef=function(e,t){var r,i,o;const d={type:"object",additionalProperties:(0,s.parseDef)(e.valueType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"additionalProperties"]}))||{}};if((null===(r=e.keyType)||void 0===r?void 0:r._def.typeName)===a.ZodFirstPartyTypeKind.ZodString&&(null===(i=e.keyType._def.checks)||void 0===i?void 0:i.length)){const r=Object.entries((0,n.parseStringDef)(e.keyType._def,t)).reduce(((e,[t,r])=>"type"===t?e:Object.assign(Object.assign({},e),{[t]:r})),{});return Object.assign(Object.assign({},d),{propertyNames:r})}return(null===(o=e.keyType)||void 0===o?void 0:o._def.typeName)===a.ZodFirstPartyTypeKind.ZodEnum?Object.assign(Object.assign({},d),{propertyNames:{enum:e.keyType._def.values}}):d}},9226:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseSetDef=void 0;const a=r(6519),s=r(9959);t.parseSetDef=function(e,t){const r={type:"array",items:(0,s.parseDef)(e.valueType._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items"]}))};return e.minSize&&(0,a.setResponseValueAndErrors)(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&(0,a.setResponseValueAndErrors)(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}},9229:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseStringDef=void 0;const a=r(6519);t.parseStringDef=function(e,t){const r={type:"string"};if(e.checks)for(const i of e.checks)switch(i.kind){case"min":(0,a.setResponseValueAndErrors)(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,i.value):i.value,i.message,t);break;case"max":(0,a.setResponseValueAndErrors)(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,i.value):i.value,i.message,t);break;case"email":(0,a.setResponseValueAndErrors)(r,"format","email",i.message,t);break;case"url":(0,a.setResponseValueAndErrors)(r,"format","uri",i.message,t);break;case"uuid":(0,a.setResponseValueAndErrors)(r,"format","uuid",i.message,t);break;case"regex":n(r,i.regex.source,i.message,t);break;case"cuid":n(r,"^c[^\\s-]{8,}$",i.message,t);break;case"cuid2":n(r,"^[a-z][a-z0-9]*$",i.message,t);break;case"startsWith":n(r,"^"+s(i.value),i.message,t);break;case"endsWith":n(r,s(i.value)+"$",i.message,t);break;case"trim":break;case"datetime":(0,a.setResponseValueAndErrors)(r,"format","date-time",i.message,t);break;case"length":(0,a.setResponseValueAndErrors)(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,i.value):i.value,i.message,t),(0,a.setResponseValueAndErrors)(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,i.value):i.value,i.message,t)}return r};const s=e=>Array.from(e).map((e=>/[a-zA-Z0-9]/.test(e)?e:`\\${e}`)).join(""),n=(e,t,r,s)=>{var n;e.pattern||(null===(n=e.allOf)||void 0===n?void 0:n.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(Object.assign({pattern:e.pattern},e.errorMessage&&s.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push(Object.assign({pattern:t},r&&s.errorMessages&&{errorMessage:{pattern:r}}))):(0,a.setResponseValueAndErrors)(e,"pattern",t,r,s)}},3133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseTupleDef=void 0;const a=r(9959);t.parseTupleDef=function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,r)=>(0,a.parseDef)(e._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items",`${r}`]})))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:(0,a.parseDef)(e.rest._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"additionalItems"]}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,r)=>(0,a.parseDef)(e._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"items",`${r}`]})))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}},9646:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUndefinedDef=void 0,t.parseUndefinedDef=function(){return{not:{}}}},8e3:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnionDef=t.primitiveMappings=void 0;const a=r(9959);t.primitiveMappings={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},t.parseUnionDef=function(e,r){if("openApi3"===r.target)return s(e,r);const a=e.options instanceof Map?Array.from(e.options.values()):e.options;if(a.every((e=>e._def.typeName in t.primitiveMappings&&(!e._def.checks||!e._def.checks.length)))){const e=a.reduce(((e,r)=>{const a=t.primitiveMappings[r._def.typeName];return a&&!e.includes(a)?[...e,a]:e}),[]);return{type:e.length>1?e:e[0]}}if(a.every((e=>"ZodLiteral"===e._def.typeName))){const e=a.reduce(((e,t)=>{const r=typeof t._def.value;switch(r){case"string":case"number":case"boolean":return[...e,r];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===a.length){const t=e.filter(((e,t,r)=>r.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:a.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(a.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:a.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return s(e,r)};const s=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,r)=>(0,a.parseDef)(e._def,Object.assign(Object.assign({},t),{currentPath:[...t.currentPath,"anyOf",`${r}`]})))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return r.length?{anyOf:r}:void 0}},34:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnknownDef=void 0,t.parseUnknownDef=function(){return{}}},4357:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.zodToJsonSchema=void 0;const a=r(9959),s=r(1908);t.zodToJsonSchema=(e,t)=>{var r;const n=(0,s.getRefs)(t),i="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,r])=>{var s;return Object.assign(Object.assign({},e),{[t]:null!==(s=(0,a.parseDef)(r._def,Object.assign(Object.assign({},n),{currentPath:[...n.basePath,n.definitionPath,t]})))&&void 0!==s?s:{}})}),{}):void 0,o="string"==typeof t?t:null==t?void 0:t.name,d=null!==(r=(0,a.parseDef)(e._def,void 0===o?n:Object.assign(Object.assign({},n),{currentPath:[...n.basePath,n.definitionPath,o]})))&&void 0!==r?r:{},u=void 0===o?i?Object.assign(Object.assign({},d),{[n.definitionPath]:i}):d:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:Object.assign(Object.assign({},i),{[o]:d})};return"jsonSchema7"===n.target&&(u.$schema="http://json-schema.org/draft-07/schema#"),u}},8280:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ZodError=t.quotelessJson=t.ZodIssueCode=void 0;const a=r(9110);t.ZodIssueCode=a.util.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"]),t.quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class s extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},r={_errors:[]},a=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(a);else if("invalid_return_type"===s.code)a(s.returnTypeError);else if("invalid_arguments"===s.code)a(s.argumentsError);else if(0===s.path.length)r._errors.push(t(s));else{let e=r,a=0;for(;a<s.path.length;){const r=s.path[a];a===s.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(s))):e[r]=e[r]||{_errors:[]},e=e[r],a++}}};return a(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},r=[];for(const a of this.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}t.ZodError=s,s.create=e=>new s(e)},6996:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorMap=t.setErrorMap=t.defaultErrorMap=void 0;const s=a(r(9349));t.defaultErrorMap=s.default;let n=s.default;t.setErrorMap=function(e){n=e},t.getErrorMap=function(){return n}},6349:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),s(r(6996),t),s(r(3187),t),s(r(116),t),s(r(9110),t),s(r(5433),t),s(r(8280),t)},8762:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.errorUtil=void 0,(r=t.errorUtil||(t.errorUtil={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},r.toString=e=>"string"==typeof e?e:null==e?void 0:e.message},3187:function(e,t,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=t.isValid=t.isDirty=t.isAborted=t.OK=t.DIRTY=t.INVALID=t.ParseStatus=t.addIssueToContext=t.EMPTY_PATH=t.makeIssue=void 0;const s=r(6996),n=a(r(9349));t.makeIssue=e=>{const{data:t,path:r,errorMaps:a,issueData:s}=e,n=[...r,...s.path||[]],i={...s,path:n};let o="";const d=a.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...s,path:n,message:s.message||o}},t.EMPTY_PATH=[],t.addIssueToContext=function(e,r){const a=(0,t.makeIssue)({issueData:r,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,(0,s.getErrorMap)(),n.default].filter((e=>!!e))});e.common.issues.push(a)};class i{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,r){const a=[];for(const s of r){if("aborted"===s.status)return t.INVALID;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const r=[];for(const e of t)r.push({key:await e.key,value:await e.value});return i.mergeObjectSync(e,r)}static mergeObjectSync(e,r){const a={};for(const s of r){const{key:r,value:n}=s;if("aborted"===r.status)return t.INVALID;if("aborted"===n.status)return t.INVALID;"dirty"===r.status&&e.dirty(),"dirty"===n.status&&e.dirty(),(void 0!==n.value||s.alwaysSet)&&(a[r.value]=n.value)}return{status:e.value,value:a}}}t.ParseStatus=i,t.INVALID=Object.freeze({status:"aborted"}),t.DIRTY=e=>({status:"dirty",value:e}),t.OK=e=>({status:"valid",value:e}),t.isAborted=e=>"aborted"===e.status,t.isDirty=e=>"dirty"===e.status,t.isValid=e=>"valid"===e.status,t.isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise},116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},9110:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.getParsedType=t.ZodParsedType=t.util=void 0,function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),a={};for(const e of r)a[e]=t[e];return e.objectValues(a)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r=t.util||(t.util={})),t.ZodParsedType=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),t.getParsedType=e=>{switch(typeof e){case"undefined":return t.ZodParsedType.undefined;case"string":return t.ZodParsedType.string;case"number":return isNaN(e)?t.ZodParsedType.nan:t.ZodParsedType.number;case"boolean":return t.ZodParsedType.boolean;case"function":return t.ZodParsedType.function;case"bigint":return t.ZodParsedType.bigint;case"symbol":return t.ZodParsedType.symbol;case"object":return Array.isArray(e)?t.ZodParsedType.array:null===e?t.ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?t.ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?t.ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?t.ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?t.ZodParsedType.date:t.ZodParsedType.object;default:return t.ZodParsedType.unknown}}},8754:function(e,t,r){var a=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&a(t,e,r);return s(t,e),t},i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||a(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.z=void 0;const o=n(r(6349));t.z=o,i(r(6349),t),t.default=o},9349:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const a=r(9110),s=r(8280);t.default=(e,t)=>{let r;switch(e.code){case s.ZodIssueCode.invalid_type:r=e.received===a.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case s.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,a.util.jsonStringifyReplacer)}`;break;case s.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.util.joinValues(e.keys,", ")}`;break;case s.ZodIssueCode.invalid_union:r="Invalid input";break;case s.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.util.joinValues(e.options)}`;break;case s.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${a.util.joinValues(e.options)}, received '${e.received}'`;break;case s.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case s.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case s.ZodIssueCode.invalid_date:r="Invalid date";break;case s.ZodIssueCode.invalid_string:"object"==typeof e.validation?"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:a.util.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case s.ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:"Invalid input";break;case s.ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:"Invalid input";break;case s.ZodIssueCode.custom:r="Invalid input";break;case s.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case s.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case s.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,a.util.assertNever(e)}return{message:r}}},5433:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.date=t.boolean=t.bigint=t.array=t.any=t.coerce=t.ZodFirstPartyTypeKind=t.late=t.ZodSchema=t.Schema=t.custom=t.ZodPipeline=t.ZodBranded=t.BRAND=t.ZodNaN=t.ZodCatch=t.ZodDefault=t.ZodNullable=t.ZodOptional=t.ZodTransformer=t.ZodEffects=t.ZodPromise=t.ZodNativeEnum=t.ZodEnum=t.ZodLiteral=t.ZodLazy=t.ZodFunction=t.ZodSet=t.ZodMap=t.ZodRecord=t.ZodTuple=t.ZodIntersection=t.ZodDiscriminatedUnion=t.ZodUnion=t.ZodObject=t.objectUtil=t.ZodArray=t.ZodVoid=t.ZodNever=t.ZodUnknown=t.ZodAny=t.ZodNull=t.ZodUndefined=t.ZodSymbol=t.ZodDate=t.ZodBoolean=t.ZodBigInt=t.ZodNumber=t.ZodString=t.ZodType=void 0,t.NEVER=t.void=t.unknown=t.union=t.undefined=t.tuple=t.transformer=t.symbol=t.string=t.strictObject=t.set=t.record=t.promise=t.preprocess=t.pipeline=t.ostring=t.optional=t.onumber=t.oboolean=t.object=t.number=t.nullable=t.null=t.never=t.nativeEnum=t.nan=t.map=t.literal=t.lazy=t.intersection=t.instanceof=t.function=t.enum=t.effect=t.discriminatedUnion=void 0;const a=r(6996),s=r(8762),n=r(3187),i=r(9110),o=r(8280);class d{constructor(e,t,r,a){this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._path.concat(this._key)}}const u=(e,t)=>{if((0,n.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new o.ZodError(e.common.issues)}};function c(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:a,description:s}=e;if(t&&(r||a))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:s}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=a?a:t.defaultError}:{message:null!=r?r:t.defaultError},description:s}}class l{constructor(e){this.spa=this.safeParseAsync,this._def=e,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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return(0,i.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,i.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new n.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,i.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,n.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const a={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,i.getParsedType)(e)},s=this._parseSync({data:e,path:a.path,parent:a});return u(a,s)}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,i.getParsedType)(e)},a=this._parse({data:e,path:r.path,parent:r}),s=await((0,n.isAsync)(a)?a:Promise.resolve(a));return u(r,s)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,a)=>{const s=e(t),n=()=>a.addIssue({code:o.ZodIssueCode.custom,...r(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(n(),!1))):!!s||(n(),!1)}))}refinement(e,t){return this._refinement(((r,a)=>!!e(r)||(a.addIssue("function"==typeof t?t(r,a):t),!1)))}_refinement(e){return new G({schema:this,typeName:ae.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return J.create(this,this._def)}nullable(){return Y.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this,this._def)}promise(){return H.create(this,this._def)}or(e){return A.create([this,e],this._def)}and(e){return E.create(this,e,this._def)}transform(e){return new G({...c(this._def),schema:this,typeName:ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Q({...c(this._def),innerType:this,defaultValue:t,typeName:ae.ZodDefault})}brand(){return new te({typeName:ae.ZodBranded,type:this,...c(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new X({...c(this._def),innerType:this,catchValue:t,typeName:ae.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return re.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}t.ZodType=l,t.Schema=l,t.ZodSchema=l;const p=/^c[^\s-]{8,}$/i,h=/^[a-z][a-z0-9]*$/,m=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/;class y extends l{constructor(){super(...arguments),this._regex=(e,t,r)=>this.refinement((t=>e.test(t)),{validation:t,code:o.ZodIssueCode.invalid_string,...s.errorUtil.errToObj(r)}),this.nonempty=e=>this.min(1,s.errorUtil.errToObj(e)),this.trim=()=>new y({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==i.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.string,received:t.parsedType}),n.INVALID}const t=new n.ParseStatus;let r;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const a=e.data.length>s.value,i=e.data.length<s.value;(a||i)&&(r=this._getOrReturnCtx(e,r),a?(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):i&&(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)f.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"email",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)m.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"uuid",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)p.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"cuid",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)h.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"cuid2",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(a){r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"url",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{validation:"regex",code:o.ZodIssueCode.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"startsWith"===s.kind?e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?((a=s).precision?a.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${a.precision}}Z$`):0===a.precision?a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):a.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),t.dirty()):i.util.assertNever(s);var a;return{status:t.value,value:e.data}}_addCheck(e){return new y({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...s.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...s.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...s.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...s.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...s.errorUtil.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...s.errorUtil.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...s.errorUtil.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...s.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...s.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...s.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...s.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...s.errorUtil.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function g(e,t){const r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=r>a?r:a;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}t.ZodString=y,y.create=e=>{var t;return new y({checks:[],typeName:ae.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class v extends l{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==i.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.number,received:t.parsedType}),n.INVALID}let t;const r=new n.ParseStatus;for(const a of this._def.checks)"int"===a.kind?i.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"multipleOf"===a.kind?0!==g(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.not_finite,message:a.message}),r.dirty()):i.util.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,s.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,s.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,s.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,s.errorUtil.toString(t))}setLimit(e,t,r,a){return new v({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.errorUtil.toString(a)}]})}_addCheck(e){return new v({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:s.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:s.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:s.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&i.util.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}t.ZodNumber=v,v.create=e=>new v({checks:[],typeName:ae.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class _ extends l{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==i.ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.bigint,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodBigInt=_,_.create=e=>{var t;return new _({typeName:ae.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class b extends l{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==i.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.boolean,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodBoolean=b,b.create=e=>new b({typeName:ae.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class Z extends l{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==i.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.date,received:t.parsedType}),n.INVALID}if(isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_date}),n.INVALID}const t=new n.ParseStatus;let r;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(r=this._getOrReturnCtx(e,r),(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):i.util.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:s.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:s.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}t.ZodDate=Z,Z.create=e=>new Z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ae.ZodDate,...c(e)});class P extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.symbol,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodSymbol=P,P.create=e=>new P({typeName:ae.ZodSymbol,...c(e)});class x extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.undefined,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodUndefined=x,x.create=e=>new x({typeName:ae.ZodUndefined,...c(e)});class T extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.null,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodNull=T,T.create=e=>new T({typeName:ae.ZodNull,...c(e)});class I extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodAny=I,I.create=e=>new I({typeName:ae.ZodAny,...c(e)});class j extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodUnknown=j,j.create=e=>new j({typeName:ae.ZodUnknown,...c(e)});class O extends l{_parse(e){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.never,received:t.parsedType}),n.INVALID}}t.ZodNever=O,O.create=e=>new O({typeName:ae.ZodNever,...c(e)});class k extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.void,received:t.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}t.ZodVoid=k,k.create=e=>new k({typeName:ae.ZodVoid,...c(e)});class w extends l{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==i.ZodParsedType.array)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.array,received:t.parsedType}),n.INVALID;if(null!==a.exactLength){const e=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(e||s)&&((0,n.addIssueToContext)(t,{code:e?o.ZodIssueCode.too_big:o.ZodIssueCode.too_small,minimum:s?a.exactLength.value:void 0,maximum:e?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(null!==a.minLength&&t.data.length<a.minLength.value&&((0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),null!==a.maxLength&&t.data.length>a.maxLength.value&&((0,n.addIssueToContext)(t,{code:o.ZodIssueCode.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map(((e,r)=>a.type._parseAsync(new d(t,e,t.path,r))))).then((e=>n.ParseStatus.mergeArray(r,e)));const s=[...t.data].map(((e,r)=>a.type._parseSync(new d(t,e,t.path,r))));return n.ParseStatus.mergeArray(r,s)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}var C;function D(e){if(e instanceof N){const t={};for(const r in e.shape){const a=e.shape[r];t[r]=J.create(D(a))}return new N({...e._def,shape:()=>t})}return e instanceof w?w.create(D(e.element)):e instanceof J?J.create(D(e.unwrap())):e instanceof Y?Y.create(D(e.unwrap())):e instanceof L?L.create(e.items.map((e=>D(e)))):e}t.ZodArray=w,w.create=(e,t)=>new w({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ae.ZodArray,...c(t)}),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(C=t.objectUtil||(t.objectUtil={}));class N extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=i.util.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==i.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.object,received:t.parsedType}),n.INVALID}const{status:t,ctx:r}=this._processInputParams(e),{shape:a,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof O&&"strip"===this._def.unknownKeys))for(const e in r.data)s.includes(e)||u.push(e);const c=[];for(const e of s){const t=a[e],s=r.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new d(r,s,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof O){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of u)c.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)u.length>0&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.unrecognized_keys,keys:u}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of u){const a=r.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new d(r,a,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of c){const r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>n.ParseStatus.mergeObjectSync(t,e))):n.ParseStatus.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(e){return s.errorUtil.errToObj,new N({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var a,n,i,o;const d=null!==(i=null===(n=(a=this._def).errorMap)||void 0===n?void 0:n.call(a,t,r).message)&&void 0!==i?i:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=s.errorUtil.errToObj(e).message)&&void 0!==o?o:d}:{message:d}}}:{}})}strip(){return new N({...this._def,unknownKeys:"strip"})}passthrough(){return new N({...this._def,unknownKeys:"passthrough"})}extend(e){return new N({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new N({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>C.mergeShapes(this._def.shape(),e._def.shape()),typeName:ae.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new N({...this._def,catchall:e})}pick(e){const t={};return i.util.objectKeys(e).forEach((r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])})),new N({...this._def,shape:()=>t})}omit(e){const t={};return i.util.objectKeys(this.shape).forEach((r=>{e[r]||(t[r]=this.shape[r])})),new N({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};return i.util.objectKeys(this.shape).forEach((r=>{const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()})),new N({...this._def,shape:()=>t})}required(e){const t={};return i.util.objectKeys(this.shape).forEach((r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof J;)e=e._def.innerType;t[r]=e}})),new N({...this._def,shape:()=>t})}keyof(){return q(i.util.objectKeys(this.shape))}}t.ZodObject=N,N.create=(e,t)=>new N({shape:()=>e,unknownKeys:"strip",catchall:O.create(),typeName:ae.ZodObject,...c(t)}),N.strictCreate=(e,t)=>new N({shape:()=>e,unknownKeys:"strict",catchall:O.create(),typeName:ae.ZodObject,...c(t)}),N.lazycreate=(e,t)=>new N({shape:e,unknownKeys:"strip",catchall:O.create(),typeName:ae.ZodObject,...c(t)});class A extends l{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map((async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map((e=>new o.ZodError(e.ctx.common.issues)));return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union,unionErrors:r}),n.INVALID}));{let e;const a=[];for(const s of r){const r={...t,common:{...t.common,issues:[]},parent:null},n=s._parseSync({data:t.data,path:t.path,parent:r});if("valid"===n.status)return n;"dirty"!==n.status||e||(e={result:n,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=a.map((e=>new o.ZodError(e)));return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union,unionErrors:s}),n.INVALID}}get options(){return this._def.options}}t.ZodUnion=A,A.create=(e,t)=>new A({options:e,typeName:ae.ZodUnion,...c(t)});const S=e=>e instanceof F?S(e.schema):e instanceof G?S(e.innerType()):e instanceof $?[e.value]:e instanceof B?e.options:e instanceof W?Object.keys(e.enum):e instanceof Q?S(e._def.innerType):e instanceof x?[void 0]:e instanceof T?[null]:null;class M extends l{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.ZodParsedType.object)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.object,received:t.parsedType}),n.INVALID;const r=this.discriminator,a=t.data[r],s=this.optionsMap.get(a);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):((0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),n.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const r of t){const t=S(r.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of t){if(a.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);a.set(s,r)}}return new M({typeName:ae.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...c(r)})}}function z(e,t){const r=(0,i.getParsedType)(e),a=(0,i.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(r===i.ZodParsedType.object&&a===i.ZodParsedType.object){const r=i.util.objectKeys(t),a=i.util.objectKeys(e).filter((e=>-1!==r.indexOf(e))),s={...e,...t};for(const r of a){const a=z(e[r],t[r]);if(!a.valid)return{valid:!1};s[r]=a.data}return{valid:!0,data:s}}if(r===i.ZodParsedType.array&&a===i.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const s=z(e[a],t[a]);if(!s.valid)return{valid:!1};r.push(s.data)}return{valid:!0,data:r}}return r===i.ZodParsedType.date&&a===i.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}t.ZodDiscriminatedUnion=M;class E extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(e,a)=>{if((0,n.isAborted)(e)||(0,n.isAborted)(a))return n.INVALID;const s=z(e.value,a.value);return s.valid?(((0,n.isDirty)(e)||(0,n.isDirty)(a))&&t.dirty(),{status:t.value,value:s.data}):((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_intersection_types}),n.INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then((([e,t])=>a(e,t))):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}t.ZodIntersection=E,E.create=(e,t,r)=>new E({left:e,right:t,typeName:ae.ZodIntersection,...c(r)});class L extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.array)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.array,received:r.parsedType}),n.INVALID;if(r.data.length<this._def.items.length)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.INVALID;!this._def.rest&&r.data.length>this._def.items.length&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map(((e,t)=>{const a=this._def.items[t]||this._def.rest;return a?a._parse(new d(r,e,r.path,t)):null})).filter((e=>!!e));return r.common.async?Promise.all(a).then((e=>n.ParseStatus.mergeArray(t,e))):n.ParseStatus.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new L({...this._def,rest:e})}}t.ZodTuple=L,L.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new L({items:e,typeName:ae.ZodTuple,rest:null,...c(t)})};class V extends l{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.object)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.object,received:r.parsedType}),n.INVALID;const a=[],s=this._def.keyType,u=this._def.valueType;for(const e in r.data)a.push({key:s._parse(new d(r,e,r.path,e)),value:u._parse(new d(r,r.data[e],r.path,e))});return r.common.async?n.ParseStatus.mergeObjectAsync(t,a):n.ParseStatus.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return new V(t instanceof l?{keyType:e,valueType:t,typeName:ae.ZodRecord,...c(r)}:{keyType:y.create(),valueType:e,typeName:ae.ZodRecord,...c(t)})}}t.ZodRecord=V;class R extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.map)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.map,received:r.parsedType}),n.INVALID;const a=this._def.keyType,s=this._def.valueType,u=[...r.data.entries()].map((([e,t],n)=>({key:a._parse(new d(r,e,r.path,[n,"key"])),value:s._parse(new d(r,t,r.path,[n,"value"]))})));if(r.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const r of u){const a=await r.key,s=await r.value;if("aborted"===a.status||"aborted"===s.status)return n.INVALID;"dirty"!==a.status&&"dirty"!==s.status||t.dirty(),e.set(a.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const r of u){const a=r.key,s=r.value;if("aborted"===a.status||"aborted"===s.status)return n.INVALID;"dirty"!==a.status&&"dirty"!==s.status||t.dirty(),e.set(a.value,s.value)}return{status:t.value,value:e}}}}t.ZodMap=R,R.create=(e,t,r)=>new R({valueType:t,keyType:e,typeName:ae.ZodMap,...c(r)});class U extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==i.ZodParsedType.set)return(0,n.addIssueToContext)(r,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.set,received:r.parsedType}),n.INVALID;const a=this._def;null!==a.minSize&&r.data.size<a.minSize.value&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),null!==a.maxSize&&r.data.size>a.maxSize.value&&((0,n.addIssueToContext)(r,{code:o.ZodIssueCode.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const s=this._def.valueType;function u(e){const r=new Set;for(const a of e){if("aborted"===a.status)return n.INVALID;"dirty"===a.status&&t.dirty(),r.add(a.value)}return{status:t.value,value:r}}const c=[...r.data.values()].map(((e,t)=>s._parse(new d(r,e,r.path,t))));return r.common.async?Promise.all(c).then((e=>u(e))):u(c)}min(e,t){return new U({...this._def,minSize:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:s.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}t.ZodSet=U,U.create=(e,t)=>new U({valueType:e,minSize:null,maxSize:null,typeName:ae.ZodSet,...c(t)});class K extends l{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.ZodParsedType.function)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.function,received:t.parsedType}),n.INVALID;function r(e,r){return(0,n.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter((e=>!!e)),issueData:{code:o.ZodIssueCode.invalid_arguments,argumentsError:r}})}function s(e,r){return(0,n.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,a.getErrorMap)(),a.defaultErrorMap].filter((e=>!!e)),issueData:{code:o.ZodIssueCode.invalid_return_type,returnTypeError:r}})}const d={errorMap:t.common.contextualErrorMap},u=t.data;return this._def.returns instanceof H?(0,n.OK)((async(...e)=>{const t=new o.ZodError([]),a=await this._def.args.parseAsync(e,d).catch((a=>{throw t.addIssue(r(e,a)),t})),n=await u(...a);return await this._def.returns._def.type.parseAsync(n,d).catch((e=>{throw t.addIssue(s(n,e)),t}))})):(0,n.OK)(((...e)=>{const t=this._def.args.safeParse(e,d);if(!t.success)throw new o.ZodError([r(e,t.error)]);const a=u(...t.data),n=this._def.returns.safeParse(a,d);if(!n.success)throw new o.ZodError([s(a,n.error)]);return n.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new K({...this._def,args:L.create(e).rest(j.create())})}returns(e){return new K({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new K({args:e||L.create([]).rest(j.create()),returns:t||j.create(),typeName:ae.ZodFunction,...c(r)})}}t.ZodFunction=K;class F extends l{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}t.ZodLazy=F,F.create=(e,t)=>new F({getter:e,typeName:ae.ZodLazy,...c(t)});class $ extends l{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{received:t.data,code:o.ZodIssueCode.invalid_literal,expected:this._def.value}),n.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function q(e,t){return new B({values:e,typeName:ae.ZodEnum,...c(t)})}t.ZodLiteral=$,$.create=(e,t)=>new $({value:e,typeName:ae.ZodLiteral,...c(t)});class B extends l{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return(0,n.addIssueToContext)(t,{expected:i.util.joinValues(r),received:t.parsedType,code:o.ZodIssueCode.invalid_type}),n.INVALID}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return(0,n.addIssueToContext)(t,{received:t.data,code:o.ZodIssueCode.invalid_enum_value,options:r}),n.INVALID}return(0,n.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return B.create(e)}exclude(e){return B.create(this.options.filter((t=>!e.includes(t))))}}t.ZodEnum=B,B.create=q;class W extends l{_parse(e){const t=i.util.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==i.ZodParsedType.string&&r.parsedType!==i.ZodParsedType.number){const e=i.util.objectValues(t);return(0,n.addIssueToContext)(r,{expected:i.util.joinValues(e),received:r.parsedType,code:o.ZodIssueCode.invalid_type}),n.INVALID}if(-1===t.indexOf(e.data)){const e=i.util.objectValues(t);return(0,n.addIssueToContext)(r,{received:r.data,code:o.ZodIssueCode.invalid_enum_value,options:e}),n.INVALID}return(0,n.OK)(e.data)}get enum(){return this._def.values}}t.ZodNativeEnum=W,W.create=(e,t)=>new W({values:e,typeName:ae.ZodNativeEnum,...c(t)});class H extends l{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==i.ZodParsedType.promise&&!1===t.common.async)return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.promise,received:t.parsedType}),n.INVALID;const r=t.parsedType===i.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,n.OK)(r.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}t.ZodPromise=H,H.create=(e,t)=>new H({type:e,typeName:ae.ZodPromise,...c(t)});class G extends l{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ae.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null;if("preprocess"===a.type){const e=a.transform(r.data);return r.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r}))):this._def.schema._parseSync({data:e,path:r.path,parent:r})}const s={addIssue:e=>{(0,n.addIssueToContext)(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),"refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===a.status?n.INVALID:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((r=>"aborted"===r.status?n.INVALID:("dirty"===r.status&&t.dirty(),e(r.value).then((()=>({status:t.value,value:r.value}))))))}if("transform"===a.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!(0,n.isValid)(e))return e;const i=a.transform(e.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>(0,n.isValid)(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}i.util.assertNever(a)}}t.ZodEffects=G,t.ZodTransformer=G,G.create=(e,t,r)=>new G({schema:e,typeName:ae.ZodEffects,effect:t,...c(r)}),G.createWithPreprocess=(e,t,r)=>new G({schema:t,effect:{type:"preprocess",transform:e},typeName:ae.ZodEffects,...c(r)});class J extends l{_parse(e){return this._getType(e)===i.ZodParsedType.undefined?(0,n.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodOptional=J,J.create=(e,t)=>new J({innerType:e,typeName:ae.ZodOptional,...c(t)});class Y extends l{_parse(e){return this._getType(e)===i.ZodParsedType.null?(0,n.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}t.ZodNullable=Y,Y.create=(e,t)=>new Y({innerType:e,typeName:ae.ZodNullable,...c(t)});class Q extends l{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===i.ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}t.ZodDefault=Q,Q.create=(e,t)=>new Q({innerType:e,typeName:ae.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...c(t)});class X extends l{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.innerType._parse({data:t.data,path:t.path,parent:{...t,common:{...t.common,issues:[]}}});return(0,n.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue()}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue()}}removeCatch(){return this._def.innerType}}t.ZodCatch=X,X.create=(e,t)=>new X({innerType:e,typeName:ae.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...c(t)});class ee extends l{_parse(e){if(this._getType(e)!==i.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:o.ZodIssueCode.invalid_type,expected:i.ZodParsedType.nan,received:t.parsedType}),n.INVALID}return{status:"valid",value:e.data}}}t.ZodNaN=ee,ee.create=e=>new ee({typeName:ae.ZodNaN,...c(e)}),t.BRAND=Symbol("zod_brand");class te extends l{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}t.ZodBranded=te;class re extends l{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?n.INVALID:"dirty"===e.status?(t.dirty(),(0,n.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?n.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new re({in:e,out:t,typeName:ae.ZodPipeline})}}var ae;t.ZodPipeline=re,t.custom=(e,t={},r)=>e?I.create().superRefine(((a,s)=>{if(!e(a)){const e="function"==typeof t?t(a):t,n="string"==typeof e?{message:e}:e;s.addIssue({code:"custom",...n,fatal:r})}})):I.create(),t.late={object:N.lazycreate},function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(ae=t.ZodFirstPartyTypeKind||(t.ZodFirstPartyTypeKind={})),t.instanceof=(e,r={message:`Input not instance of ${e.name}`})=>(0,t.custom)((t=>t instanceof e),r,!0);const se=y.create;t.string=se;const ne=v.create;t.number=ne;const ie=ee.create;t.nan=ie;const oe=_.create;t.bigint=oe;const de=b.create;t.boolean=de;const ue=Z.create;t.date=ue;const ce=P.create;t.symbol=ce;const le=x.create;t.undefined=le;const pe=T.create;t.null=pe;const he=I.create;t.any=he;const me=j.create;t.unknown=me;const fe=O.create;t.never=fe;const ye=k.create;t.void=ye;const ge=w.create;t.array=ge;const ve=N.create;t.object=ve;const _e=N.strictCreate;t.strictObject=_e;const be=A.create;t.union=be;const Ze=M.create;t.discriminatedUnion=Ze;const Pe=E.create;t.intersection=Pe;const xe=L.create;t.tuple=xe;const Te=V.create;t.record=Te;const Ie=R.create;t.map=Ie;const je=U.create;t.set=je;const Oe=K.create;t.function=Oe;const ke=F.create;t.lazy=ke;const we=$.create;t.literal=we;const Ce=B.create;t.enum=Ce;const De=W.create;t.nativeEnum=De;const Ne=H.create;t.promise=Ne;const Ae=G.create;t.effect=Ae,t.transformer=Ae;const Se=J.create;t.optional=Se;const Me=Y.create;t.nullable=Me;const ze=G.createWithPreprocess;t.preprocess=ze;const Ee=re.create;t.pipeline=Ee,t.ostring=()=>se().optional(),t.onumber=()=>ne().optional(),t.oboolean=()=>de().optional(),t.coerce={string:e=>y.create({...e,coerce:!0}),number:e=>v.create({...e,coerce:!0}),boolean:e=>b.create({...e,coerce:!0}),bigint:e=>_.create({...e,coerce:!0}),date:e=>Z.create({...e,coerce:!0})},t.NEVER=n.INVALID}},t={};return function r(a){var s=t[a];if(void 0!==s)return s.exports;var n=t[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(3607)})()));
@@ -17,7 +17,7 @@ export declare const configSchema: z.ZodObject<{
17
17
  dark: string;
18
18
  }>]>>;
19
19
  favicon: z.ZodEffects<z.ZodString, string, string>;
20
- openApi: z.ZodOptional<z.ZodString>;
20
+ openapi: z.ZodOptional<z.ZodString>;
21
21
  api: z.ZodOptional<z.ZodObject<{
22
22
  baseUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
23
23
  auth: z.ZodOptional<z.ZodObject<{
@@ -409,7 +409,7 @@ export declare const configSchema: z.ZodObject<{
409
409
  light: string;
410
410
  dark: string;
411
411
  } | undefined;
412
- openApi?: string | undefined;
412
+ openapi?: string | undefined;
413
413
  api?: {
414
414
  baseUrl?: string | string[] | undefined;
415
415
  auth?: {
@@ -533,7 +533,7 @@ export declare const configSchema: z.ZodObject<{
533
533
  light: string;
534
534
  dark: string;
535
535
  } | undefined;
536
- openApi?: string | undefined;
536
+ openapi?: string | undefined;
537
537
  api?: {
538
538
  baseUrl?: string | string[] | undefined;
539
539
  auth?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/validation",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Validates mint.json files",
5
5
  "author": "Mintlify, Inc.",
6
6
  "repository": {