@techdocs/cli 1.10.7-next.1 → 1.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/embedded-app/.config-schema.json +64 -31
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/123.5e36a0db.chunk.js +2 -0
- package/dist/embedded-app/static/123.5e36a0db.chunk.js.map +1 -0
- package/dist/embedded-app/static/1659.76caecab.chunk.js +2 -0
- package/dist/embedded-app/static/1659.76caecab.chunk.js.map +1 -0
- package/dist/embedded-app/static/1733.d8004241.chunk.js +2 -0
- package/dist/embedded-app/static/1733.d8004241.chunk.js.map +1 -0
- package/dist/embedded-app/static/1749.3ab65683.chunk.js +2 -0
- package/dist/embedded-app/static/1749.3ab65683.chunk.js.map +1 -0
- package/dist/embedded-app/static/1994.78304f99.chunk.js +2 -0
- package/dist/embedded-app/static/1994.78304f99.chunk.js.map +1 -0
- package/dist/embedded-app/static/2295.a94805e5.chunk.js +5 -0
- package/dist/embedded-app/static/2295.a94805e5.chunk.js.map +1 -0
- package/dist/embedded-app/static/{3554.0ce35bc3.chunk.js → 3554.d745ad43.chunk.js} +2 -2
- package/dist/embedded-app/static/{3554.0ce35bc3.chunk.js.map → 3554.d745ad43.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4384.ae7b53b0.chunk.js → 4384.dc692f4f.chunk.js} +2 -2
- package/dist/embedded-app/static/{4384.ae7b53b0.chunk.js.map → 4384.dc692f4f.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4587.85b7cf82.chunk.js +2 -0
- package/dist/embedded-app/static/4587.85b7cf82.chunk.js.map +1 -0
- package/dist/embedded-app/static/4648.e939339d.chunk.js +2 -0
- package/dist/embedded-app/static/4648.e939339d.chunk.js.map +1 -0
- package/dist/embedded-app/static/6138.d8ae40ee.chunk.js +2 -0
- package/dist/embedded-app/static/6138.d8ae40ee.chunk.js.map +1 -0
- package/dist/embedded-app/static/7203.1bd24814.chunk.js +2 -0
- package/dist/embedded-app/static/7203.1bd24814.chunk.js.map +1 -0
- package/dist/embedded-app/static/{7226.9f87f67d.chunk.js → 7226.bb48ee34.chunk.js} +2 -2
- package/dist/embedded-app/static/{7226.9f87f67d.chunk.js.map → 7226.bb48ee34.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8461.d5fe0648.chunk.js → 8461.0c3f2ac0.chunk.js} +3 -3
- package/dist/embedded-app/static/{8461.d5fe0648.chunk.js.map → 8461.0c3f2ac0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8877.3f864531.chunk.js → 8877.a7ffabd9.chunk.js} +2 -2
- package/dist/embedded-app/static/{8877.3f864531.chunk.js.map → 8877.a7ffabd9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9050.69b458a6.chunk.js +2 -0
- package/dist/embedded-app/static/9050.69b458a6.chunk.js.map +1 -0
- package/dist/embedded-app/static/9230.23c1d5e0.chunk.js +2 -0
- package/dist/embedded-app/static/9230.23c1d5e0.chunk.js.map +1 -0
- package/dist/embedded-app/static/{main.161a9ecc.css → main.0657d08d.css} +2 -2
- package/dist/embedded-app/static/{main.161a9ecc.css.map → main.0657d08d.css.map} +1 -1
- package/dist/embedded-app/static/main.c9b00fd0.js +523 -0
- package/dist/embedded-app/static/main.c9b00fd0.js.map +1 -0
- package/dist/embedded-app/static/{module-react-aria-components.67232dc3.js → module-react-aria-components.c61f9ab4.js} +2 -2
- package/dist/embedded-app/static/{module-react-aria-components.67232dc3.js.map → module-react-aria-components.c61f9ab4.js.map} +1 -1
- package/dist/embedded-app/static/module-zod.b3376822.js +38 -0
- package/dist/embedded-app/static/module-zod.b3376822.js.map +1 -0
- package/dist/embedded-app/static/{runtime.c39b96cc.js → runtime.9896d1d9.js} +2 -2
- package/dist/embedded-app/static/{runtime.c39b96cc.js.map → runtime.9896d1d9.js.map} +1 -1
- package/dist/embedded-app/static/vendor.ff5541f5.js +6 -0
- package/dist/embedded-app/static/vendor.ff5541f5.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/123.97a62a60.chunk.js +0 -2
- package/dist/embedded-app/static/123.97a62a60.chunk.js.map +0 -1
- package/dist/embedded-app/static/1659.7dd5287b.chunk.js +0 -2
- package/dist/embedded-app/static/1659.7dd5287b.chunk.js.map +0 -1
- package/dist/embedded-app/static/1733.14c06ac4.chunk.js +0 -2
- package/dist/embedded-app/static/1733.14c06ac4.chunk.js.map +0 -1
- package/dist/embedded-app/static/1749.745aaeeb.chunk.js +0 -2
- package/dist/embedded-app/static/1749.745aaeeb.chunk.js.map +0 -1
- package/dist/embedded-app/static/1994.1f294712.chunk.js +0 -2
- package/dist/embedded-app/static/1994.1f294712.chunk.js.map +0 -1
- package/dist/embedded-app/static/2295.765b9f2e.chunk.js +0 -5
- package/dist/embedded-app/static/2295.765b9f2e.chunk.js.map +0 -1
- package/dist/embedded-app/static/4587.bf73bd77.chunk.js +0 -2
- package/dist/embedded-app/static/4587.bf73bd77.chunk.js.map +0 -1
- package/dist/embedded-app/static/4648.bd152b54.chunk.js +0 -2
- package/dist/embedded-app/static/4648.bd152b54.chunk.js.map +0 -1
- package/dist/embedded-app/static/6138.2560a5ba.chunk.js +0 -2
- package/dist/embedded-app/static/6138.2560a5ba.chunk.js.map +0 -1
- package/dist/embedded-app/static/7203.1ec93f6f.chunk.js +0 -2
- package/dist/embedded-app/static/7203.1ec93f6f.chunk.js.map +0 -1
- package/dist/embedded-app/static/9050.bab0c5db.chunk.js +0 -2
- package/dist/embedded-app/static/9050.bab0c5db.chunk.js.map +0 -1
- package/dist/embedded-app/static/9230.b3e5d612.chunk.js +0 -2
- package/dist/embedded-app/static/9230.b3e5d612.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.cb460d15.js +0 -523
- package/dist/embedded-app/static/main.cb460d15.js.map +0 -1
- package/dist/embedded-app/static/module-zod.dd7f5a90.js +0 -2
- package/dist/embedded-app/static/module-zod.dd7f5a90.js.map +0 -1
- package/dist/embedded-app/static/vendor.65e7f165.js +0 -6
- package/dist/embedded-app/static/vendor.65e7f165.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["9343"],{91350(e,t,a){let r;a.d(t,{z:()=>c,kY:()=>l});var s,i,n,d,o,u,l,c={};a.r(c),a.d(c,{BRAND:()=>eP,DIRTY:()=>O,EMPTY_PATH:()=>x,INVALID:()=>T,NEVER:()=>ty,OK:()=>C,ParseStatus:()=>Z,Schema:()=>P,ZodAny:()=>eo,ZodArray:()=>eh,ZodBigInt:()=>ea,ZodBoolean:()=>er,ZodBranded:()=>e$,ZodCatch:()=>eE,ZodDate:()=>es,ZodDefault:()=>eI,ZodDiscriminatedUnion:()=>e_,ZodEffects:()=>eA,ZodEnum:()=>eO,ZodError:()=>_,ZodFirstPartyTypeKind:()=>l,ZodFunction:()=>ex,ZodIntersection:()=>ey,ZodIssueCode:()=>m,ZodLazy:()=>ew,ZodLiteral:()=>eZ,ZodMap:()=>ek,ZodNaN:()=>eR,ZodNativeEnum:()=>eC,ZodNever:()=>el,ZodNull:()=>ed,ZodNullable:()=>ej,ZodNumber:()=>et,ZodObject:()=>ep,ZodOptional:()=>eS,ZodParsedType:()=>h,ZodPipeline:()=>eM,ZodPromise:()=>eN,ZodReadonly:()=>eF,ZodRecord:()=>ev,ZodSchema:()=>P,ZodSet:()=>eb,ZodString:()=>ee,ZodSymbol:()=>ei,ZodTransformer:()=>eA,ZodTuple:()=>eg,ZodType:()=>P,ZodUndefined:()=>en,ZodUnion:()=>em,ZodUnknown:()=>eu,ZodVoid:()=>ec,addIssueToContext:()=>w,any:()=>eX,array:()=>e9,bigint:()=>eW,boolean:()=>eq,coerce:()=>t_,custom:()=>ez,date:()=>eJ,datetimeRegex:()=>Q,defaultErrorMap:()=>y,discriminatedUnion:()=>e3,effect:()=>to,enum:()=>ti,function:()=>ta,getErrorMap:()=>k,getParsedType:()=>p,instanceof:()=>eV,intersection:()=>e6,isAborted:()=>N,isAsync:()=>j,isDirty:()=>A,isValid:()=>S,late:()=>eD,lazy:()=>tr,literal:()=>ts,makeIssue:()=>b,map:()=>te,nan:()=>eB,nativeEnum:()=>tn,never:()=>e0,null:()=>eG,nullable:()=>tl,number:()=>eK,object:()=>e4,objectUtil:()=>o,oboolean:()=>tf,onumber:()=>tm,optional:()=>tu,ostring:()=>tp,pipeline:()=>th,preprocess:()=>tc,promise:()=>td,quotelessJson:()=>f,record:()=>e7,set:()=>tt,setErrorMap:()=>v,strictObject:()=>e2,string:()=>eU,symbol:()=>eY,transformer:()=>to,tuple:()=>e8,undefined:()=>eH,union:()=>e5,unknown:()=>eQ,util:()=>d,void:()=>e1}),(s=d||(d={})).assertEqual=e=>{},s.assertIs=function(e){},s.assertNever=function(e){throw Error()},s.arrayToEnum=e=>{let t={};for(let a of e)t[a]=a;return t},s.getValidEnumValues=e=>{let t=s.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),a={};for(let r of t)a[r]=e[r];return s.objectValues(a)},s.objectValues=e=>s.objectKeys(e).map(function(t){return e[t]}),s.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},s.find=(e,t)=>{for(let a of e)if(t(a))return a},s.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,s.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},s.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(o||(o={})).mergeShapes=(e,t)=>({...e,...t});let h=d.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),p=e=>{switch(typeof e){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(e)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":if(Array.isArray(e))return h.array;if(null===e)return h.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return h.promise;if("u">typeof Map&&e instanceof Map)return h.map;if("u">typeof Set&&e instanceof Set)return h.set;if("u">typeof Date&&e instanceof Date)return h.date;return h.object;default:return h.unknown}},m=d.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"]),f=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class _ 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]};const 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},a={_errors:[]},r=e=>{for(let s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(r);else if("invalid_return_type"===s.code)r(s.returnTypeError);else if("invalid_arguments"===s.code)r(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,r=0;for(;r<s.path.length;){let a=s.path[r];r===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],r++}}};return r(this),a}static assert(e){if(!(e instanceof _))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,d.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t=Object.create(null),a=[];for(let r of this.issues)if(r.path.length>0){let a=r.path[0];t[a]=t[a]||[],t[a].push(e(r))}else a.push(e(r));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}_.create=e=>new _(e);let y=(e,t)=>{let a;switch(e.code){case m.invalid_type:a=e.received===h.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,d.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:a=`Unrecognized key(s) in object: ${d.joinValues(e.keys,", ")}`;break;case m.invalid_union:a="Invalid input";break;case m.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${d.joinValues(e.options)}`;break;case m.invalid_enum_value:a=`Invalid enum value. Expected ${d.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:a="Invalid function arguments";break;case m.invalid_return_type:a="Invalid function return type";break;case m.invalid_date:a="Invalid date";break;case m.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:d.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case m.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case m.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case m.custom:a="Invalid input";break;case m.invalid_intersection_types:a="Intersection results could not be merged";break;case m.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:a="Number must be finite";break;default:a=t.defaultError,d.assertNever(e)}return{message:a}},g=y;function v(e){g=e}function k(){return g}let b=e=>{let{data:t,path:a,errorMaps:r,issueData:s}=e,i=[...a,...s.path||[]],n={...s,path:i};if(void 0!==s.message)return{...s,path:i,message:s.message};let d="";for(let e of r.filter(e=>!!e).slice().reverse())d=e(n,{data:t,defaultError:d}).message;return{...s,path:i,message:d}},x=[];function w(e,t){let a=g,r=b({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===y?void 0:y].filter(e=>!!e)});e.common.issues.push(r)}class Z{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let a=[];for(let r of t){if("aborted"===r.status)return T;"dirty"===r.status&&e.dirty(),a.push(r.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){let a=[];for(let e of t){let t=await e.key,r=await e.value;a.push({key:t,value:r})}return Z.mergeObjectSync(e,a)}static mergeObjectSync(e,t){let a={};for(let r of t){let{key:t,value:s}=r;if("aborted"===t.status||"aborted"===s.status)return T;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==s.value||r.alwaysSet)&&(a[t.value]=s.value)}return{status:e.value,value:a}}}let T=Object.freeze({status:"aborted"}),O=e=>({status:"dirty",value:e}),C=e=>({status:"valid",value:e}),N=e=>"aborted"===e.status,A=e=>"dirty"===e.status,S=e=>"valid"===e.status,j=e=>"u">typeof Promise&&e instanceof Promise;(i=u||(u={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},i.toString=e=>"string"==typeof e?e:e?.message;class I{constructor(e,t,a,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,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}}let E=(e,t)=>{if(S(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 _(e.common.issues);return this._error=t,this._error}}};function R(e){if(!e)return{};let{errorMap:t,invalid_type_error:a,required_error:r,description:s}=e;if(t&&(a||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:s}:{errorMap:(t,s)=>{let{message:i}=e;return"invalid_enum_value"===t.code?{message:i??s.defaultError}:void 0===s.data?{message:i??r??s.defaultError}:"invalid_type"!==t.code?{message:s.defaultError}:{message:i??a??s.defaultError}},description:s}}class P{get description(){return this._def.description}_getType(e){return p(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:p(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Z,ctx:{common:e.parent.common,data:e.data,parsedType:p(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(j(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){let a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)},r=this._parseSync({data:e,path:a.path,parent:a});return E(a,r)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)};if(!this["~standard"].async)try{let a=this._parseSync({data:e,path:[],parent:t});return S(a)?{value:a.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=>S(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){let a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)},r=this._parse({data:e,path:a.path,parent:a});return E(a,await (j(r)?r:Promise.resolve(r)))}refine(e,t){return this._refinement((a,r)=>{let s=e(a),i=()=>r.addIssue({code:m.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(a):t});return"u">typeof Promise&&s instanceof Promise?s.then(e=>!!e||(i(),!1)):!!s||(i(),!1)})}refinement(e,t){return this._refinement((a,r)=>!!e(a)||(r.addIssue("function"==typeof t?t(a,r):t),!1))}_refinement(e){return new eA({schema:this,typeName:l.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 eS.create(this,this._def)}nullable(){return ej.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eh.create(this)}promise(){return eN.create(this,this._def)}or(e){return em.create([this,e],this._def)}and(e){return ey.create(this,e,this._def)}transform(e){return new eA({...R(this._def),schema:this,typeName:l.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eI({...R(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:l.ZodDefault})}brand(){return new e$({typeName:l.ZodBranded,type:this,...R(this._def)})}catch(e){return new eE({...R(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:l.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eM.create(this,e)}readonly(){return eF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let $=/^c[^\s-]{8,}$/i,M=/^[0-9a-z]+$/,F=/^[0-9A-HJKMNP-TV-Z]{26}$/i,L=/^[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,z=/^[a-z0-9_-]{21}$/i,D=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V=/^[-+]?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)?)??$/,U=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,K=/^(?:(?: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])$/,B=/^(?:(?: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])$/,W=/^(([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]))$/,q=/^(([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])$/,J=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Y=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H="((\\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])))",G=RegExp(`^${H}$`);function X(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let a=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${a}`}function Q(e){let t=`${H}T${X(e)}`,a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,RegExp(`^${t}$`)}class ee extends P{_parse(e){var t,a,s,i;let n;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.string,received:t.parsedType}),T}let o=new Z;for(let u of this._def.checks)if("min"===u.kind)e.data.length<u.value&&(w(n=this._getOrReturnCtx(e,n),{code:m.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),o.dirty());else if("max"===u.kind)e.data.length>u.value&&(w(n=this._getOrReturnCtx(e,n),{code:m.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),o.dirty());else if("length"===u.kind){let t=e.data.length>u.value,a=e.data.length<u.value;(t||a)&&(n=this._getOrReturnCtx(e,n),t?w(n,{code:m.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):a&&w(n,{code:m.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),o.dirty())}else if("email"===u.kind)U.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"email",code:m.invalid_string,message:u.message}),o.dirty());else if("emoji"===u.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"emoji",code:m.invalid_string,message:u.message}),o.dirty());else if("uuid"===u.kind)L.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"uuid",code:m.invalid_string,message:u.message}),o.dirty());else if("nanoid"===u.kind)z.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"nanoid",code:m.invalid_string,message:u.message}),o.dirty());else if("cuid"===u.kind)$.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"cuid",code:m.invalid_string,message:u.message}),o.dirty());else if("cuid2"===u.kind)M.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"cuid2",code:m.invalid_string,message:u.message}),o.dirty());else if("ulid"===u.kind)F.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"ulid",code:m.invalid_string,message:u.message}),o.dirty());else if("url"===u.kind)try{new URL(e.data)}catch{w(n=this._getOrReturnCtx(e,n),{validation:"url",code:m.invalid_string,message:u.message}),o.dirty()}else"regex"===u.kind?(u.regex.lastIndex=0,u.regex.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"regex",code:m.invalid_string,message:u.message}),o.dirty())):"trim"===u.kind?e.data=e.data.trim():"includes"===u.kind?e.data.includes(u.value,u.position)||(w(n=this._getOrReturnCtx(e,n),{code:m.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),o.dirty()):"toLowerCase"===u.kind?e.data=e.data.toLowerCase():"toUpperCase"===u.kind?e.data=e.data.toUpperCase():"startsWith"===u.kind?e.data.startsWith(u.value)||(w(n=this._getOrReturnCtx(e,n),{code:m.invalid_string,validation:{startsWith:u.value},message:u.message}),o.dirty()):"endsWith"===u.kind?e.data.endsWith(u.value)||(w(n=this._getOrReturnCtx(e,n),{code:m.invalid_string,validation:{endsWith:u.value},message:u.message}),o.dirty()):"datetime"===u.kind?Q(u).test(e.data)||(w(n=this._getOrReturnCtx(e,n),{code:m.invalid_string,validation:"datetime",message:u.message}),o.dirty()):"date"===u.kind?G.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{code:m.invalid_string,validation:"date",message:u.message}),o.dirty()):"time"===u.kind?RegExp(`^${X(u)}$`).test(e.data)||(w(n=this._getOrReturnCtx(e,n),{code:m.invalid_string,validation:"time",message:u.message}),o.dirty()):"duration"===u.kind?V.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"duration",code:m.invalid_string,message:u.message}),o.dirty()):"ip"===u.kind?(t=e.data,!(("v4"===(a=u.version)||!a)&&K.test(t)||("v6"===a||!a)&&W.test(t))&&1&&(w(n=this._getOrReturnCtx(e,n),{validation:"ip",code:m.invalid_string,message:u.message}),o.dirty())):"jwt"===u.kind?!function(e,t){if(!D.test(e))return!1;try{let[a]=e.split(".");if(!a)return!1;let r=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),s=JSON.parse(atob(r));if("object"!=typeof s||null===s||"typ"in s&&s?.typ!=="JWT"||!s.alg||t&&s.alg!==t)return!1;return!0}catch{return!1}}(e.data,u.alg)&&(w(n=this._getOrReturnCtx(e,n),{validation:"jwt",code:m.invalid_string,message:u.message}),o.dirty()):"cidr"===u.kind?(s=e.data,!(("v4"===(i=u.version)||!i)&&B.test(s)||("v6"===i||!i)&&q.test(s))&&1&&(w(n=this._getOrReturnCtx(e,n),{validation:"cidr",code:m.invalid_string,message:u.message}),o.dirty())):"base64"===u.kind?J.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"base64",code:m.invalid_string,message:u.message}),o.dirty()):"base64url"===u.kind?Y.test(e.data)||(w(n=this._getOrReturnCtx(e,n),{validation:"base64url",code:m.invalid_string,message:u.message}),o.dirty()):d.assertNever(u);return{status:o.value,value:e.data}}_regex(e,t,a){return this.refinement(t=>e.test(t),{validation:t,code:m.invalid_string,...u.errToObj(a)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...u.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ee.create=e=>new ee({checks:[],typeName:l.ZodString,coerce:e?.coerce??!1,...R(e)});class et extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.number,received:t.parsedType}),T}let a=new Z;for(let r of this._def.checks)"int"===r.kind?d.isInteger(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_type,expected:"integer",received:"float",message:r.message}),a.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),a.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),a.dirty()):"multipleOf"===r.kind?0!==function(e,t){let a=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=a>r?a:r;return Number.parseInt(e.toFixed(s).replace(".",""))%Number.parseInt(t.toFixed(s).replace(".",""))/10**s}(e.data,r.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:r.value,message:r.message}),a.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.not_finite,message:r.message}),a.dirty()):d.assertNever(r);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,a,r){return new et({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:u.toString(r)}]})}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&d.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let a of this._def.checks)if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;else"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value);return Number.isFinite(t)&&Number.isFinite(e)}}et.create=e=>new et({checks:[],typeName:l.ZodNumber,coerce:e?.coerce||!1,...R(e)});class ea extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let a=new Z;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),a.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),a.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(w(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:r.value,message:r.message}),a.dirty()):d.assertNever(r);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.bigint,received:t.parsedType}),T}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,a,r){return new ea({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:u.toString(r)}]})}_addCheck(e){return new ea({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ea.create=e=>new ea({checks:[],typeName:l.ZodBigInt,coerce:e?.coerce??!1,...R(e)});class er extends P{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.boolean,received:t.parsedType}),T}return C(e.data)}}er.create=e=>new er({typeName:l.ZodBoolean,coerce:e?.coerce||!1,...R(e)});class es extends P{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.date,received:t.parsedType}),T}if(Number.isNaN(e.data.getTime()))return w(this._getOrReturnCtx(e),{code:m.invalid_date}),T;let a=new Z;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),a.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),a.dirty()):d.assertNever(r);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new es({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}es.create=e=>new es({checks:[],coerce:e?.coerce||!1,typeName:l.ZodDate,...R(e)});class ei extends P{_parse(e){if(this._getType(e)!==h.symbol){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.symbol,received:t.parsedType}),T}return C(e.data)}}ei.create=e=>new ei({typeName:l.ZodSymbol,...R(e)});class en extends P{_parse(e){if(this._getType(e)!==h.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.undefined,received:t.parsedType}),T}return C(e.data)}}en.create=e=>new en({typeName:l.ZodUndefined,...R(e)});class ed extends P{_parse(e){if(this._getType(e)!==h.null){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.null,received:t.parsedType}),T}return C(e.data)}}ed.create=e=>new ed({typeName:l.ZodNull,...R(e)});class eo extends P{constructor(){super(...arguments),this._any=!0}_parse(e){return C(e.data)}}eo.create=e=>new eo({typeName:l.ZodAny,...R(e)});class eu extends P{constructor(){super(...arguments),this._unknown=!0}_parse(e){return C(e.data)}}eu.create=e=>new eu({typeName:l.ZodUnknown,...R(e)});class el extends P{_parse(e){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.never,received:t.parsedType}),T}}el.create=e=>new el({typeName:l.ZodNever,...R(e)});class ec extends P{_parse(e){if(this._getType(e)!==h.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.void,received:t.parsedType}),T}return C(e.data)}}ec.create=e=>new ec({typeName:l.ZodVoid,...R(e)});class eh extends P{_parse(e){let{ctx:t,status:a}=this._processInputParams(e),r=this._def;if(t.parsedType!==h.array)return w(t,{code:m.invalid_type,expected:h.array,received:t.parsedType}),T;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,s=t.data.length<r.exactLength.value;(e||s)&&(w(t,{code:e?m.too_big:m.too_small,minimum:s?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),a.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(w(t,{code:m.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),a.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(w(t,{code:m.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((e,a)=>r.type._parseAsync(new I(t,e,t.path,a)))).then(e=>Z.mergeArray(a,e));let s=[...t.data].map((e,a)=>r.type._parseSync(new I(t,e,t.path,a)));return Z.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new eh({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new eh({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new eh({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}eh.create=(e,t)=>new eh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:l.ZodArray,...R(t)});class ep extends P{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=d.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==h.object){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.object,received:t.parsedType}),T}let{status:t,ctx:a}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof el&&"strip"===this._def.unknownKeys))for(let e in a.data)s.includes(e)||i.push(e);let n=[];for(let e of s){let t=r[e],s=a.data[e];n.push({key:{status:"valid",value:e},value:t._parse(new I(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof el){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of i)n.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)i.length>0&&(w(a,{code:m.unrecognized_keys,keys:i}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of i){let r=a.data[t];n.push({key:{status:"valid",value:t},value:e._parse(new I(a,r,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of n){let a=await t.key,r=await t.value;e.push({key:a,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Z.mergeObjectSync(t,e)):Z.mergeObjectSync(t,n)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new ep({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{let r=this._def.errorMap?.(t,a).message??a.defaultError;return"unrecognized_keys"===t.code?{message:u.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new ep({...this._def,unknownKeys:"strip"})}passthrough(){return new ep({...this._def,unknownKeys:"passthrough"})}extend(e){return new ep({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ep({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:l.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ep({...this._def,catchall:e})}pick(e){let t={};for(let a of d.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new ep({...this._def,shape:()=>t})}omit(e){let t={};for(let a of d.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new ep({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ep){let a={};for(let r in t.shape){let s=t.shape[r];a[r]=eS.create(e(s))}return new ep({...t._def,shape:()=>a})}if(t instanceof eh)return new eh({...t._def,type:e(t.element)});if(t instanceof eS)return eS.create(e(t.unwrap()));if(t instanceof ej)return ej.create(e(t.unwrap()));if(t instanceof eg)return eg.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let a of d.objectKeys(this.shape)){let r=this.shape[a];e&&!e[a]?t[a]=r:t[a]=r.optional()}return new ep({...this._def,shape:()=>t})}required(e){let t={};for(let a of d.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof eS;)e=e._def.innerType;t[a]=e}return new ep({...this._def,shape:()=>t})}keyof(){return eT(d.objectKeys(this.shape))}}ep.create=(e,t)=>new ep({shape:()=>e,unknownKeys:"strip",catchall:el.create(),typeName:l.ZodObject,...R(t)}),ep.strictCreate=(e,t)=>new ep({shape:()=>e,unknownKeys:"strict",catchall:el.create(),typeName:l.ZodObject,...R(t)}),ep.lazycreate=(e,t)=>new ep({shape:e,unknownKeys:"strip",catchall:el.create(),typeName:l.ZodObject,...R(t)});class em extends P{_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map(async e=>{let a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;let a=e.map(e=>new _(e.ctx.common.issues));return w(t,{code:m.invalid_union,unionErrors:a}),T});{let e,r=[];for(let s of a){let a={...t,common:{...t.common,issues:[]},parent:null},i=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:a}),a.common.issues.length&&r.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let s=r.map(e=>new _(e));return w(t,{code:m.invalid_union,unionErrors:s}),T}}get options(){return this._def.options}}em.create=(e,t)=>new em({options:e,typeName:l.ZodUnion,...R(t)});let ef=e=>{if(e instanceof ew)return ef(e.schema);if(e instanceof eA)return ef(e.innerType());if(e instanceof eZ)return[e.value];if(e instanceof eO)return e.options;if(e instanceof eC)return d.objectValues(e.enum);else if(e instanceof eI)return ef(e._def.innerType);else if(e instanceof en)return[void 0];else if(e instanceof ed)return[null];else if(e instanceof eS)return[void 0,...ef(e.unwrap())];else if(e instanceof ej)return[null,...ef(e.unwrap())];else if(e instanceof e$)return ef(e.unwrap());else if(e instanceof eF)return ef(e.unwrap());else if(e instanceof eE)return ef(e._def.innerType);else return[]};class e_ extends P{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return w(t,{code:m.invalid_type,expected:h.object,received:t.parsedType}),T;let a=this.discriminator,r=t.data[a],s=this.optionsMap.get(r);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):(w(t,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),T)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){let r=new Map;for(let a of t){let t=ef(a.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of t){if(r.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);r.set(s,a)}}return new e_({typeName:l.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...R(a)})}}class ey extends P{_parse(e){let{status:t,ctx:a}=this._processInputParams(e),r=(e,r)=>{if(N(e)||N(r))return T;let s=function e(t,a){let r=p(t),s=p(a);if(t===a)return{valid:!0,data:t};if(r===h.object&&s===h.object){let r=d.objectKeys(a),s=d.objectKeys(t).filter(e=>-1!==r.indexOf(e)),i={...t,...a};for(let r of s){let s=e(t[r],a[r]);if(!s.valid)return{valid:!1};i[r]=s.data}return{valid:!0,data:i}}if(r===h.array&&s===h.array){if(t.length!==a.length)return{valid:!1};let r=[];for(let s=0;s<t.length;s++){let i=e(t[s],a[s]);if(!i.valid)return{valid:!1};r.push(i.data)}return{valid:!0,data:r}}if(r===h.date&&s===h.date&&+t==+a)return{valid:!0,data:t};return{valid:!1}}(e.value,r.value);return s.valid?((A(e)||A(r))&&t.dirty(),{status:t.value,value:s.data}):(w(a,{code:m.invalid_intersection_types}),T)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ey.create=(e,t,a)=>new ey({left:e,right:t,typeName:l.ZodIntersection,...R(a)});class eg extends P{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.array)return w(a,{code:m.invalid_type,expected:h.array,received:a.parsedType}),T;if(a.data.length<this._def.items.length)return w(a,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),T;!this._def.rest&&a.data.length>this._def.items.length&&(w(a,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...a.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new I(a,e,a.path,t)):null}).filter(e=>!!e);return a.common.async?Promise.all(r).then(e=>Z.mergeArray(t,e)):Z.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new eg({...this._def,rest:e})}}eg.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eg({items:e,typeName:l.ZodTuple,rest:null,...R(t)})};class ev extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.object)return w(a,{code:m.invalid_type,expected:h.object,received:a.parsedType}),T;let r=[],s=this._def.keyType,i=this._def.valueType;for(let e in a.data)r.push({key:s._parse(new I(a,e,a.path,e)),value:i._parse(new I(a,a.data[e],a.path,e)),alwaysSet:e in a.data});return a.common.async?Z.mergeObjectAsync(t,r):Z.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,a){return new ev(t instanceof P?{keyType:e,valueType:t,typeName:l.ZodRecord,...R(a)}:{keyType:ee.create(),valueType:e,typeName:l.ZodRecord,...R(t)})}}class ek extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.map)return w(a,{code:m.invalid_type,expected:h.map,received:a.parsedType}),T;let r=this._def.keyType,s=this._def.valueType,i=[...a.data.entries()].map(([e,t],i)=>({key:r._parse(new I(a,e,a.path,[i,"key"])),value:s._parse(new I(a,t,a.path,[i,"value"]))}));if(a.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let a of i){let r=await a.key,s=await a.value;if("aborted"===r.status||"aborted"===s.status)return T;("dirty"===r.status||"dirty"===s.status)&&t.dirty(),e.set(r.value,s.value)}return{status:t.value,value:e}})}{let e=new Map;for(let a of i){let r=a.key,s=a.value;if("aborted"===r.status||"aborted"===s.status)return T;("dirty"===r.status||"dirty"===s.status)&&t.dirty(),e.set(r.value,s.value)}return{status:t.value,value:e}}}}ek.create=(e,t,a)=>new ek({valueType:t,keyType:e,typeName:l.ZodMap,...R(a)});class eb extends P{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.set)return w(a,{code:m.invalid_type,expected:h.set,received:a.parsedType}),T;let r=this._def;null!==r.minSize&&a.data.size<r.minSize.value&&(w(a,{code:m.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&a.data.size>r.maxSize.value&&(w(a,{code:m.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let s=this._def.valueType;function i(e){let a=new Set;for(let r of e){if("aborted"===r.status)return T;"dirty"===r.status&&t.dirty(),a.add(r.value)}return{status:t.value,value:a}}let n=[...a.data.values()].map((e,t)=>s._parse(new I(a,e,a.path,t)));return a.common.async?Promise.all(n).then(e=>i(e)):i(n)}min(e,t){return new eb({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new eb({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eb.create=(e,t)=>new eb({valueType:e,minSize:null,maxSize:null,typeName:l.ZodSet,...R(t)});class ex extends P{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return w(t,{code:m.invalid_type,expected:h.function,received:t.parsedType}),T;function a(e,a){return b({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,g,y].filter(e=>!!e),issueData:{code:m.invalid_arguments,argumentsError:a}})}function r(e,a){return b({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,g,y].filter(e=>!!e),issueData:{code:m.invalid_return_type,returnTypeError:a}})}let s={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof eN){let e=this;return C(async function(...t){let n=new _([]),d=await e._def.args.parseAsync(t,s).catch(e=>{throw n.addIssue(a(t,e)),n}),o=await Reflect.apply(i,this,d);return await e._def.returns._def.type.parseAsync(o,s).catch(e=>{throw n.addIssue(r(o,e)),n})})}{let e=this;return C(function(...t){let n=e._def.args.safeParse(t,s);if(!n.success)throw new _([a(t,n.error)]);let d=Reflect.apply(i,this,n.data),o=e._def.returns.safeParse(d,s);if(!o.success)throw new _([r(d,o.error)]);return o.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ex({...this._def,args:eg.create(e).rest(eu.create())})}returns(e){return new ex({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new ex({args:e||eg.create([]).rest(eu.create()),returns:t||eu.create(),typeName:l.ZodFunction,...R(a)})}}class ew extends P{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})}}ew.create=(e,t)=>new ew({getter:e,typeName:l.ZodLazy,...R(t)});class eZ extends P{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:m.invalid_literal,expected:this._def.value}),T}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eT(e,t){return new eO({values:e,typeName:l.ZodEnum,...R(t)})}eZ.create=(e,t)=>new eZ({value:e,typeName:l.ZodLiteral,...R(t)});class eO extends P{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),a=this._def.values;return w(t,{expected:d.joinValues(a),received:t.parsedType,code:m.invalid_type}),T}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),a=this._def.values;return w(t,{received:t.data,code:m.invalid_enum_value,options:a}),T}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(e,t=this._def){return eO.create(e,{...this._def,...t})}exclude(e,t=this._def){return eO.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}eO.create=eT;class eC extends P{_parse(e){let t=d.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==h.string&&a.parsedType!==h.number){let e=d.objectValues(t);return w(a,{expected:d.joinValues(e),received:a.parsedType,code:m.invalid_type}),T}if(this._cache||(this._cache=new Set(d.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=d.objectValues(t);return w(a,{received:a.data,code:m.invalid_enum_value,options:e}),T}return C(e.data)}get enum(){return this._def.values}}eC.create=(e,t)=>new eC({values:e,typeName:l.ZodNativeEnum,...R(t)});class eN extends P{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==h.promise&&!1===t.common.async?(w(t,{code:m.invalid_type,expected:h.promise,received:t.parsedType}),T):C((t.parsedType===h.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eN.create=(e,t)=>new eN({type:e,typeName:l.ZodPromise,...R(t)});class eA extends P{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===l.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:a}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:e=>{w(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===r.type){let e=r.transform(a.data,s);if(a.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return T;let r=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===r.status?T:"dirty"===r.status||"dirty"===t.value?O(r.value):r});{if("aborted"===t.value)return T;let r=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===r.status?T:"dirty"===r.status||"dirty"===t.value?O(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,s);if(a.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(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(a=>"aborted"===a.status?T:("dirty"===a.status&&t.dirty(),e(a.value).then(()=>({status:t.value,value:a.value}))));{let r=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===r.status?T:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type)if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(e=>S(e)?Promise.resolve(r.transform(e.value,s)).then(e=>({status:t.value,value:e})):T);else{let e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!S(e))return T;let i=r.transform(e.value,s);if(i instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}d.assertNever(r)}}eA.create=(e,t,a)=>new eA({schema:e,typeName:l.ZodEffects,effect:t,...R(a)}),eA.createWithPreprocess=(e,t,a)=>new eA({schema:t,effect:{type:"preprocess",transform:e},typeName:l.ZodEffects,...R(a)});class eS extends P{_parse(e){return this._getType(e)===h.undefined?C(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eS.create=(e,t)=>new eS({innerType:e,typeName:l.ZodOptional,...R(t)});class ej extends P{_parse(e){return this._getType(e)===h.null?C(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ej.create=(e,t)=>new ej({innerType:e,typeName:l.ZodNullable,...R(t)});class eI extends P{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return t.parsedType===h.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eI.create=(e,t)=>new eI({innerType:e,typeName:l.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...R(t)});class eE extends P{_parse(e){let{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return j(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new _(a.common.issues)},input:a.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new _(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:l.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...R(t)});class eR extends P{_parse(e){if(this._getType(e)!==h.nan){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.nan,received:t.parsedType}),T}return{status:"valid",value:e.data}}}eR.create=e=>new eR({typeName:l.ZodNaN,...R(e)});let eP=Symbol("zod_brand");class e$ extends P{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class eM extends P{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?T:"dirty"===e.status?(t.dirty(),O(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})();{let e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?T:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new eM({in:e,out:t,typeName:l.ZodPipeline})}}class eF extends P{_parse(e){let t=this._def.innerType._parse(e),a=e=>(S(e)&&(e.value=Object.freeze(e.value)),e);return j(t)?t.then(e=>a(e)):a(t)}unwrap(){return this._def.innerType}}function eL(e,t){let a="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof a?{message:a}:a}function ez(e,t={},a){return e?eo.create().superRefine((r,s)=>{let i=e(r);if(i instanceof Promise)return i.then(e=>{if(!e){let e=eL(t,r),i=e.fatal??a??!0;s.addIssue({code:"custom",...e,fatal:i})}});if(!i){let e=eL(t,r),i=e.fatal??a??!0;s.addIssue({code:"custom",...e,fatal:i})}}):eo.create()}eF.create=(e,t)=>new eF({innerType:e,typeName:l.ZodReadonly,...R(t)});let eD={object:ep.lazycreate};(n=l||(l={})).ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly";let eV=(e,t={message:`Input not instance of ${e.name}`})=>ez(t=>t instanceof e,t),eU=ee.create,eK=et.create,eB=eR.create,eW=ea.create,eq=er.create,eJ=es.create,eY=ei.create,eH=en.create,eG=ed.create,eX=eo.create,eQ=eu.create,e0=el.create,e1=ec.create,e9=eh.create,e4=ep.create,e2=ep.strictCreate,e5=em.create,e3=e_.create,e6=ey.create,e8=eg.create,e7=ev.create,te=ek.create,tt=eb.create,ta=ex.create,tr=ew.create,ts=eZ.create,ti=eO.create,tn=eC.create,td=eN.create,to=eA.create,tu=eS.create,tl=ej.create,tc=eA.createWithPreprocess,th=eM.create,tp=()=>eU().optional(),tm=()=>eK().optional(),tf=()=>eq().optional(),t_={string:e=>ee.create({...e,coerce:!0}),number:e=>et.create({...e,coerce:!0}),boolean:e=>er.create({...e,coerce:!0}),bigint:e=>ea.create({...e,coerce:!0}),date:e=>es.create({...e,coerce:!0})},ty=T}}]);
|
|
2
|
-
//# sourceMappingURL=module-zod.dd7f5a90.js.map
|