@mintlify/cli 4.1.85 → 4.1.87

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.
@@ -4,7 +4,7 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{i as e,o as t,r as n,t as r}from"./rolldown-runtime-CEAe2Uac.js";import i from"path";import a from"node:path";import{fileURLToPath as o}from"node:url";import s from"node:process";var c;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(c||={});var l;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(l||={});const u=c.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),d=e=>{switch(typeof e){case`undefined`:return u.undefined;case`string`:return u.string;case`number`:return Number.isNaN(e)?u.nan:u.number;case`boolean`:return u.boolean;case`function`:return u.function;case`bigint`:return u.bigint;case`symbol`:return u.symbol;case`object`:return Array.isArray(e)?u.array:e===null?u.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?u.promise:typeof Map<`u`&&e instanceof Map?u.map:typeof Set<`u`&&e instanceof Set?u.set:typeof Date<`u`&&e instanceof Date?u.date:u.object;default:return u.unknown}},f=c.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]);var p=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,c.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};p.create=e=>new p(e);const m=(e,t)=>{let n;switch(e.code){case f.invalid_type:n=e.received===u.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case f.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,c.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:n=`Unrecognized key(s) in object: ${c.joinValues(e.keys,`, `)}`;break;case f.invalid_union:n=`Invalid input`;break;case f.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${c.joinValues(e.options)}`;break;case f.invalid_enum_value:n=`Invalid enum value. Expected ${c.joinValues(e.options)}, received '${e.received}'`;break;case f.invalid_arguments:n=`Invalid function arguments`;break;case f.invalid_return_type:n=`Invalid function return type`;break;case f.invalid_date:n=`Invalid date`;break;case f.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:c.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case f.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case f.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case f.custom:n=`Invalid input`;break;case f.invalid_intersection_types:n=`Intersection results could not be merged`;break;case f.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case f.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,c.assertNever(e)}return{message:n}};let h=m;function g(e){h=e}function _(){return h}const v=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function y(e,t){let n=_(),r=v({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===m?void 0:m].filter(e=>!!e)});e.common.issues.push(r)}var b=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return x;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return x;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}};const x=Object.freeze({status:`aborted`}),S=e=>({status:`dirty`,value:e}),C=e=>({status:`valid`,value:e}),w=e=>e.status===`aborted`,T=e=>e.status===`dirty`,E=e=>e.status===`valid`,ee=e=>typeof Promise<`u`&&e instanceof Promise;var D;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(D||={});var te=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const ne=(e,t)=>{if(E(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new p(e.common.issues);return this._error=t,this._error}}};function O(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var k=class{get description(){return this._def.description}_getType(e){return d(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:d(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:d(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ee(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)},r=this._parseSync({data:e,path:n.path,parent:n});return ne(n,r)}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return E(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>E(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await(ee(r)?r:Promise.resolve(r));return ne(n,i)}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:f.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new et({schema:this,typeName:P.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}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.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return tt.create(this,this._def)}nullable(){return nt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ie.create(this)}promise(){return $e.create(this,this._def)}or(e){return ze.create([this,e],this._def)}and(e){return Ue.create(this,e,this._def)}transform(e){return new et({...O(this._def),schema:this,typeName:P.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new rt({...O(this._def),innerType:this,defaultValue:t,typeName:P.ZodDefault})}brand(){return new ot({typeName:P.ZodBranded,type:this,...O(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new it({...O(this._def),innerType:this,catchValue:t,typeName:P.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return st.create(this,e)}readonly(){return ct.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const A=/^c[^\s-]{8,}$/i,re=/^[0-9a-z]+$/,ie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ae=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,oe=/^[a-z0-9_-]{21}$/i,se=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ce=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,le=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let ue;const de=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,fe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,pe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,me=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,he=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ge=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,_e=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,ve=RegExp(`^${_e}$`);function ye(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function be(e){return RegExp(`^${ye(e)}$`)}function xe(e){let t=`${_e}T${ye(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Se(e,t){return!((t!==`v4`&&t||!de.test(e))&&(t!==`v6`&&t||!pe.test(e)))}function Ce(e,t){if(!se.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function we(e,t){return!((t!==`v4`&&t||!fe.test(e))&&(t!==`v6`&&t||!me.test(e)))}var Te=class e extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.string,received:t.parsedType}),x}let t=new b,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?y(n,{code:f.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&y(n,{code:f.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)le.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`email`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)ue||=/* @__PURE__ */ RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`),ue.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`emoji`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)ae.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`uuid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)oe.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`nanoid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)A.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`cuid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)re.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`cuid2`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)ie.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`ulid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),y(n,{validation:`url`,code:f.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`regex`,code:f.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?xe(r).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?ve.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?be(r).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?ce.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`duration`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?Se(e.data,r.version)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`ip`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?Ce(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`jwt`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?we(e.data,r.version)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`cidr`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?he.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`base64`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?ge.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`base64url`,code:f.invalid_string,message:r.message}),t.dirty()):c.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:f.invalid_string,...D.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...D.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...D.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...D.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...D.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...D.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...D.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...D.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...D.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...D.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...D.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...D.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...D.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...D.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...D.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...D.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...D.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...D.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...D.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...D.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...D.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...D.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...D.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...D.errToObj(t)})}nonempty(e){return this.min(1,D.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};Te.create=e=>new Te({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...O(e)});function Ee(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var De=class e extends k{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)!==u.number){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.number,received:t.parsedType}),x}let t,n=new b;for(let r of this._def.checks)r.kind===`int`?c.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:f.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Ee(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:f.not_finite,message:r.message}),n.dirty()):c.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,D.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,D.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,D.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,D.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:D.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:D.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:D.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:D.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:D.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:D.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:D.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&c.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};De.create=e=>new De({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...O(e)});var Oe=class e extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let t,n=new b;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):c.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.bigint,received:t.parsedType}),x}gte(e,t){return this.setLimit(`min`,e,!0,D.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,D.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,D.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,D.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:D.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:D.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:D.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};Oe.create=e=>new Oe({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...O(e)});var j=class extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.boolean,received:t.parsedType}),x}return C(e.data)}};j.create=e=>new j({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...O(e)});var ke=class e extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.date,received:t.parsedType}),x}if(Number.isNaN(e.data.getTime()))return y(this._getOrReturnCtx(e),{code:f.invalid_date}),x;let t=new b,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):c.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:D.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:D.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};ke.create=e=>new ke({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...O(e)});var Ae=class extends k{_parse(e){if(this._getType(e)!==u.symbol){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.symbol,received:t.parsedType}),x}return C(e.data)}};Ae.create=e=>new Ae({typeName:P.ZodSymbol,...O(e)});var je=class extends k{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.undefined,received:t.parsedType}),x}return C(e.data)}};je.create=e=>new je({typeName:P.ZodUndefined,...O(e)});var M=class extends k{_parse(e){if(this._getType(e)!==u.null){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.null,received:t.parsedType}),x}return C(e.data)}};M.create=e=>new M({typeName:P.ZodNull,...O(e)});var Me=class extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return C(e.data)}};Me.create=e=>new Me({typeName:P.ZodAny,...O(e)});var Ne=class extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return C(e.data)}};Ne.create=e=>new Ne({typeName:P.ZodUnknown,...O(e)});var Pe=class extends k{_parse(e){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.never,received:t.parsedType}),x}};Pe.create=e=>new Pe({typeName:P.ZodNever,...O(e)});var Fe=class extends k{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.void,received:t.parsedType}),x}return C(e.data)}};Fe.create=e=>new Fe({typeName:P.ZodVoid,...O(e)});var Ie=class e extends k{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.array)return y(t,{code:f.invalid_type,expected:u.array,received:t.parsedType}),x;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(y(t,{code:e?f.too_big:f.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(y(t,{code:f.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(y(t,{code:f.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new te(t,e,t.path,n)))).then(e=>b.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new te(t,e,t.path,n)));return b.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:D.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:D.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:D.toString(n)}})}nonempty(e){return this.min(1,e)}};Ie.create=(e,t)=>new Ie({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...O(t)});function Le(e){if(e instanceof Re){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=tt.create(Le(r))}return new Re({...e._def,shape:()=>t})}return e instanceof Ie?new Ie({...e._def,type:Le(e.element)}):e instanceof tt?tt.create(Le(e.unwrap())):e instanceof nt?nt.create(Le(e.unwrap())):e instanceof N?N.create(e.items.map(e=>Le(e))):e}var Re=class e extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=c.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.object,received:t.parsedType}),x}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Pe&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new te(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Pe){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(y(n,{code:f.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new te(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>b.mergeObjectSync(t,e)):b.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return D.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:D.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of c.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of c.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Le(this)}partial(t){let n={};for(let e of c.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of c.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof tt;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return Xe(c.objectKeys(this.shape))}};Re.create=(e,t)=>new Re({shape:()=>e,unknownKeys:`strip`,catchall:Pe.create(),typeName:P.ZodObject,...O(t)}),Re.strictCreate=(e,t)=>new Re({shape:()=>e,unknownKeys:`strict`,catchall:Pe.create(),typeName:P.ZodObject,...O(t)}),Re.lazycreate=(e,t)=>new Re({shape:e,unknownKeys:`strip`,catchall:Pe.create(),typeName:P.ZodObject,...O(t)});var ze=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new p(e.ctx.common.issues));return y(t,{code:f.invalid_union,unionErrors:n}),x}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new p(e));return y(t,{code:f.invalid_union,unionErrors:i}),x}}get options(){return this._def.options}};ze.create=(e,t)=>new ze({options:e,typeName:P.ZodUnion,...O(t)});const Be=e=>e instanceof Je?Be(e.schema):e instanceof et?Be(e.innerType()):e instanceof Ye?[e.value]:e instanceof Ze?e.options:e instanceof Qe?c.objectValues(e.enum):e instanceof rt?Be(e._def.innerType):e instanceof je?[void 0]:e instanceof M?[null]:e instanceof tt?[void 0,...Be(e.unwrap())]:e instanceof nt?[null,...Be(e.unwrap())]:e instanceof ot||e instanceof ct?Be(e.unwrap()):e instanceof it?Be(e._def.innerType):[];var Ve=class e extends k{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return y(t,{code:f.invalid_type,expected:u.object,received:t.parsedType}),x;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(y(t,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=/* @__PURE__ */ new Map;for(let e of n){let n=Be(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...O(r)})}};function He(e,t){let n=d(e),r=d(t);if(e===t)return{valid:!0,data:e};if(n===u.object&&r===u.object){let n=c.objectKeys(t),r=c.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=He(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===u.array&&r===u.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=He(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===u.date&&r===u.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Ue=class extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(w(e)||w(r))return x;let i=He(e.value,r.value);return i.valid?((T(e)||T(r))&&t.dirty(),{status:t.value,value:i.data}):(y(n,{code:f.invalid_intersection_types}),x)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ue.create=(e,t,n)=>new Ue({left:e,right:t,typeName:P.ZodIntersection,...O(n)});var N=class e extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.array)return y(n,{code:f.invalid_type,expected:u.array,received:n.parsedType}),x;if(n.data.length<this._def.items.length)return y(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),x;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new te(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>b.mergeArray(t,e)):b.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};N.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new N({items:e,typeName:P.ZodTuple,rest:null,...O(t)})};var We=class e extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.object)return y(n,{code:f.invalid_type,expected:u.object,received:n.parsedType}),x;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new te(n,e,n.path,e)),value:a._parse(new te(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?b.mergeObjectAsync(t,r):b.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof k?new e({keyType:t,valueType:n,typeName:P.ZodRecord,...O(r)}):new e({keyType:Te.create(),valueType:t,typeName:P.ZodRecord,...O(n)})}},Ge=class extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.map)return y(n,{code:f.invalid_type,expected:u.map,received:n.parsedType}),x;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new te(n,e,n.path,[a,`key`])),value:i._parse(new te(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=/* @__PURE__ */ new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return x;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=/* @__PURE__ */ new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return x;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};Ge.create=(e,t,n)=>new Ge({valueType:t,keyType:e,typeName:P.ZodMap,...O(n)});var Ke=class e extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.set)return y(n,{code:f.invalid_type,expected:u.set,received:n.parsedType}),x;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(y(n,{code:f.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(y(n,{code:f.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=/* @__PURE__ */ new Set;for(let r of e){if(r.status===`aborted`)return x;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new te(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:D.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:D.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Ke.create=(e,t)=>new Ke({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...O(t)});var qe=class e extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return y(t,{code:f.invalid_type,expected:u.function,received:t.parsedType}),x;function n(e,n){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_(),m].filter(e=>!!e),issueData:{code:f.invalid_arguments,argumentsError:n}})}function r(e,n){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_(),m].filter(e=>!!e),issueData:{code:f.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof $e){let e=this;return C(async function(...t){let o=new p([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return C(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new p([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new p([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:N.create(t).rest(Ne.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||N.create([]).rest(Ne.create()),returns:n||Ne.create(),typeName:P.ZodFunction,...O(r)})}},Je=class extends k{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Je.create=(e,t)=>new Je({getter:e,typeName:P.ZodLazy,...O(t)});var Ye=class extends k{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return y(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),x}return{status:`valid`,value:e.data}}get value(){return this._def.value}};Ye.create=(e,t)=>new Ye({value:e,typeName:P.ZodLiteral,...O(t)});function Xe(e,t){return new Ze({values:e,typeName:P.ZodEnum,...O(t)})}var Ze=class e extends k{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{expected:c.joinValues(n),received:t.parsedType,code:f.invalid_type}),x}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{received:t.data,code:f.invalid_enum_value,options:n}),x}return C(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};Ze.create=Xe;var Qe=class extends k{_parse(e){let t=c.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.string&&n.parsedType!==u.number){let e=c.objectValues(t);return y(n,{expected:c.joinValues(e),received:n.parsedType,code:f.invalid_type}),x}if(this._cache||=new Set(c.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=c.objectValues(t);return y(n,{received:n.data,code:f.invalid_enum_value,options:e}),x}return C(e.data)}get enum(){return this._def.values}};Qe.create=(e,t)=>new Qe({values:e,typeName:P.ZodNativeEnum,...O(t)});var $e=class extends k{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return y(t,{code:f.invalid_type,expected:u.promise,received:t.parsedType}),x;let n=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return C(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};$e.create=(e,t)=>new $e({type:e,typeName:P.ZodPromise,...O(t)});var et=class extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return x;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?x:r.status===`dirty`||t.value===`dirty`?S(r.value):r});{if(t.value===`aborted`)return x;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?x:r.status===`dirty`||t.value===`dirty`?S(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?x:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?x:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!E(e))return x;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>E(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):x)}c.assertNever(r)}};et.create=(e,t,n)=>new et({schema:e,typeName:P.ZodEffects,effect:t,...O(n)}),et.createWithPreprocess=(e,t,n)=>new et({schema:t,effect:{type:`preprocess`,transform:e},typeName:P.ZodEffects,...O(n)});var tt=class extends k{_parse(e){return this._getType(e)===u.undefined?C(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};tt.create=(e,t)=>new tt({innerType:e,typeName:P.ZodOptional,...O(t)});var nt=class extends k{_parse(e){return this._getType(e)===u.null?C(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};nt.create=(e,t)=>new nt({innerType:e,typeName:P.ZodNullable,...O(t)});var rt=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===u.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};rt.create=(e,t)=>new rt({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...O(t)});var it=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ee(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new p(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new p(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};it.create=(e,t)=>new it({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...O(t)});var at=class extends k{_parse(e){if(this._getType(e)!==u.nan){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.nan,received:t.parsedType}),x}return{status:`valid`,value:e.data}}};at.create=e=>new at({typeName:P.ZodNaN,...O(e)});var ot=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},st=class e extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?x:e.status===`dirty`?(t.dirty(),S(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?x:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:P.ZodPipeline})}},ct=class extends k{_parse(e){let t=this._def.innerType._parse(e),n=e=>(E(e)&&(e.value=Object.freeze(e.value)),e);return ee(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};ct.create=(e,t)=>new ct({innerType:e,typeName:P.ZodReadonly,...O(t)});function lt(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function ut(e,t={},n){return e?Me.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=lt(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=lt(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):Me.create()}Re.lazycreate;var P;(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`,e.ZodReadonly=`ZodReadonly`})(P||={});const F=Te.create,dt=De.create;at.create,Oe.create;const ft=j.create;ke.create,Ae.create,je.create,M.create;const pt=Me.create,I=Ne.create,mt=Pe.create;Fe.create;const ht=Ie.create,gt=Re.create;Re.strictCreate;const _t=ze.create,vt=Ve.create;Ue.create,N.create;const yt=We.create;Ge.create,Ke.create,qe.create;const bt=Je.create,xt=Ye.create,St=Ze.create;Qe.create,$e.create,et.create,tt.create,nt.create,et.createWithPreprocess,st.create;const Ct=x,wt=[`fontawesome`,`lucide`,`tabler`],Tt=[`brands`,`duotone`,`light`,`regular`,`sharp-duotone-solid`,`sharp-light`,`sharp-regular`,`sharp-solid`,`sharp-thin`,`solid`,`thin`],Et=[`interactive`,`simple`,`none`,`auth`],Dt=[`copy`,`assistant`,`view`,`download-pdf`,`download-spec`,`chatgpt`,`claude`,`perplexity`,`grok`,`aistudio`,`devin`,`windsurf`,`mcp`,`add-mcp`,`cursor`,`vscode`,`devin-mcp`],L=[`header`,`toc`];function Ot(e){let t=i.posix.resolve(`/`,e).slice(1);return e.endsWith(`/`)&&t.length>0&&!t.endsWith(`/`)?t+`/`:t}const kt=F({invalid_type_error:`Anchor icon must be the name of a Font Awesome, Lucide, or Tabler icon. Browse their libraries to see all the available icons: https://fontawesome.com/icons, https://lucide.dev/icons, https://tabler.io/icons`}).refine(e=>!e.startsWith(`fa-`),`Icon does not need to start with 'fa-'. Please delete 'fa-' and keep the rest of the icon name`),At=_t([kt,gt({style:St(Tt).optional(),name:kt,library:St(wt).optional()})]).describe(`The icon to be displayed in the section`),jt=gt({base:F(),query:ht(gt({key:F(),value:F()})).optional()}),Mt=gt({title:F(),description:F(),icon:At.optional(),href:_t([F(),jt])}).describe(`Custom contextual option`),Nt=gt({options:ht(_t([St(Dt),Mt])).describe(`Quick actions surfaced in the page context menu, like copying the page contents or opening it in an AI assistant (ChatGPT, Claude, Cursor, etc.)`).refine(e=>new Set(e).size===e.length,{message:`Each contextual option can only appear once`}),display:St(L).optional().default(`header`).describe("Where to display the contextual options: `header` (default) shows them in the top-of-page context menu, `toc` shows them in the table of contents sidebar.")}).describe(`Context menu shown on each documentation page, providing quick actions for copying, viewing source, and opening the page in AI assistants and IDEs`),Pt=F().min(1),Ft=gt({includes:ht(Pt).min(1,`Omit includes to allow every group, or set groups to [] to deny everyone`).optional(),excludes:ht(Pt).optional().refine(e=>!e?.includes(`*`),{message:`The * wildcard is not allowed in excludes`})}).strict(),It=_t([ht(Pt),ht(Ft)]).describe(`User groups that can see the page. Either a list of group names, or a list of { includes, excludes } rules. Readers in an excluded group never see the page.`),Lt=_t([F(),yt(F(),F()).refine(e=>Object.keys(e).length===1,{message:`Related page title entries must contain exactly one link`})]),Rt=_t([xt(!1),ht(Lt)]),zt=F().nonempty().transform(Ot).describe(`A page in the navigation. Referenced by the path to the page. Example: path/to/page.`),Bt=gt({href:F(),title:F(),sidebarTitle:F().optional(),description:F().optional(),canonical:F().optional(),"og:title":F().optional(),"og:url":F().optional(),api:F().optional(),openapi:F().optional(),asyncapi:F().optional(),graphql:gt({source:F(),kind:St([`query`,`mutation`,`type`]),name:F()}).optional(),contentType:F().optional(),authMethod:F().optional(),auth:F().optional(),version:F().optional(),mode:F().optional(),filterTagMatch:St([`any`,`all`]).optional(),hideFooterPagination:ft().optional(),authors:I().optional(),lastUpdatedDate:F().optional(),createdDate:F().optional(),"openapi-schema":F().optional(),icon:At.optional(),iconType:St(Tt).optional().describe(`Deprecated, use icon instead`),tag:F().optional(),url:F().optional(),hideApiMarker:ft().optional(),noindex:ft().optional(),searchable:ft().optional(),isPublic:ft().optional(),public:ft().optional(),boost:dt().optional(),deprecated:ft().optional(),hidden:ft().optional(),groups:It.optional(),robots:F().optional(),playground:St(Et).optional(),keywords:ht(F()).optional(),timestamp:ft().optional(),related:Rt.optional(),contextual:Nt.optional()}).passthrough().describe(`page metadata tags in the navigation`);function Vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Ht={},Ut={},Wt={},Gt;function Kt(){if(Gt)return Wt;Gt=1;function e(e){return e==null}function t(e){return typeof e==`object`&&!!e}function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function a(e){return e===0&&1/e==-1/0}return Wt.isNothing=e,Wt.isObject=t,Wt.toArray=n,Wt.repeat=i,Wt.isNegativeZero=a,Wt.extend=r,Wt}var qt,Jt;function Yt(){if(Jt)return qt;Jt=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
7
+ import{i as e,o as t,r as n,t as r}from"./rolldown-runtime-CEAe2Uac.js";import i from"path";import a from"node:path";import{fileURLToPath as o}from"node:url";import s from"node:process";var c;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(c||={});var l;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(l||={});const u=c.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),d=e=>{switch(typeof e){case`undefined`:return u.undefined;case`string`:return u.string;case`number`:return Number.isNaN(e)?u.nan:u.number;case`boolean`:return u.boolean;case`function`:return u.function;case`bigint`:return u.bigint;case`symbol`:return u.symbol;case`object`:return Array.isArray(e)?u.array:e===null?u.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?u.promise:typeof Map<`u`&&e instanceof Map?u.map:typeof Set<`u`&&e instanceof Set?u.set:typeof Date<`u`&&e instanceof Date?u.date:u.object;default:return u.unknown}},f=c.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]);var p=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,c.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};p.create=e=>new p(e);const m=(e,t)=>{let n;switch(e.code){case f.invalid_type:n=e.received===u.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case f.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,c.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:n=`Unrecognized key(s) in object: ${c.joinValues(e.keys,`, `)}`;break;case f.invalid_union:n=`Invalid input`;break;case f.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${c.joinValues(e.options)}`;break;case f.invalid_enum_value:n=`Invalid enum value. Expected ${c.joinValues(e.options)}, received '${e.received}'`;break;case f.invalid_arguments:n=`Invalid function arguments`;break;case f.invalid_return_type:n=`Invalid function return type`;break;case f.invalid_date:n=`Invalid date`;break;case f.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:c.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case f.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case f.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case f.custom:n=`Invalid input`;break;case f.invalid_intersection_types:n=`Intersection results could not be merged`;break;case f.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case f.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,c.assertNever(e)}return{message:n}};let h=m;function g(e){h=e}function _(){return h}const v=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function y(e,t){let n=_(),r=v({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===m?void 0:m].filter(e=>!!e)});e.common.issues.push(r)}var b=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return x;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return x;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}};const x=Object.freeze({status:`aborted`}),S=e=>({status:`dirty`,value:e}),C=e=>({status:`valid`,value:e}),w=e=>e.status===`aborted`,T=e=>e.status===`dirty`,E=e=>e.status===`valid`,ee=e=>typeof Promise<`u`&&e instanceof Promise;var D;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(D||={});var te=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const ne=(e,t)=>{if(E(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new p(e.common.issues);return this._error=t,this._error}}};function O(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var k=class{get description(){return this._def.description}_getType(e){return d(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:d(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new b,ctx:{common:e.parent.common,data:e.data,parsedType:d(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ee(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)},r=this._parseSync({data:e,path:n.path,parent:n});return ne(n,r)}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return E(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>E(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)},r=this._parse({data:e,path:n.path,parent:n}),i=await(ee(r)?r:Promise.resolve(r));return ne(n,i)}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:f.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new et({schema:this,typeName:P.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}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.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return tt.create(this,this._def)}nullable(){return nt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ie.create(this)}promise(){return $e.create(this,this._def)}or(e){return ze.create([this,e],this._def)}and(e){return Ue.create(this,e,this._def)}transform(e){return new et({...O(this._def),schema:this,typeName:P.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new rt({...O(this._def),innerType:this,defaultValue:t,typeName:P.ZodDefault})}brand(){return new ot({typeName:P.ZodBranded,type:this,...O(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new it({...O(this._def),innerType:this,catchValue:t,typeName:P.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return st.create(this,e)}readonly(){return ct.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const A=/^c[^\s-]{8,}$/i,re=/^[0-9a-z]+$/,ie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ae=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,oe=/^[a-z0-9_-]{21}$/i,se=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ce=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,le=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let ue;const de=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,fe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,pe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,me=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,he=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ge=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,_e=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,ve=RegExp(`^${_e}$`);function ye(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function be(e){return RegExp(`^${ye(e)}$`)}function xe(e){let t=`${_e}T${ye(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Se(e,t){return!((t!==`v4`&&t||!de.test(e))&&(t!==`v6`&&t||!pe.test(e)))}function Ce(e,t){if(!se.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function we(e,t){return!((t!==`v4`&&t||!fe.test(e))&&(t!==`v6`&&t||!me.test(e)))}var Te=class e extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.string,received:t.parsedType}),x}let t=new b,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?y(n,{code:f.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&y(n,{code:f.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)le.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`email`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)ue||=/* @__PURE__ */ RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`),ue.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`emoji`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)ae.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`uuid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)oe.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`nanoid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)A.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`cuid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)re.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`cuid2`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)ie.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`ulid`,code:f.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),y(n,{validation:`url`,code:f.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`regex`,code:f.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?xe(r).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?ve.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?be(r).test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{code:f.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?ce.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`duration`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?Se(e.data,r.version)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`ip`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?Ce(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`jwt`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?we(e.data,r.version)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`cidr`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?he.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`base64`,code:f.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?ge.test(e.data)||(n=this._getOrReturnCtx(e,n),y(n,{validation:`base64url`,code:f.invalid_string,message:r.message}),t.dirty()):c.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:f.invalid_string,...D.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...D.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...D.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...D.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...D.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...D.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...D.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...D.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...D.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...D.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...D.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...D.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...D.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...D.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...D.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...D.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...D.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...D.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...D.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...D.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...D.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...D.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...D.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...D.errToObj(t)})}nonempty(e){return this.min(1,D.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};Te.create=e=>new Te({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...O(e)});function Ee(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var De=class e extends k{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)!==u.number){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.number,received:t.parsedType}),x}let t,n=new b;for(let r of this._def.checks)r.kind===`int`?c.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:f.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Ee(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),y(t,{code:f.not_finite,message:r.message}),n.dirty()):c.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,D.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,D.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,D.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,D.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:D.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:D.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:D.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:D.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:D.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:D.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:D.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&c.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};De.create=e=>new De({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...O(e)});var Oe=class e extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let t,n=new b;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),y(t,{code:f.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):c.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.bigint,received:t.parsedType}),x}gte(e,t){return this.setLimit(`min`,e,!0,D.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,D.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,D.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,D.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:D.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:D.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:D.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:D.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:D.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:D.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};Oe.create=e=>new Oe({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...O(e)});var j=class extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.boolean,received:t.parsedType}),x}return C(e.data)}};j.create=e=>new j({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...O(e)});var ke=class e extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.date,received:t.parsedType}),x}if(Number.isNaN(e.data.getTime()))return y(this._getOrReturnCtx(e),{code:f.invalid_date}),x;let t=new b,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),y(n,{code:f.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):c.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:D.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:D.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};ke.create=e=>new ke({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...O(e)});var Ae=class extends k{_parse(e){if(this._getType(e)!==u.symbol){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.symbol,received:t.parsedType}),x}return C(e.data)}};Ae.create=e=>new Ae({typeName:P.ZodSymbol,...O(e)});var je=class extends k{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.undefined,received:t.parsedType}),x}return C(e.data)}};je.create=e=>new je({typeName:P.ZodUndefined,...O(e)});var M=class extends k{_parse(e){if(this._getType(e)!==u.null){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.null,received:t.parsedType}),x}return C(e.data)}};M.create=e=>new M({typeName:P.ZodNull,...O(e)});var Me=class extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return C(e.data)}};Me.create=e=>new Me({typeName:P.ZodAny,...O(e)});var Ne=class extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return C(e.data)}};Ne.create=e=>new Ne({typeName:P.ZodUnknown,...O(e)});var Pe=class extends k{_parse(e){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.never,received:t.parsedType}),x}};Pe.create=e=>new Pe({typeName:P.ZodNever,...O(e)});var Fe=class extends k{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.void,received:t.parsedType}),x}return C(e.data)}};Fe.create=e=>new Fe({typeName:P.ZodVoid,...O(e)});var Ie=class e extends k{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==u.array)return y(t,{code:f.invalid_type,expected:u.array,received:t.parsedType}),x;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(y(t,{code:e?f.too_big:f.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(y(t,{code:f.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(y(t,{code:f.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new te(t,e,t.path,n)))).then(e=>b.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new te(t,e,t.path,n)));return b.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:D.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:D.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:D.toString(n)}})}nonempty(e){return this.min(1,e)}};Ie.create=(e,t)=>new Ie({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...O(t)});function Le(e){if(e instanceof Re){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=tt.create(Le(r))}return new Re({...e._def,shape:()=>t})}return e instanceof Ie?new Ie({...e._def,type:Le(e.element)}):e instanceof tt?tt.create(Le(e.unwrap())):e instanceof nt?nt.create(Le(e.unwrap())):e instanceof N?N.create(e.items.map(e=>Le(e))):e}var Re=class e extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=c.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.object,received:t.parsedType}),x}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Pe&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new te(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Pe){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(y(n,{code:f.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new te(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>b.mergeObjectSync(t,e)):b.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return D.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:D.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of c.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of c.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Le(this)}partial(t){let n={};for(let e of c.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of c.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof tt;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return Xe(c.objectKeys(this.shape))}};Re.create=(e,t)=>new Re({shape:()=>e,unknownKeys:`strip`,catchall:Pe.create(),typeName:P.ZodObject,...O(t)}),Re.strictCreate=(e,t)=>new Re({shape:()=>e,unknownKeys:`strict`,catchall:Pe.create(),typeName:P.ZodObject,...O(t)}),Re.lazycreate=(e,t)=>new Re({shape:e,unknownKeys:`strip`,catchall:Pe.create(),typeName:P.ZodObject,...O(t)});var ze=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new p(e.ctx.common.issues));return y(t,{code:f.invalid_union,unionErrors:n}),x}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new p(e));return y(t,{code:f.invalid_union,unionErrors:i}),x}}get options(){return this._def.options}};ze.create=(e,t)=>new ze({options:e,typeName:P.ZodUnion,...O(t)});const Be=e=>e instanceof Je?Be(e.schema):e instanceof et?Be(e.innerType()):e instanceof Ye?[e.value]:e instanceof Ze?e.options:e instanceof Qe?c.objectValues(e.enum):e instanceof rt?Be(e._def.innerType):e instanceof je?[void 0]:e instanceof M?[null]:e instanceof tt?[void 0,...Be(e.unwrap())]:e instanceof nt?[null,...Be(e.unwrap())]:e instanceof ot||e instanceof ct?Be(e.unwrap()):e instanceof it?Be(e._def.innerType):[];var Ve=class e extends k{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return y(t,{code:f.invalid_type,expected:u.object,received:t.parsedType}),x;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(y(t,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=/* @__PURE__ */ new Map;for(let e of n){let n=Be(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...O(r)})}};function He(e,t){let n=d(e),r=d(t);if(e===t)return{valid:!0,data:e};if(n===u.object&&r===u.object){let n=c.objectKeys(t),r=c.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=He(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===u.array&&r===u.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=He(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===u.date&&r===u.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Ue=class extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(w(e)||w(r))return x;let i=He(e.value,r.value);return i.valid?((T(e)||T(r))&&t.dirty(),{status:t.value,value:i.data}):(y(n,{code:f.invalid_intersection_types}),x)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Ue.create=(e,t,n)=>new Ue({left:e,right:t,typeName:P.ZodIntersection,...O(n)});var N=class e extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.array)return y(n,{code:f.invalid_type,expected:u.array,received:n.parsedType}),x;if(n.data.length<this._def.items.length)return y(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),x;!this._def.rest&&n.data.length>this._def.items.length&&(y(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new te(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>b.mergeArray(t,e)):b.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};N.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new N({items:e,typeName:P.ZodTuple,rest:null,...O(t)})};var We=class e extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.object)return y(n,{code:f.invalid_type,expected:u.object,received:n.parsedType}),x;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new te(n,e,n.path,e)),value:a._parse(new te(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?b.mergeObjectAsync(t,r):b.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof k?new e({keyType:t,valueType:n,typeName:P.ZodRecord,...O(r)}):new e({keyType:Te.create(),valueType:t,typeName:P.ZodRecord,...O(n)})}},Ge=class extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.map)return y(n,{code:f.invalid_type,expected:u.map,received:n.parsedType}),x;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new te(n,e,n.path,[a,`key`])),value:i._parse(new te(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=/* @__PURE__ */ new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return x;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=/* @__PURE__ */ new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return x;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};Ge.create=(e,t,n)=>new Ge({valueType:t,keyType:e,typeName:P.ZodMap,...O(n)});var Ke=class e extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==u.set)return y(n,{code:f.invalid_type,expected:u.set,received:n.parsedType}),x;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(y(n,{code:f.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(y(n,{code:f.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=/* @__PURE__ */ new Set;for(let r of e){if(r.status===`aborted`)return x;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new te(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:D.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:D.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Ke.create=(e,t)=>new Ke({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...O(t)});var qe=class e extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return y(t,{code:f.invalid_type,expected:u.function,received:t.parsedType}),x;function n(e,n){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_(),m].filter(e=>!!e),issueData:{code:f.invalid_arguments,argumentsError:n}})}function r(e,n){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_(),m].filter(e=>!!e),issueData:{code:f.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof $e){let e=this;return C(async function(...t){let o=new p([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return C(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new p([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new p([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:N.create(t).rest(Ne.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||N.create([]).rest(Ne.create()),returns:n||Ne.create(),typeName:P.ZodFunction,...O(r)})}},Je=class extends k{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Je.create=(e,t)=>new Je({getter:e,typeName:P.ZodLazy,...O(t)});var Ye=class extends k{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return y(t,{received:t.data,code:f.invalid_literal,expected:this._def.value}),x}return{status:`valid`,value:e.data}}get value(){return this._def.value}};Ye.create=(e,t)=>new Ye({value:e,typeName:P.ZodLiteral,...O(t)});function Xe(e,t){return new Ze({values:e,typeName:P.ZodEnum,...O(t)})}var Ze=class e extends k{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{expected:c.joinValues(n),received:t.parsedType,code:f.invalid_type}),x}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return y(t,{received:t.data,code:f.invalid_enum_value,options:n}),x}return C(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};Ze.create=Xe;var Qe=class extends k{_parse(e){let t=c.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==u.string&&n.parsedType!==u.number){let e=c.objectValues(t);return y(n,{expected:c.joinValues(e),received:n.parsedType,code:f.invalid_type}),x}if(this._cache||=new Set(c.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=c.objectValues(t);return y(n,{received:n.data,code:f.invalid_enum_value,options:e}),x}return C(e.data)}get enum(){return this._def.values}};Qe.create=(e,t)=>new Qe({values:e,typeName:P.ZodNativeEnum,...O(t)});var $e=class extends k{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return y(t,{code:f.invalid_type,expected:u.promise,received:t.parsedType}),x;let n=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return C(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};$e.create=(e,t)=>new $e({type:e,typeName:P.ZodPromise,...O(t)});var et=class extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return x;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?x:r.status===`dirty`||t.value===`dirty`?S(r.value):r});{if(t.value===`aborted`)return x;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?x:r.status===`dirty`||t.value===`dirty`?S(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?x:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?x:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!E(e))return x;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>E(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):x)}c.assertNever(r)}};et.create=(e,t,n)=>new et({schema:e,typeName:P.ZodEffects,effect:t,...O(n)}),et.createWithPreprocess=(e,t,n)=>new et({schema:t,effect:{type:`preprocess`,transform:e},typeName:P.ZodEffects,...O(n)});var tt=class extends k{_parse(e){return this._getType(e)===u.undefined?C(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};tt.create=(e,t)=>new tt({innerType:e,typeName:P.ZodOptional,...O(t)});var nt=class extends k{_parse(e){return this._getType(e)===u.null?C(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};nt.create=(e,t)=>new nt({innerType:e,typeName:P.ZodNullable,...O(t)});var rt=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===u.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};rt.create=(e,t)=>new rt({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...O(t)});var it=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ee(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new p(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new p(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};it.create=(e,t)=>new it({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...O(t)});var at=class extends k{_parse(e){if(this._getType(e)!==u.nan){let t=this._getOrReturnCtx(e);return y(t,{code:f.invalid_type,expected:u.nan,received:t.parsedType}),x}return{status:`valid`,value:e.data}}};at.create=e=>new at({typeName:P.ZodNaN,...O(e)});var ot=class extends k{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},st=class e extends k{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?x:e.status===`dirty`?(t.dirty(),S(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?x:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:P.ZodPipeline})}},ct=class extends k{_parse(e){let t=this._def.innerType._parse(e),n=e=>(E(e)&&(e.value=Object.freeze(e.value)),e);return ee(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};ct.create=(e,t)=>new ct({innerType:e,typeName:P.ZodReadonly,...O(t)});function lt(e,t){let n=typeof e==`function`?e(t):typeof e==`string`?{message:e}:e;return typeof n==`string`?{message:n}:n}function ut(e,t={},n){return e?Me.create().superRefine((r,i)=>{let a=e(r);if(a instanceof Promise)return a.then(e=>{if(!e){let e=lt(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}});if(!a){let e=lt(t,r),a=e.fatal??n??!0;i.addIssue({code:`custom`,...e,fatal:a})}}):Me.create()}Re.lazycreate;var P;(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`,e.ZodReadonly=`ZodReadonly`})(P||={});const F=Te.create,dt=De.create;at.create,Oe.create;const ft=j.create;ke.create,Ae.create,je.create,M.create;const pt=Me.create,I=Ne.create,mt=Pe.create;Fe.create;const ht=Ie.create,gt=Re.create;Re.strictCreate;const _t=ze.create,vt=Ve.create;Ue.create,N.create;const yt=We.create;Ge.create,Ke.create,qe.create;const bt=Je.create,xt=Ye.create,St=Ze.create;Qe.create,$e.create,et.create,tt.create,nt.create,et.createWithPreprocess,st.create;const Ct=x,wt=[`fontawesome`,`lucide`,`tabler`],Tt=[`brands`,`duotone`,`light`,`regular`,`sharp-duotone-solid`,`sharp-light`,`sharp-regular`,`sharp-solid`,`sharp-thin`,`solid`,`thin`],Et=[`interactive`,`simple`,`none`,`auth`],Dt=[`copy`,`assistant`,`view`,`download-pdf`,`download-spec`,`chatgpt`,`claude`,`perplexity`,`grok`,`aistudio`,`devin`,`windsurf`,`mcp`,`add-mcp`,`cursor`,`vscode`,`devin-mcp`],L=[`header`,`toc`];function Ot(e){let t=i.posix.resolve(`/`,e).slice(1);return e.endsWith(`/`)&&t.length>0&&!t.endsWith(`/`)?t+`/`:t}const kt=F({invalid_type_error:`Anchor icon must be the name of a Font Awesome, Lucide, or Tabler icon. Browse their libraries to see all the available icons: https://fontawesome.com/icons, https://lucide.dev/icons, https://tabler.io/icons`}).refine(e=>!e.startsWith(`fa-`),`Icon does not need to start with 'fa-'. Please delete 'fa-' and keep the rest of the icon name`),At=_t([kt,gt({style:St(Tt).optional(),name:kt,library:St(wt).optional()})]).describe(`The icon to be displayed in the section`),jt=gt({base:F(),query:ht(gt({key:F(),value:F()})).optional()}),Mt=gt({title:F(),description:F(),icon:At.optional(),href:_t([F(),jt])}).describe(`Custom contextual option`),Nt=gt({options:ht(_t([St(Dt),Mt])).describe(`Quick actions surfaced in the page context menu, like copying the page contents or opening it in an AI assistant (ChatGPT, Claude, Cursor, etc.)`).refine(e=>new Set(e).size===e.length,{message:`Each contextual option can only appear once`}),display:St(L).optional().default(`header`).describe("Where to display the contextual options: `header` (default) shows them in the top-of-page context menu, `toc` shows them in the table of contents sidebar.")}).describe(`Context menu shown on each documentation page, providing quick actions for copying, viewing source, and opening the page in AI assistants and IDEs`),Pt=F().min(1),Ft=gt({includes:ht(Pt).min(1,`Omit includes to allow every group, or set groups to [] to deny everyone`).optional(),excludes:ht(Pt).optional().refine(e=>!e?.includes(`*`),{message:`The * wildcard is not allowed in excludes`})}).strict(),It=_t([ht(Pt),ht(Ft)]).describe(`User groups that can see the page. Either a list of group names, or a list of { includes, excludes } rules. Readers in an excluded group never see the page.`),Lt=_t([F(),yt(F(),F()).refine(e=>Object.keys(e).length===1,{message:`Related page title entries must contain exactly one link`})]),Rt=_t([xt(!1),ht(Lt)]),zt=F().nonempty().transform(Ot).describe(`A page in the navigation. Referenced by the path to the page. Example: path/to/page.`),Bt=gt({href:F(),title:F(),sidebarTitle:F().optional(),description:F().optional(),canonical:F().optional(),"og:title":F().optional(),"og:url":F().optional(),api:F().optional(),openapi:F().optional(),asyncapi:F().optional(),graphql:gt({source:F(),kind:St([`query`,`mutation`,`type`]),name:F()}).optional(),contentType:F().optional(),authMethod:F().optional(),auth:F().optional(),version:F().optional(),mode:F().optional(),filterTagMatch:St([`any`,`all`]).optional(),hideFooterPagination:ft().optional(),authors:I().optional(),lastUpdatedDate:F().optional(),createdDate:F().optional(),structuredData:I().optional(),"openapi-schema":F().optional(),icon:At.optional(),iconType:St(Tt).optional().describe(`Deprecated, use icon instead`),tag:F().optional(),url:F().optional(),hideApiMarker:ft().optional(),noindex:ft().optional(),searchable:ft().optional(),isPublic:ft().optional(),public:ft().optional(),boost:dt().optional(),deprecated:ft().optional(),hidden:ft().optional(),groups:It.optional(),robots:F().optional(),playground:St(Et).optional(),keywords:ht(F()).optional(),timestamp:ft().optional(),related:Rt.optional(),contextual:Nt.optional()}).passthrough().describe(`page metadata tags in the navigation`);function Vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Ht={},Ut={},Wt={},Gt;function Kt(){if(Gt)return Wt;Gt=1;function e(e){return e==null}function t(e){return typeof e==`object`&&!!e}function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}function a(e){return e===0&&1/e==-1/0}return Wt.isNothing=e,Wt.isObject=t,Wt.toArray=n,Wt.repeat=i,Wt.isNegativeZero=a,Wt.extend=r,Wt}var qt,Jt;function Yt(){if(Jt)return qt;Jt=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
8
8
 
9
9
  `+e.mark.snippet),r+` `+n):r}function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(/* @__PURE__ */ Error()).stack||``}return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(t){return this.name+`: `+e(this,t)},qt=t,qt}var Xt,Zt;function Qt(){if(Zt)return Xt;Zt=1;let e=Kt();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function n(t,n){return e.repeat(` `,n-t.length)+t}function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],c,l=-1;for(;c=a.exec(r.buffer);)s.push(c.index),o.push(c.index+c[0].length),r.position<=c.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let u=``,d=Math.min(r.line+i.linesAfter,s.length).toString().length,f=i.maxLength-(i.indent+d+3);for(let a=1;a<=i.linesBefore&&!(l-a<0);a++){let c=t(r.buffer,o[l-a],s[l-a],r.position-(o[l]-o[l-a]),f);u=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),d)+` | `+c.str+`
10
10
  `+u}let p=t(r.buffer,o[l],s[l],r.position,f);u+=e.repeat(` `,i.indent)+n((r.line+1).toString(),d)+` | `+p.str+`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.1.85",
3
+ "version": "4.1.87",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -47,7 +47,7 @@
47
47
  "sharp": "0.33.5"
48
48
  },
49
49
  "optionalDependencies": {
50
- "@mintlify/package-builder": "0.0.194",
50
+ "@mintlify/package-builder": "0.0.196",
51
51
  "@parcel/watcher": "2.5.1",
52
52
  "fsevents": "2.3.3",
53
53
  "keytar": "7.9.0"
@@ -55,15 +55,15 @@
55
55
  "devDependencies": {
56
56
  "@babel/parser": "7.21.2",
57
57
  "@inquirer/prompts": "7.9.0",
58
- "@mintlify/common": "1.0.1405",
59
- "@mintlify/editor": "0.0.685",
60
- "@mintlify/link-rot": "3.0.1662",
61
- "@mintlify/models": "0.0.404",
62
- "@mintlify/og": "0.0.204",
63
- "@mintlify/prebuild": "1.0.1585",
64
- "@mintlify/previewing": "4.0.1677",
58
+ "@mintlify/common": "1.0.1407",
59
+ "@mintlify/editor": "0.0.687",
60
+ "@mintlify/link-rot": "3.0.1664",
61
+ "@mintlify/models": "0.0.405",
62
+ "@mintlify/og": "0.0.206",
63
+ "@mintlify/prebuild": "1.0.1587",
64
+ "@mintlify/previewing": "4.0.1679",
65
65
  "@mintlify/ts-config": "2.0.2",
66
- "@mintlify/validation": "0.1.990",
66
+ "@mintlify/validation": "0.1.991",
67
67
  "@tsconfig/recommended": "1.0.2",
68
68
  "@types/detect-port": "1.3.2",
69
69
  "@types/keytar": "4.4.2",
@@ -110,5 +110,5 @@
110
110
  "yargs": "17.7.1",
111
111
  "zod": "4.3.6"
112
112
  },
113
- "gitHead": "f65baab732132078b63d2c33e1dda194828b08fd"
113
+ "gitHead": "846dcfa2b7835d51267320e3fb19193b60f6a4d5"
114
114
  }