@mintlify/validation 0.1.4 → 0.1.7

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/README.md CHANGED
@@ -29,7 +29,7 @@ The package returns an object with the properties `status`, `warnings`, and `err
29
29
 
30
30
  `errors` is a string array of errors that will likely break the site.
31
31
 
32
- When `status === "error"` you should stop trying to build `mint`, your `mint.json` file is invalid and will the site will crash when building.
32
+ When `status === "error"` you should stop trying to build `mint`, your `mint.json` file is invalid and the site will crash when building.
33
33
 
34
34
  ## Return Value Example
35
35
 
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({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."}),c=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."}),l=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."}),p=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."}),h=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(),logrocket:u.optional(),hotjar:d.optional(),mixpanel:c.optional(),pirsch:l.optional(),posthog:p.optional(),plausible:h.optional()}).strict("Mintlify only supports analytics integrations from: amplitude, fathom, ga4, gtm, hotjar, 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(),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.union([a.z.literal("bearer"),a.z.literal("basic"),a.z.literal("key")],{invalid_type_error:"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()},{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 and icon 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("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"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=>void 0!==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)}nullable(){return Y.create(this)}nullish(){return this.optional().nullable()}array(){return k.create(this)}promise(){return H.create(this)}or(e){return A.create([this,e])}and(e){return E.create(this,e)}transform(e){return new G({schema:this,typeName:ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new Q({innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:ae.ZodDefault})}brand(){return new te({typeName:ae.ZodBranded,type:this,...c(void 0)})}catch(e){return new X({innerType:this,defaultValue:"function"==typeof e?e:()=>e,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-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,m=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;class f 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 f({...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)m.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)h.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("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 f({...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)})}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 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 y(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=f,f.create=e=>{var t;return new f({checks:[],typeName:ae.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class g 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!==y(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 g({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.errorUtil.toString(a)}]})}_addCheck(e){return new g({...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))}}t.ZodNumber=g,g.create=e=>new g({checks:[],typeName:ae.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class v 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=v,v.create=e=>{var t;return new v({typeName:ae.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class _ 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=_,_.create=e=>new _({typeName:ae.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class b 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 b({...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=b,b.create=e=>new b({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ae.ZodDate,...c(e)});class Z 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=Z,Z.create=e=>new Z({typeName:ae.ZodSymbol,...c(e)});class P 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=P,P.create=e=>new P({typeName:ae.ZodUndefined,...c(e)});class x 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=x,x.create=e=>new x({typeName:ae.ZodNull,...c(e)});class T extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodAny=T,T.create=e=>new T({typeName:ae.ZodAny,...c(e)});class I extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodUnknown=I,I.create=e=>new I({typeName:ae.ZodUnknown,...c(e)});class j 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=j,j.create=e=>new j({typeName:ae.ZodNever,...c(e)});class O 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=O,O.create=e=>new O({typeName:ae.ZodVoid,...c(e)});class k 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 k({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new k({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new k({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}var w;t.ZodArray=k,k.create=(e,t)=>new k({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ae.ZodArray,...c(t)}),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(w=t.objectUtil||(t.objectUtil={}));const C=e=>t=>new N({...e,shape:()=>({...e.shape(),...t})});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 k?k.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}class N extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=C(this._def),this.extend=C(this._def)}_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 j&&"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 j){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"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new N({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>w.mergeShapes(this._def.shape(),e._def.shape()),typeName:ae.ZodObject})}catchall(e){return new N({...this._def,catchall:e})}pick(e){const t={};return i.util.objectKeys(e).map((e=>{this.shape[e]&&(t[e]=this.shape[e])})),new N({...this._def,shape:()=>t})}omit(e){const t={};return i.util.objectKeys(this.shape).map((r=>{-1===i.util.objectKeys(e).indexOf(r)&&(t[r]=this.shape[r])})),new N({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};if(e)return i.util.objectKeys(this.shape).map((r=>{-1===i.util.objectKeys(e).indexOf(r)?t[r]=this.shape[r]:t[r]=this.shape[r].optional()})),new N({...this._def,shape:()=>t});for(const e in this.shape){const r=this.shape[e];t[e]=r.optional()}return new N({...this._def,shape:()=>t})}required(e){const t={};if(e)i.util.objectKeys(this.shape).map((r=>{if(-1===i.util.objectKeys(e).indexOf(r))t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof J;)e=e._def.innerType;t[r]=e}}));else for(const e in this.shape){let r=this.shape[e];for(;r instanceof J;)r=r._def.innerType;t[e]=r}return 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:j.create(),typeName:ae.ZodObject,...c(t)}),N.strictCreate=(e,t)=>new N({shape:()=>e,unknownKeys:"strict",catchall:j.create(),typeName:ae.ZodObject,...c(t)}),N.lazycreate=(e,t)=>new N({shape:e,unknownKeys:"strip",catchall:j.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 P?[void 0]:e instanceof x?[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:f.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(I.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(I.create()),returns:t||I.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,{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}}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{_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});return(0,n.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.defaultValue()}))):{status:"valid",value:"valid"===r.status?r.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}}t.ZodCatch=X,X.create=(e,t)=>new X({innerType:e,typeName:ae.ZodCatch,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...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?T.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})}})):T.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=f.create;t.string=se;const ne=g.create;t.number=ne;const ie=ee.create;t.nan=ie;const oe=v.create;t.bigint=oe;const de=_.create;t.boolean=de;const ue=b.create;t.date=ue;const ce=Z.create;t.symbol=ce;const le=P.create;t.undefined=le;const pe=x.create;t.null=pe;const he=T.create;t.any=he;const me=I.create;t.unknown=me;const fe=j.create;t.never=fe;const ye=O.create;t.void=ye;const ge=k.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=>f.create({...e,coerce:!0}),number:e=>g.create({...e,coerce:!0}),boolean:e=>_.create({...e,coerce:!0}),bigint:e=>v.create({...e,coerce:!0}),date:e=>b.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({projectId:a.z.string({required_error:"Project ID is required for the snippet to run.",invalid_type_error:"Koala Project ID must be a string."}).refine((function(e){return e.length>=2}),"Koala Project ID must have at least two characters")},{invalid_type_error:"Koala config must be an object with a projectId 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://."}),f=a.z.object({writeKey:a.z.string({required_error:"Write key is missing.",invalid_type_error:"Write key must be a string."})},{invalid_type_error:"Segment config must be an object with a writeKey property."});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(),segment:f.optional()}).strict("Mintlify only supports analytics integrations from: amplitude, fathom, ga4, gtm, hotjar, koala, logrocket, mixpanel, pirsch, posthog, plausible, and segment.")},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(),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()},{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 and icon 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"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=>void 0!==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)}nullable(){return Y.create(this)}nullish(){return this.optional().nullable()}array(){return k.create(this)}promise(){return H.create(this)}or(e){return A.create([this,e])}and(e){return E.create(this,e)}transform(e){return new G({schema:this,typeName:ae.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new Q({innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:ae.ZodDefault})}brand(){return new te({typeName:ae.ZodBranded,type:this,...c(void 0)})}catch(e){return new X({innerType:this,defaultValue:"function"==typeof e?e:()=>e,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-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,m=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;class f 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 f({...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)m.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)h.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("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 f({...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)})}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 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 y(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=f,f.create=e=>{var t;return new f({checks:[],typeName:ae.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class g 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!==y(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 g({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:s.errorUtil.toString(a)}]})}_addCheck(e){return new g({...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))}}t.ZodNumber=g,g.create=e=>new g({checks:[],typeName:ae.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class v 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=v,v.create=e=>{var t;return new v({typeName:ae.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...c(e)})};class _ 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=_,_.create=e=>new _({typeName:ae.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...c(e)});class b 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 b({...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=b,b.create=e=>new b({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ae.ZodDate,...c(e)});class Z 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=Z,Z.create=e=>new Z({typeName:ae.ZodSymbol,...c(e)});class P 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=P,P.create=e=>new P({typeName:ae.ZodUndefined,...c(e)});class x 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=x,x.create=e=>new x({typeName:ae.ZodNull,...c(e)});class T extends l{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodAny=T,T.create=e=>new T({typeName:ae.ZodAny,...c(e)});class I extends l{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,n.OK)(e.data)}}t.ZodUnknown=I,I.create=e=>new I({typeName:ae.ZodUnknown,...c(e)});class j 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=j,j.create=e=>new j({typeName:ae.ZodNever,...c(e)});class O 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=O,O.create=e=>new O({typeName:ae.ZodVoid,...c(e)});class k 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 k({...this._def,minLength:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new k({...this._def,maxLength:{value:e,message:s.errorUtil.toString(t)}})}length(e,t){return new k({...this._def,exactLength:{value:e,message:s.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}var w;t.ZodArray=k,k.create=(e,t)=>new k({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ae.ZodArray,...c(t)}),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(w=t.objectUtil||(t.objectUtil={}));const C=e=>t=>new N({...e,shape:()=>({...e.shape(),...t})});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 k?k.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}class N extends l{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=C(this._def),this.extend=C(this._def)}_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 j&&"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 j){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"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new N({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>w.mergeShapes(this._def.shape(),e._def.shape()),typeName:ae.ZodObject})}catchall(e){return new N({...this._def,catchall:e})}pick(e){const t={};return i.util.objectKeys(e).map((e=>{this.shape[e]&&(t[e]=this.shape[e])})),new N({...this._def,shape:()=>t})}omit(e){const t={};return i.util.objectKeys(this.shape).map((r=>{-1===i.util.objectKeys(e).indexOf(r)&&(t[r]=this.shape[r])})),new N({...this._def,shape:()=>t})}deepPartial(){return D(this)}partial(e){const t={};if(e)return i.util.objectKeys(this.shape).map((r=>{-1===i.util.objectKeys(e).indexOf(r)?t[r]=this.shape[r]:t[r]=this.shape[r].optional()})),new N({...this._def,shape:()=>t});for(const e in this.shape){const r=this.shape[e];t[e]=r.optional()}return new N({...this._def,shape:()=>t})}required(e){const t={};if(e)i.util.objectKeys(this.shape).map((r=>{if(-1===i.util.objectKeys(e).indexOf(r))t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof J;)e=e._def.innerType;t[r]=e}}));else for(const e in this.shape){let r=this.shape[e];for(;r instanceof J;)r=r._def.innerType;t[e]=r}return 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:j.create(),typeName:ae.ZodObject,...c(t)}),N.strictCreate=(e,t)=>new N({shape:()=>e,unknownKeys:"strict",catchall:j.create(),typeName:ae.ZodObject,...c(t)}),N.lazycreate=(e,t)=>new N({shape:e,unknownKeys:"strip",catchall:j.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 P?[void 0]:e instanceof x?[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:f.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 K 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 K({...this._def,minSize:{value:e,message:s.errorUtil.toString(t)}})}max(e,t){return new K({...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=K,K.create=(e,t)=>new K({valueType:e,minSize:null,maxSize:null,typeName:ae.ZodSet,...c(t)});class U 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 U({...this._def,args:L.create(e).rest(I.create())})}returns(e){return new U({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new U({args:e||L.create([]).rest(I.create()),returns:t||I.create(),typeName:ae.ZodFunction,...c(r)})}}t.ZodFunction=U;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,{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}}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{_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});return(0,n.isAsync)(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.defaultValue()}))):{status:"valid",value:"valid"===r.status?r.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}}t.ZodCatch=X,X.create=(e,t)=>new X({innerType:e,typeName:ae.ZodCatch,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...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?T.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})}})):T.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=f.create;t.string=se;const ne=g.create;t.number=ne;const ie=ee.create;t.nan=ie;const oe=v.create;t.bigint=oe;const de=_.create;t.boolean=de;const ue=b.create;t.date=ue;const ce=Z.create;t.symbol=ce;const le=P.create;t.undefined=le;const pe=x.create;t.null=pe;const he=T.create;t.any=he;const me=I.create;t.unknown=me;const fe=j.create;t.never=fe;const ye=O.create;t.void=ye;const ge=k.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=K.create;t.set=je;const Oe=U.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=>f.create({...e,coerce:!0}),number:e=>g.create({...e,coerce:!0}),boolean:e=>_.create({...e,coerce:!0}),bigint:e=>v.create({...e,coerce:!0}),date:e=>b.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)})()));
@@ -28,13 +28,6 @@ export declare const analyticsSchema: z.ZodObject<{
28
28
  }, {
29
29
  tagId: string;
30
30
  }>>;
31
- logrocket: z.ZodOptional<z.ZodObject<{
32
- appId: z.ZodString;
33
- }, "strip", z.ZodTypeAny, {
34
- appId: string;
35
- }, {
36
- appId: string;
37
- }>>;
38
31
  hotjar: z.ZodOptional<z.ZodObject<{
39
32
  hjid: z.ZodString;
40
33
  hjsv: z.ZodString;
@@ -45,6 +38,20 @@ export declare const analyticsSchema: z.ZodObject<{
45
38
  hjid: string;
46
39
  hjsv: string;
47
40
  }>>;
41
+ koala: z.ZodOptional<z.ZodObject<{
42
+ projectId: z.ZodEffects<z.ZodString, string, string>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ projectId: string;
45
+ }, {
46
+ projectId: string;
47
+ }>>;
48
+ logrocket: z.ZodOptional<z.ZodObject<{
49
+ appId: z.ZodString;
50
+ }, "strip", z.ZodTypeAny, {
51
+ appId: string;
52
+ }, {
53
+ appId: string;
54
+ }>>;
48
55
  mixpanel: z.ZodOptional<z.ZodObject<{
49
56
  projectToken: z.ZodString;
50
57
  }, "strip", z.ZodTypeAny, {
@@ -76,6 +83,13 @@ export declare const analyticsSchema: z.ZodObject<{
76
83
  }, {
77
84
  domain: string;
78
85
  }>>;
86
+ segment: z.ZodOptional<z.ZodObject<{
87
+ writeKey: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ writeKey: string;
90
+ }, {
91
+ writeKey: string;
92
+ }>>;
79
93
  }, "strict", z.ZodTypeAny, {
80
94
  amplitude?: {
81
95
  apiKey: string;
@@ -89,13 +103,16 @@ export declare const analyticsSchema: z.ZodObject<{
89
103
  gtm?: {
90
104
  tagId: string;
91
105
  } | undefined;
92
- logrocket?: {
93
- appId: string;
94
- } | undefined;
95
106
  hotjar?: {
96
107
  hjid: string;
97
108
  hjsv: string;
98
109
  } | undefined;
110
+ koala?: {
111
+ projectId: string;
112
+ } | undefined;
113
+ logrocket?: {
114
+ appId: string;
115
+ } | undefined;
99
116
  mixpanel?: {
100
117
  projectToken: string;
101
118
  } | undefined;
@@ -109,6 +126,9 @@ export declare const analyticsSchema: z.ZodObject<{
109
126
  plausible?: {
110
127
  domain: string;
111
128
  } | undefined;
129
+ segment?: {
130
+ writeKey: string;
131
+ } | undefined;
112
132
  }, {
113
133
  amplitude?: {
114
134
  apiKey: string;
@@ -122,13 +142,16 @@ export declare const analyticsSchema: z.ZodObject<{
122
142
  gtm?: {
123
143
  tagId: string;
124
144
  } | undefined;
125
- logrocket?: {
126
- appId: string;
127
- } | undefined;
128
145
  hotjar?: {
129
146
  hjid: string;
130
147
  hjsv: string;
131
148
  } | undefined;
149
+ koala?: {
150
+ projectId: string;
151
+ } | undefined;
152
+ logrocket?: {
153
+ appId: string;
154
+ } | undefined;
132
155
  mixpanel?: {
133
156
  projectToken: string;
134
157
  } | undefined;
@@ -142,4 +165,7 @@ export declare const analyticsSchema: z.ZodObject<{
142
165
  plausible?: {
143
166
  domain: string;
144
167
  } | undefined;
168
+ segment?: {
169
+ writeKey: string;
170
+ } | undefined;
145
171
  }>;
@@ -21,16 +21,16 @@ export declare const configSchema: z.ZodObject<{
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<{
24
- method: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"bearer">, z.ZodLiteral<"basic">, z.ZodLiteral<"key">]>>;
24
+ method: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
25
25
  name: z.ZodOptional<z.ZodString>;
26
26
  inputPrefix: z.ZodOptional<z.ZodString>;
27
27
  }, "strict", z.ZodTypeAny, {
28
28
  name?: string | undefined;
29
- method?: "bearer" | "basic" | "key" | undefined;
29
+ method?: string | undefined;
30
30
  inputPrefix?: string | undefined;
31
31
  }, {
32
32
  name?: string | undefined;
33
- method?: "bearer" | "basic" | "key" | undefined;
33
+ method?: string | undefined;
34
34
  inputPrefix?: string | undefined;
35
35
  }>>;
36
36
  hidePlayground: z.ZodOptional<z.ZodBoolean>;
@@ -38,7 +38,7 @@ export declare const configSchema: z.ZodObject<{
38
38
  baseUrl?: string | string[] | undefined;
39
39
  auth?: {
40
40
  name?: string | undefined;
41
- method?: "bearer" | "basic" | "key" | undefined;
41
+ method?: string | undefined;
42
42
  inputPrefix?: string | undefined;
43
43
  } | undefined;
44
44
  hidePlayground?: boolean | undefined;
@@ -46,7 +46,7 @@ export declare const configSchema: z.ZodObject<{
46
46
  baseUrl?: string | string[] | undefined;
47
47
  auth?: {
48
48
  name?: string | undefined;
49
- method?: "bearer" | "basic" | "key" | undefined;
49
+ method?: string | undefined;
50
50
  inputPrefix?: string | undefined;
51
51
  } | undefined;
52
52
  hidePlayground?: boolean | undefined;
@@ -260,13 +260,6 @@ export declare const configSchema: z.ZodObject<{
260
260
  }, {
261
261
  tagId: string;
262
262
  }>>;
263
- logrocket: z.ZodOptional<z.ZodObject<{
264
- appId: z.ZodString;
265
- }, "strip", z.ZodTypeAny, {
266
- appId: string;
267
- }, {
268
- appId: string;
269
- }>>;
270
263
  hotjar: z.ZodOptional<z.ZodObject<{
271
264
  hjid: z.ZodString;
272
265
  hjsv: z.ZodString;
@@ -277,6 +270,20 @@ export declare const configSchema: z.ZodObject<{
277
270
  hjid: string;
278
271
  hjsv: string;
279
272
  }>>;
273
+ koala: z.ZodOptional<z.ZodObject<{
274
+ projectId: z.ZodEffects<z.ZodString, string, string>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ projectId: string;
277
+ }, {
278
+ projectId: string;
279
+ }>>;
280
+ logrocket: z.ZodOptional<z.ZodObject<{
281
+ appId: z.ZodString;
282
+ }, "strip", z.ZodTypeAny, {
283
+ appId: string;
284
+ }, {
285
+ appId: string;
286
+ }>>;
280
287
  mixpanel: z.ZodOptional<z.ZodObject<{
281
288
  projectToken: z.ZodString;
282
289
  }, "strip", z.ZodTypeAny, {
@@ -308,6 +315,13 @@ export declare const configSchema: z.ZodObject<{
308
315
  }, {
309
316
  domain: string;
310
317
  }>>;
318
+ segment: z.ZodOptional<z.ZodObject<{
319
+ writeKey: z.ZodString;
320
+ }, "strip", z.ZodTypeAny, {
321
+ writeKey: string;
322
+ }, {
323
+ writeKey: string;
324
+ }>>;
311
325
  }, "strict", z.ZodTypeAny, {
312
326
  amplitude?: {
313
327
  apiKey: string;
@@ -321,13 +335,16 @@ export declare const configSchema: z.ZodObject<{
321
335
  gtm?: {
322
336
  tagId: string;
323
337
  } | undefined;
324
- logrocket?: {
325
- appId: string;
326
- } | undefined;
327
338
  hotjar?: {
328
339
  hjid: string;
329
340
  hjsv: string;
330
341
  } | undefined;
342
+ koala?: {
343
+ projectId: string;
344
+ } | undefined;
345
+ logrocket?: {
346
+ appId: string;
347
+ } | undefined;
331
348
  mixpanel?: {
332
349
  projectToken: string;
333
350
  } | undefined;
@@ -341,6 +358,9 @@ export declare const configSchema: z.ZodObject<{
341
358
  plausible?: {
342
359
  domain: string;
343
360
  } | undefined;
361
+ segment?: {
362
+ writeKey: string;
363
+ } | undefined;
344
364
  }, {
345
365
  amplitude?: {
346
366
  apiKey: string;
@@ -354,13 +374,16 @@ export declare const configSchema: z.ZodObject<{
354
374
  gtm?: {
355
375
  tagId: string;
356
376
  } | undefined;
357
- logrocket?: {
358
- appId: string;
359
- } | undefined;
360
377
  hotjar?: {
361
378
  hjid: string;
362
379
  hjsv: string;
363
380
  } | undefined;
381
+ koala?: {
382
+ projectId: string;
383
+ } | undefined;
384
+ logrocket?: {
385
+ appId: string;
386
+ } | undefined;
364
387
  mixpanel?: {
365
388
  projectToken: string;
366
389
  } | undefined;
@@ -374,6 +397,9 @@ export declare const configSchema: z.ZodObject<{
374
397
  plausible?: {
375
398
  domain: string;
376
399
  } | undefined;
400
+ segment?: {
401
+ writeKey: string;
402
+ } | undefined;
377
403
  }>>;
378
404
  integrations: z.ZodOptional<z.ZodObject<{
379
405
  intercom: z.ZodOptional<z.ZodString>;
@@ -395,7 +421,7 @@ export declare const configSchema: z.ZodObject<{
395
421
  baseUrl?: string | string[] | undefined;
396
422
  auth?: {
397
423
  name?: string | undefined;
398
- method?: "bearer" | "basic" | "key" | undefined;
424
+ method?: string | undefined;
399
425
  inputPrefix?: string | undefined;
400
426
  } | undefined;
401
427
  hidePlayground?: boolean | undefined;
@@ -456,13 +482,16 @@ export declare const configSchema: z.ZodObject<{
456
482
  gtm?: {
457
483
  tagId: string;
458
484
  } | undefined;
459
- logrocket?: {
460
- appId: string;
461
- } | undefined;
462
485
  hotjar?: {
463
486
  hjid: string;
464
487
  hjsv: string;
465
488
  } | undefined;
489
+ koala?: {
490
+ projectId: string;
491
+ } | undefined;
492
+ logrocket?: {
493
+ appId: string;
494
+ } | undefined;
466
495
  mixpanel?: {
467
496
  projectToken: string;
468
497
  } | undefined;
@@ -476,6 +505,9 @@ export declare const configSchema: z.ZodObject<{
476
505
  plausible?: {
477
506
  domain: string;
478
507
  } | undefined;
508
+ segment?: {
509
+ writeKey: string;
510
+ } | undefined;
479
511
  } | undefined;
480
512
  integrations?: {
481
513
  intercom?: string | undefined;
@@ -514,7 +546,7 @@ export declare const configSchema: z.ZodObject<{
514
546
  baseUrl?: string | string[] | undefined;
515
547
  auth?: {
516
548
  name?: string | undefined;
517
- method?: "bearer" | "basic" | "key" | undefined;
549
+ method?: string | undefined;
518
550
  inputPrefix?: string | undefined;
519
551
  } | undefined;
520
552
  hidePlayground?: boolean | undefined;
@@ -575,13 +607,16 @@ export declare const configSchema: z.ZodObject<{
575
607
  gtm?: {
576
608
  tagId: string;
577
609
  } | undefined;
578
- logrocket?: {
579
- appId: string;
580
- } | undefined;
581
610
  hotjar?: {
582
611
  hjid: string;
583
612
  hjsv: string;
584
613
  } | undefined;
614
+ koala?: {
615
+ projectId: string;
616
+ } | undefined;
617
+ logrocket?: {
618
+ appId: string;
619
+ } | undefined;
585
620
  mixpanel?: {
586
621
  projectToken: string;
587
622
  } | undefined;
@@ -595,6 +630,9 @@ export declare const configSchema: z.ZodObject<{
595
630
  plausible?: {
596
631
  domain: string;
597
632
  } | undefined;
633
+ segment?: {
634
+ writeKey: string;
635
+ } | undefined;
598
636
  } | undefined;
599
637
  integrations?: {
600
638
  intercom?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/validation",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "description": "Validates mint.json files",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",