veloce-ts 0.1.0

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.
Files changed (175) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/LICENSE +21 -0
  3. package/README.md +442 -0
  4. package/bin/veloce.ts +2 -0
  5. package/dist/cjs/src/cli/index.js +425 -0
  6. package/dist/cjs/src/cli/index.js.map +22 -0
  7. package/dist/cjs/src/docs/index.js +7 -0
  8. package/dist/cjs/src/docs/index.js.map +55 -0
  9. package/dist/cjs/src/errors/index.js +4 -0
  10. package/dist/cjs/src/errors/index.js.map +12 -0
  11. package/dist/cjs/src/graphql/index.js +83 -0
  12. package/dist/cjs/src/graphql/index.js.map +24 -0
  13. package/dist/cjs/src/index.js +126 -0
  14. package/dist/cjs/src/index.js.map +108 -0
  15. package/dist/cjs/src/middleware/index.js +3 -0
  16. package/dist/cjs/src/middleware/index.js.map +12 -0
  17. package/dist/cjs/src/plugins/index.js +125 -0
  18. package/dist/cjs/src/plugins/index.js.map +67 -0
  19. package/dist/cjs/src/testing/index.js +17 -0
  20. package/dist/cjs/src/testing/index.js.map +54 -0
  21. package/dist/cjs/src/types/index.js +3 -0
  22. package/dist/cjs/src/types/index.js.map +16 -0
  23. package/dist/cjs/src/validation/index.js +3 -0
  24. package/dist/cjs/src/validation/index.js.map +19 -0
  25. package/dist/cjs/src/websocket/index.js +3 -0
  26. package/dist/cjs/src/websocket/index.js.map +12 -0
  27. package/dist/esm/chunk-0zxhx5b8.js +7 -0
  28. package/dist/esm/chunk-0zxhx5b8.js.map +10 -0
  29. package/dist/esm/chunk-159eqj8q.js +5 -0
  30. package/dist/esm/chunk-159eqj8q.js.map +12 -0
  31. package/dist/esm/chunk-1hqjkm44.js +5 -0
  32. package/dist/esm/chunk-1hqjkm44.js.map +11 -0
  33. package/dist/esm/chunk-2q6s8v3j.js +6 -0
  34. package/dist/esm/chunk-2q6s8v3j.js.map +10 -0
  35. package/dist/esm/chunk-42h6trpf.js +5 -0
  36. package/dist/esm/chunk-42h6trpf.js.map +9 -0
  37. package/dist/esm/chunk-82f2j0k2.js +60 -0
  38. package/dist/esm/chunk-82f2j0k2.js.map +10 -0
  39. package/dist/esm/chunk-8wrnr45g.js +338 -0
  40. package/dist/esm/chunk-8wrnr45g.js.map +10 -0
  41. package/dist/esm/chunk-9p6d0t33.js +5 -0
  42. package/dist/esm/chunk-9p6d0t33.js.map +10 -0
  43. package/dist/esm/chunk-awven6dt.js +4 -0
  44. package/dist/esm/chunk-awven6dt.js.map +16 -0
  45. package/dist/esm/chunk-gv5n8ddb.js +18 -0
  46. package/dist/esm/chunk-gv5n8ddb.js.map +10 -0
  47. package/dist/esm/chunk-pn7z890c.js +72 -0
  48. package/dist/esm/chunk-pn7z890c.js.map +13 -0
  49. package/dist/esm/chunk-qfsjy9bg.js +7 -0
  50. package/dist/esm/chunk-qfsjy9bg.js.map +10 -0
  51. package/dist/esm/chunk-vkkzgaf7.js +5 -0
  52. package/dist/esm/chunk-vkkzgaf7.js.map +12 -0
  53. package/dist/esm/src/cli/index.js +30 -0
  54. package/dist/esm/src/cli/index.js.map +18 -0
  55. package/dist/esm/src/docs/index.js +8 -0
  56. package/dist/esm/src/docs/index.js.map +48 -0
  57. package/dist/esm/src/errors/index.js +4 -0
  58. package/dist/esm/src/errors/index.js.map +9 -0
  59. package/dist/esm/src/graphql/index.js +4 -0
  60. package/dist/esm/src/graphql/index.js.map +9 -0
  61. package/dist/esm/src/index.js +4 -0
  62. package/dist/esm/src/index.js.map +16 -0
  63. package/dist/esm/src/middleware/index.js +4 -0
  64. package/dist/esm/src/middleware/index.js.map +9 -0
  65. package/dist/esm/src/plugins/index.js +42 -0
  66. package/dist/esm/src/plugins/index.js.map +10 -0
  67. package/dist/esm/src/testing/index.js +4 -0
  68. package/dist/esm/src/testing/index.js.map +39 -0
  69. package/dist/esm/src/types/index.js +4 -0
  70. package/dist/esm/src/types/index.js.map +9 -0
  71. package/dist/esm/src/validation/index.js +4 -0
  72. package/dist/esm/src/validation/index.js.map +9 -0
  73. package/dist/esm/src/websocket/index.js +4 -0
  74. package/dist/esm/src/websocket/index.js.map +9 -0
  75. package/dist/types/adapters/base.d.ts +24 -0
  76. package/dist/types/adapters/base.d.ts.map +1 -0
  77. package/dist/types/adapters/express.d.ts +44 -0
  78. package/dist/types/adapters/express.d.ts.map +1 -0
  79. package/dist/types/adapters/hono.d.ts +44 -0
  80. package/dist/types/adapters/hono.d.ts.map +1 -0
  81. package/dist/types/cli/commands/build.d.ts +3 -0
  82. package/dist/types/cli/commands/build.d.ts.map +1 -0
  83. package/dist/types/cli/commands/dev.d.ts +3 -0
  84. package/dist/types/cli/commands/dev.d.ts.map +1 -0
  85. package/dist/types/cli/commands/generate.d.ts +3 -0
  86. package/dist/types/cli/commands/generate.d.ts.map +1 -0
  87. package/dist/types/cli/commands/new.d.ts +3 -0
  88. package/dist/types/cli/commands/new.d.ts.map +1 -0
  89. package/dist/types/cli/index.d.ts +3 -0
  90. package/dist/types/cli/index.d.ts.map +1 -0
  91. package/dist/types/core/application.d.ts +268 -0
  92. package/dist/types/core/application.d.ts.map +1 -0
  93. package/dist/types/core/compiled-metadata.d.ts +58 -0
  94. package/dist/types/core/compiled-metadata.d.ts.map +1 -0
  95. package/dist/types/core/metadata.d.ts +175 -0
  96. package/dist/types/core/metadata.d.ts.map +1 -0
  97. package/dist/types/core/plugin.d.ts +63 -0
  98. package/dist/types/core/plugin.d.ts.map +1 -0
  99. package/dist/types/core/router-compiler.d.ts +61 -0
  100. package/dist/types/core/router-compiler.d.ts.map +1 -0
  101. package/dist/types/decorators/dependencies.d.ts +28 -0
  102. package/dist/types/decorators/dependencies.d.ts.map +1 -0
  103. package/dist/types/decorators/docs.d.ts +38 -0
  104. package/dist/types/decorators/docs.d.ts.map +1 -0
  105. package/dist/types/decorators/graphql.d.ts +126 -0
  106. package/dist/types/decorators/graphql.d.ts.map +1 -0
  107. package/dist/types/decorators/http.d.ts +74 -0
  108. package/dist/types/decorators/http.d.ts.map +1 -0
  109. package/dist/types/decorators/middleware.d.ts +30 -0
  110. package/dist/types/decorators/middleware.d.ts.map +1 -0
  111. package/dist/types/decorators/params.d.ts +82 -0
  112. package/dist/types/decorators/params.d.ts.map +1 -0
  113. package/dist/types/decorators/websocket.d.ts +61 -0
  114. package/dist/types/decorators/websocket.d.ts.map +1 -0
  115. package/dist/types/dependencies/container.d.ts +93 -0
  116. package/dist/types/dependencies/container.d.ts.map +1 -0
  117. package/dist/types/docs/index.d.ts +3 -0
  118. package/dist/types/docs/index.d.ts.map +1 -0
  119. package/dist/types/docs/openapi-generator.d.ts +50 -0
  120. package/dist/types/docs/openapi-generator.d.ts.map +1 -0
  121. package/dist/types/docs/zod-to-json-schema.d.ts +46 -0
  122. package/dist/types/docs/zod-to-json-schema.d.ts.map +1 -0
  123. package/dist/types/errors/exceptions.d.ts +48 -0
  124. package/dist/types/errors/exceptions.d.ts.map +1 -0
  125. package/dist/types/errors/handler.d.ts +61 -0
  126. package/dist/types/errors/handler.d.ts.map +1 -0
  127. package/dist/types/errors/index.d.ts +7 -0
  128. package/dist/types/errors/index.d.ts.map +1 -0
  129. package/dist/types/graphql/index.d.ts +4 -0
  130. package/dist/types/graphql/index.d.ts.map +1 -0
  131. package/dist/types/graphql/plugin.d.ts +60 -0
  132. package/dist/types/graphql/plugin.d.ts.map +1 -0
  133. package/dist/types/graphql/schema-builder.d.ts +46 -0
  134. package/dist/types/graphql/schema-builder.d.ts.map +1 -0
  135. package/dist/types/graphql/zod-to-graphql.d.ts +22 -0
  136. package/dist/types/graphql/zod-to-graphql.d.ts.map +1 -0
  137. package/dist/types/index.d.ts +34 -0
  138. package/dist/types/index.d.ts.map +1 -0
  139. package/dist/types/middleware/compression.d.ts +7 -0
  140. package/dist/types/middleware/compression.d.ts.map +1 -0
  141. package/dist/types/middleware/cors.d.ts +7 -0
  142. package/dist/types/middleware/cors.d.ts.map +1 -0
  143. package/dist/types/middleware/index.d.ts +4 -0
  144. package/dist/types/middleware/index.d.ts.map +1 -0
  145. package/dist/types/middleware/rate-limit.d.ts +7 -0
  146. package/dist/types/middleware/rate-limit.d.ts.map +1 -0
  147. package/dist/types/plugins/index.d.ts +4 -0
  148. package/dist/types/plugins/index.d.ts.map +1 -0
  149. package/dist/types/plugins/openapi.d.ts +23 -0
  150. package/dist/types/plugins/openapi.d.ts.map +1 -0
  151. package/dist/types/responses/response.d.ts +200 -0
  152. package/dist/types/responses/response.d.ts.map +1 -0
  153. package/dist/types/testing/helpers.d.ts +98 -0
  154. package/dist/types/testing/helpers.d.ts.map +1 -0
  155. package/dist/types/testing/index.d.ts +4 -0
  156. package/dist/types/testing/index.d.ts.map +1 -0
  157. package/dist/types/testing/test-client.d.ts +86 -0
  158. package/dist/types/testing/test-client.d.ts.map +1 -0
  159. package/dist/types/types/index.d.ts +232 -0
  160. package/dist/types/types/index.d.ts.map +1 -0
  161. package/dist/types/validation/exceptions.d.ts +25 -0
  162. package/dist/types/validation/exceptions.d.ts.map +1 -0
  163. package/dist/types/validation/index.d.ts +3 -0
  164. package/dist/types/validation/index.d.ts.map +1 -0
  165. package/dist/types/validation/validator.d.ts +54 -0
  166. package/dist/types/validation/validator.d.ts.map +1 -0
  167. package/dist/types/websocket/connection.d.ts +51 -0
  168. package/dist/types/websocket/connection.d.ts.map +1 -0
  169. package/dist/types/websocket/index.d.ts +4 -0
  170. package/dist/types/websocket/index.d.ts.map +1 -0
  171. package/dist/types/websocket/manager.d.ts +82 -0
  172. package/dist/types/websocket/manager.d.ts.map +1 -0
  173. package/dist/types/websocket/plugin.d.ts +51 -0
  174. package/dist/types/websocket/plugin.d.ts.map +1 -0
  175. package/package.json +149 -0
@@ -0,0 +1,3 @@
1
+ var m$=Object.create;var{getPrototypeOf:y$,defineProperty:J$,getOwnPropertyNames:N$,getOwnPropertyDescriptor:Z$}=Object,D$=Object.prototype.hasOwnProperty;var $_=($,q,_)=>{_=$!=null?m$(y$($)):{};let G=q||!$||!$.__esModule?J$(_,"default",{value:$,enumerable:!0}):_;for(let W of N$($))if(!D$.call(G,W))J$(G,W,{get:()=>$[W],enumerable:!0});return G},L$=new WeakMap,n$=($)=>{var q=L$.get($),_;if(q)return q;if(q=J$({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")N$($).map((G)=>!D$.call(q,G)&&J$(q,G,{get:()=>$[G],enumerable:!(_=Z$($,G))||_.enumerable}));return L$.set($,q),q},q_=($,q)=>()=>(q||$((q={exports:{}}).exports,q),q.exports);var f$=($,q)=>{for(var _ in q)J$($,_,{get:q[_],enumerable:!0,configurable:!0,set:(G)=>q[_]=()=>G})};var __=($,q)=>()=>($&&(q=$($=0)),q);var eq={};f$(eq,{z:()=>R$});module.exports=n$(eq);var R$={};f$(R$,{void:()=>Dq,util:()=>R,unknown:()=>Lq,union:()=>Cq,undefined:()=>Uq,tuple:()=>Iq,transformer:()=>cq,symbol:()=>Vq,string:()=>T$,strictObject:()=>Kq,setErrorMap:()=>p$,set:()=>Tq,record:()=>Pq,quotelessJson:()=>c$,promise:()=>nq,preprocess:()=>iq,pipeline:()=>rq,ostring:()=>oq,optional:()=>uq,onumber:()=>dq,oboolean:()=>aq,objectUtil:()=>V$,object:()=>Fq,number:()=>l$,nullable:()=>pq,null:()=>Aq,never:()=>Nq,nativeEnum:()=>Zq,nan:()=>Oq,map:()=>hq,makeIssue:()=>X$,literal:()=>mq,lazy:()=>xq,late:()=>bq,isValid:()=>h,isDirty:()=>b$,isAsync:()=>i,isAborted:()=>j$,intersection:()=>gq,instanceof:()=>Sq,getParsedType:()=>K,getErrorMap:()=>p,function:()=>lq,enum:()=>yq,effect:()=>cq,discriminatedUnion:()=>kq,defaultErrorMap:()=>g,datetimeRegex:()=>I$,date:()=>Eq,custom:()=>h$,coerce:()=>sq,boolean:()=>x$,bigint:()=>Rq,array:()=>fq,any:()=>vq,addIssueToContext:()=>B,ZodVoid:()=>Y$,ZodUnknown:()=>T,ZodUnion:()=>t,ZodUndefined:()=>a,ZodType:()=>O,ZodTuple:()=>k,ZodTransformer:()=>F,ZodSymbol:()=>Q$,ZodString:()=>L,ZodSet:()=>c,ZodSchema:()=>O,ZodRecord:()=>M$,ZodReadonly:()=>H$,ZodPromise:()=>u,ZodPipeline:()=>z$,ZodParsedType:()=>Q,ZodOptional:()=>D,ZodObject:()=>E,ZodNumber:()=>l,ZodNullable:()=>P,ZodNull:()=>s,ZodNever:()=>C,ZodNativeEnum:()=>_$,ZodNaN:()=>w$,ZodMap:()=>B$,ZodLiteral:()=>q$,ZodLazy:()=>$$,ZodIssueCode:()=>X,ZodIntersection:()=>e,ZodFunction:()=>o,ZodFirstPartyTypeKind:()=>j,ZodError:()=>A,ZodEnum:()=>m,ZodEffects:()=>F,ZodDiscriminatedUnion:()=>S$,ZodDefault:()=>W$,ZodDate:()=>Z,ZodCatch:()=>G$,ZodBranded:()=>O$,ZodBoolean:()=>d,ZodBigInt:()=>x,ZodArray:()=>N,ZodAny:()=>n,Schema:()=>O,ParseStatus:()=>V,OK:()=>U,NEVER:()=>tq,INVALID:()=>z,EMPTY_PATH:()=>i$,DIRTY:()=>y,BRAND:()=>jq});var R;(function($){$.assertEqual=(W)=>{};function q(W){}$.assertIs=q;function _(W){throw Error()}$.assertNever=_,$.arrayToEnum=(W)=>{let J={};for(let H of W)J[H]=H;return J},$.getValidEnumValues=(W)=>{let J=$.objectKeys(W).filter((Y)=>typeof W[W[Y]]!=="number"),H={};for(let Y of J)H[Y]=W[Y];return $.objectValues(H)},$.objectValues=(W)=>{return $.objectKeys(W).map(function(J){return W[J]})},$.objectKeys=typeof Object.keys==="function"?(W)=>Object.keys(W):(W)=>{let J=[];for(let H in W)if(Object.prototype.hasOwnProperty.call(W,H))J.push(H);return J},$.find=(W,J)=>{for(let H of W)if(J(H))return H;return},$.isInteger=typeof Number.isInteger==="function"?(W)=>Number.isInteger(W):(W)=>typeof W==="number"&&Number.isFinite(W)&&Math.floor(W)===W;function G(W,J=" | "){return W.map((H)=>typeof H==="string"?`'${H}'`:H).join(J)}$.joinValues=G,$.jsonStringifyReplacer=(W,J)=>{if(typeof J==="bigint")return J.toString();return J}})(R||(R={}));var V$;(function($){$.mergeShapes=(q,_)=>{return{...q,..._}}})(V$||(V$={}));var Q=R.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),K=($)=>{switch(typeof $){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return Number.isNaN($)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":if(Array.isArray($))return Q.array;if($===null)return Q.null;if($.then&&typeof $.then==="function"&&$.catch&&typeof $.catch==="function")return Q.promise;if(typeof Map<"u"&&$ instanceof Map)return Q.map;if(typeof Set<"u"&&$ instanceof Set)return Q.set;if(typeof Date<"u"&&$ instanceof Date)return Q.date;return Q.object;default:return Q.unknown}};var X=R.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"]),c$=($)=>{return JSON.stringify($,null,2).replace(/"([^"]+)":/g,"$1:")};class A extends Error{get errors(){return this.issues}constructor($){super();this.issues=[],this.addIssue=(_)=>{this.issues=[...this.issues,_]},this.addIssues=(_=[])=>{this.issues=[...this.issues,..._]};let q=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,q);else this.__proto__=q;this.name="ZodError",this.issues=$}format($){let q=$||function(W){return W.message},_={_errors:[]},G=(W)=>{for(let J of W.issues)if(J.code==="invalid_union")J.unionErrors.map(G);else if(J.code==="invalid_return_type")G(J.returnTypeError);else if(J.code==="invalid_arguments")G(J.argumentsError);else if(J.path.length===0)_._errors.push(q(J));else{let H=_,Y=0;while(Y<J.path.length){let M=J.path[Y];if(Y!==J.path.length-1)H[M]=H[M]||{_errors:[]};else H[M]=H[M]||{_errors:[]},H[M]._errors.push(q(J));H=H[M],Y++}}};return G(this),_}static assert($){if(!($ instanceof A))throw Error(`Not a ZodError: ${$}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,R.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten($=(q)=>q.message){let q={},_=[];for(let G of this.issues)if(G.path.length>0){let W=G.path[0];q[W]=q[W]||[],q[W].push($(G))}else _.push($(G));return{formErrors:_,fieldErrors:q}}get formErrors(){return this.flatten()}}A.create=($)=>{return new A($)};var u$=($,q)=>{let _;switch($.code){case X.invalid_type:if($.received===Q.undefined)_="Required";else _=`Expected ${$.expected}, received ${$.received}`;break;case X.invalid_literal:_=`Invalid literal value, expected ${JSON.stringify($.expected,R.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:_=`Unrecognized key(s) in object: ${R.joinValues($.keys,", ")}`;break;case X.invalid_union:_="Invalid input";break;case X.invalid_union_discriminator:_=`Invalid discriminator value. Expected ${R.joinValues($.options)}`;break;case X.invalid_enum_value:_=`Invalid enum value. Expected ${R.joinValues($.options)}, received '${$.received}'`;break;case X.invalid_arguments:_="Invalid function arguments";break;case X.invalid_return_type:_="Invalid function return type";break;case X.invalid_date:_="Invalid date";break;case X.invalid_string:if(typeof $.validation==="object")if("includes"in $.validation){if(_=`Invalid input: must include "${$.validation.includes}"`,typeof $.validation.position==="number")_=`${_} at one or more positions greater than or equal to ${$.validation.position}`}else if("startsWith"in $.validation)_=`Invalid input: must start with "${$.validation.startsWith}"`;else if("endsWith"in $.validation)_=`Invalid input: must end with "${$.validation.endsWith}"`;else R.assertNever($.validation);else if($.validation!=="regex")_=`Invalid ${$.validation}`;else _="Invalid";break;case X.too_small:if($.type==="array")_=`Array must contain ${$.exact?"exactly":$.inclusive?"at least":"more than"} ${$.minimum} element(s)`;else if($.type==="string")_=`String must contain ${$.exact?"exactly":$.inclusive?"at least":"over"} ${$.minimum} character(s)`;else if($.type==="number")_=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="bigint")_=`Number must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${$.minimum}`;else if($.type==="date")_=`Date must be ${$.exact?"exactly equal to ":$.inclusive?"greater than or equal to ":"greater than "}${new Date(Number($.minimum))}`;else _="Invalid input";break;case X.too_big:if($.type==="array")_=`Array must contain ${$.exact?"exactly":$.inclusive?"at most":"less than"} ${$.maximum} element(s)`;else if($.type==="string")_=`String must contain ${$.exact?"exactly":$.inclusive?"at most":"under"} ${$.maximum} character(s)`;else if($.type==="number")_=`Number must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="bigint")_=`BigInt must be ${$.exact?"exactly":$.inclusive?"less than or equal to":"less than"} ${$.maximum}`;else if($.type==="date")_=`Date must be ${$.exact?"exactly":$.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number($.maximum))}`;else _="Invalid input";break;case X.custom:_="Invalid input";break;case X.invalid_intersection_types:_="Intersection results could not be merged";break;case X.not_multiple_of:_=`Number must be a multiple of ${$.multipleOf}`;break;case X.not_finite:_="Number must be finite";break;default:_=q.defaultError,R.assertNever($)}return{message:_}},g=u$;var F$=g;function p$($){F$=$}function p(){return F$}var X$=($)=>{let{data:q,path:_,errorMaps:G,issueData:W}=$,J=[..._,...W.path||[]],H={...W,path:J};if(W.message!==void 0)return{...W,path:J,message:W.message};let Y="",M=G.filter((S)=>!!S).slice().reverse();for(let S of M)Y=S(H,{data:q,defaultError:Y}).message;return{...W,path:J,message:Y}},i$=[];function B($,q){let _=p(),G=X$({issueData:q,data:$.data,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,_,_===g?void 0:g].filter((W)=>!!W)});$.common.issues.push(G)}class V{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray($,q){let _=[];for(let G of q){if(G.status==="aborted")return z;if(G.status==="dirty")$.dirty();_.push(G.value)}return{status:$.value,value:_}}static async mergeObjectAsync($,q){let _=[];for(let G of q){let W=await G.key,J=await G.value;_.push({key:W,value:J})}return V.mergeObjectSync($,_)}static mergeObjectSync($,q){let _={};for(let G of q){let{key:W,value:J}=G;if(W.status==="aborted")return z;if(J.status==="aborted")return z;if(W.status==="dirty")$.dirty();if(J.status==="dirty")$.dirty();if(W.value!=="__proto__"&&(typeof J.value<"u"||G.alwaysSet))_[W.value]=J.value}return{status:$.value,value:_}}}var z=Object.freeze({status:"aborted"}),y=($)=>({status:"dirty",value:$}),U=($)=>({status:"valid",value:$}),j$=($)=>$.status==="aborted",b$=($)=>$.status==="dirty",h=($)=>$.status==="valid",i=($)=>typeof Promise<"u"&&$ instanceof Promise;var w;(function($){$.errToObj=(q)=>typeof q==="string"?{message:q}:q||{},$.toString=(q)=>typeof q==="string"?q:q?.message})(w||(w={}));class f{constructor($,q,_,G){this._cachedPath=[],this.parent=$,this.data=q,this._path=_,this._key=G}get path(){if(!this._cachedPath.length)if(Array.isArray(this._key))this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var K$=($,q)=>{if(h(q))return{success:!0,data:q.value};else{if(!$.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let _=new A($.common.issues);return this._error=_,this._error}}}};function b($){if(!$)return{};let{errorMap:q,invalid_type_error:_,required_error:G,description:W}=$;if(q&&(_||G))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(q)return{errorMap:q,description:W};return{errorMap:(H,Y)=>{let{message:M}=$;if(H.code==="invalid_enum_value")return{message:M??Y.defaultError};if(typeof Y.data>"u")return{message:M??G??Y.defaultError};if(H.code!=="invalid_type")return{message:Y.defaultError};return{message:M??_??Y.defaultError}},description:W}}class O{get description(){return this._def.description}_getType($){return K($.data)}_getOrReturnCtx($,q){return q||{common:$.parent.common,data:$.data,parsedType:K($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}_processInputParams($){return{status:new V,ctx:{common:$.parent.common,data:$.data,parsedType:K($.data),schemaErrorMap:this._def.errorMap,path:$.path,parent:$.parent}}}_parseSync($){let q=this._parse($);if(i(q))throw Error("Synchronous parse encountered promise.");return q}_parseAsync($){let q=this._parse($);return Promise.resolve(q)}parse($,q){let _=this.safeParse($,q);if(_.success)return _.data;throw _.error}safeParse($,q){let _={common:{issues:[],async:q?.async??!1,contextualErrorMap:q?.errorMap},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:K($)},G=this._parseSync({data:$,path:_.path,parent:_});return K$(_,G)}"~validate"($){let q={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:K($)};if(!this["~standard"].async)try{let _=this._parseSync({data:$,path:[],parent:q});return h(_)?{value:_.value}:{issues:q.common.issues}}catch(_){if(_?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;q.common={issues:[],async:!0}}return this._parseAsync({data:$,path:[],parent:q}).then((_)=>h(_)?{value:_.value}:{issues:q.common.issues})}async parseAsync($,q){let _=await this.safeParseAsync($,q);if(_.success)return _.data;throw _.error}async safeParseAsync($,q){let _={common:{issues:[],contextualErrorMap:q?.errorMap,async:!0},path:q?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:$,parsedType:K($)},G=this._parse({data:$,path:_.path,parent:_}),W=await(i(G)?G:Promise.resolve(G));return K$(_,W)}refine($,q){let _=(G)=>{if(typeof q==="string"||typeof q>"u")return{message:q};else if(typeof q==="function")return q(G);else return q};return this._refinement((G,W)=>{let J=$(G),H=()=>W.addIssue({code:X.custom,..._(G)});if(typeof Promise<"u"&&J instanceof Promise)return J.then((Y)=>{if(!Y)return H(),!1;else return!0});if(!J)return H(),!1;else return!0})}refinement($,q){return this._refinement((_,G)=>{if(!$(_))return G.addIssue(typeof q==="function"?q(_,G):q),!1;else return!0})}_refinement($){return new F({schema:this,typeName:j.ZodEffects,effect:{type:"refinement",refinement:$}})}superRefine($){return this._refinement($)}constructor($){this.spa=this.safeParseAsync,this._def=$,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:(q)=>this["~validate"](q)}}optional(){return D.create(this,this._def)}nullable(){return P.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return u.create(this,this._def)}or($){return t.create([this,$],this._def)}and($){return e.create(this,$,this._def)}transform($){return new F({...b(this._def),schema:this,typeName:j.ZodEffects,effect:{type:"transform",transform:$}})}default($){let q=typeof $==="function"?$:()=>$;return new W$({...b(this._def),innerType:this,defaultValue:q,typeName:j.ZodDefault})}brand(){return new O$({typeName:j.ZodBranded,type:this,...b(this._def)})}catch($){let q=typeof $==="function"?$:()=>$;return new G$({...b(this._def),innerType:this,catchValue:q,typeName:j.ZodCatch})}describe($){return new this.constructor({...this._def,description:$})}pipe($){return z$.create(this,$)}readonly(){return H$.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var r$=/^c[^\s-]{8,}$/i,o$=/^[0-9a-z]+$/,d$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,a$=/^[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,s$=/^[a-z0-9_-]{21}$/i,t$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,e$=/^[-+]?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)?)??$/,$q=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",U$,_q=/^(?:(?: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])$/,Wq=/^(?:(?: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])$/,Gq=/^(([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]))$/,Hq=/^(([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])$/,Jq=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xq=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,k$="((\\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])))",Qq=new RegExp(`^${k$}$`);function g$($){let q="[0-5]\\d";if($.precision)q=`${q}\\.\\d{${$.precision}}`;else if($.precision==null)q=`${q}(\\.\\d+)?`;let _=$.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${q})${_}`}function Yq($){return new RegExp(`^${g$($)}$`)}function I$($){let q=`${k$}T${g$($)}`,_=[];if(_.push($.local?"Z?":"Z"),$.offset)_.push("([+-]\\d{2}:?\\d{2})");return q=`${q}(${_.join("|")})`,new RegExp(`^${q}$`)}function Mq($,q){if((q==="v4"||!q)&&_q.test($))return!0;if((q==="v6"||!q)&&Gq.test($))return!0;return!1}function Bq($,q){if(!t$.test($))return!1;try{let[_]=$.split(".");if(!_)return!1;let G=_.replace(/-/g,"+").replace(/_/g,"/").padEnd(_.length+(4-_.length%4)%4,"="),W=JSON.parse(atob(G));if(typeof W!=="object"||W===null)return!1;if("typ"in W&&W?.typ!=="JWT")return!1;if(!W.alg)return!1;if(q&&W.alg!==q)return!1;return!0}catch{return!1}}function wq($,q){if((q==="v4"||!q)&&Wq.test($))return!0;if((q==="v6"||!q)&&Hq.test($))return!0;return!1}class L extends O{_parse($){if(this._def.coerce)$.data=String($.data);if(this._getType($)!==Q.string){let W=this._getOrReturnCtx($);return B(W,{code:X.invalid_type,expected:Q.string,received:W.parsedType}),z}let _=new V,G=void 0;for(let W of this._def.checks)if(W.kind==="min"){if($.data.length<W.value)G=this._getOrReturnCtx($,G),B(G,{code:X.too_small,minimum:W.value,type:"string",inclusive:!0,exact:!1,message:W.message}),_.dirty()}else if(W.kind==="max"){if($.data.length>W.value)G=this._getOrReturnCtx($,G),B(G,{code:X.too_big,maximum:W.value,type:"string",inclusive:!0,exact:!1,message:W.message}),_.dirty()}else if(W.kind==="length"){let J=$.data.length>W.value,H=$.data.length<W.value;if(J||H){if(G=this._getOrReturnCtx($,G),J)B(G,{code:X.too_big,maximum:W.value,type:"string",inclusive:!0,exact:!0,message:W.message});else if(H)B(G,{code:X.too_small,minimum:W.value,type:"string",inclusive:!0,exact:!0,message:W.message});_.dirty()}}else if(W.kind==="email"){if(!$q.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"email",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="emoji"){if(!U$)U$=new RegExp(qq,"u");if(!U$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"emoji",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="uuid"){if(!a$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"uuid",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="nanoid"){if(!s$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"nanoid",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="cuid"){if(!r$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"cuid",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="cuid2"){if(!o$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"cuid2",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="ulid"){if(!d$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"ulid",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="url")try{new URL($.data)}catch{G=this._getOrReturnCtx($,G),B(G,{validation:"url",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="regex"){if(W.regex.lastIndex=0,!W.regex.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"regex",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="trim")$.data=$.data.trim();else if(W.kind==="includes"){if(!$.data.includes(W.value,W.position))G=this._getOrReturnCtx($,G),B(G,{code:X.invalid_string,validation:{includes:W.value,position:W.position},message:W.message}),_.dirty()}else if(W.kind==="toLowerCase")$.data=$.data.toLowerCase();else if(W.kind==="toUpperCase")$.data=$.data.toUpperCase();else if(W.kind==="startsWith"){if(!$.data.startsWith(W.value))G=this._getOrReturnCtx($,G),B(G,{code:X.invalid_string,validation:{startsWith:W.value},message:W.message}),_.dirty()}else if(W.kind==="endsWith"){if(!$.data.endsWith(W.value))G=this._getOrReturnCtx($,G),B(G,{code:X.invalid_string,validation:{endsWith:W.value},message:W.message}),_.dirty()}else if(W.kind==="datetime"){if(!I$(W).test($.data))G=this._getOrReturnCtx($,G),B(G,{code:X.invalid_string,validation:"datetime",message:W.message}),_.dirty()}else if(W.kind==="date"){if(!Qq.test($.data))G=this._getOrReturnCtx($,G),B(G,{code:X.invalid_string,validation:"date",message:W.message}),_.dirty()}else if(W.kind==="time"){if(!Yq(W).test($.data))G=this._getOrReturnCtx($,G),B(G,{code:X.invalid_string,validation:"time",message:W.message}),_.dirty()}else if(W.kind==="duration"){if(!e$.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"duration",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="ip"){if(!Mq($.data,W.version))G=this._getOrReturnCtx($,G),B(G,{validation:"ip",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="jwt"){if(!Bq($.data,W.alg))G=this._getOrReturnCtx($,G),B(G,{validation:"jwt",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="cidr"){if(!wq($.data,W.version))G=this._getOrReturnCtx($,G),B(G,{validation:"cidr",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="base64"){if(!Jq.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"base64",code:X.invalid_string,message:W.message}),_.dirty()}else if(W.kind==="base64url"){if(!Xq.test($.data))G=this._getOrReturnCtx($,G),B(G,{validation:"base64url",code:X.invalid_string,message:W.message}),_.dirty()}else R.assertNever(W);return{status:_.value,value:$.data}}_regex($,q,_){return this.refinement((G)=>$.test(G),{validation:q,code:X.invalid_string,...w.errToObj(_)})}_addCheck($){return new L({...this._def,checks:[...this._def.checks,$]})}email($){return this._addCheck({kind:"email",...w.errToObj($)})}url($){return this._addCheck({kind:"url",...w.errToObj($)})}emoji($){return this._addCheck({kind:"emoji",...w.errToObj($)})}uuid($){return this._addCheck({kind:"uuid",...w.errToObj($)})}nanoid($){return this._addCheck({kind:"nanoid",...w.errToObj($)})}cuid($){return this._addCheck({kind:"cuid",...w.errToObj($)})}cuid2($){return this._addCheck({kind:"cuid2",...w.errToObj($)})}ulid($){return this._addCheck({kind:"ulid",...w.errToObj($)})}base64($){return this._addCheck({kind:"base64",...w.errToObj($)})}base64url($){return this._addCheck({kind:"base64url",...w.errToObj($)})}jwt($){return this._addCheck({kind:"jwt",...w.errToObj($)})}ip($){return this._addCheck({kind:"ip",...w.errToObj($)})}cidr($){return this._addCheck({kind:"cidr",...w.errToObj($)})}datetime($){if(typeof $==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:$});return this._addCheck({kind:"datetime",precision:typeof $?.precision>"u"?null:$?.precision,offset:$?.offset??!1,local:$?.local??!1,...w.errToObj($?.message)})}date($){return this._addCheck({kind:"date",message:$})}time($){if(typeof $==="string")return this._addCheck({kind:"time",precision:null,message:$});return this._addCheck({kind:"time",precision:typeof $?.precision>"u"?null:$?.precision,...w.errToObj($?.message)})}duration($){return this._addCheck({kind:"duration",...w.errToObj($)})}regex($,q){return this._addCheck({kind:"regex",regex:$,...w.errToObj(q)})}includes($,q){return this._addCheck({kind:"includes",value:$,position:q?.position,...w.errToObj(q?.message)})}startsWith($,q){return this._addCheck({kind:"startsWith",value:$,...w.errToObj(q)})}endsWith($,q){return this._addCheck({kind:"endsWith",value:$,...w.errToObj(q)})}min($,q){return this._addCheck({kind:"min",value:$,...w.errToObj(q)})}max($,q){return this._addCheck({kind:"max",value:$,...w.errToObj(q)})}length($,q){return this._addCheck({kind:"length",value:$,...w.errToObj(q)})}nonempty($){return this.min(1,w.errToObj($))}trim(){return new L({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new L({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(($)=>$.kind==="datetime")}get isDate(){return!!this._def.checks.find(($)=>$.kind==="date")}get isTime(){return!!this._def.checks.find(($)=>$.kind==="time")}get isDuration(){return!!this._def.checks.find(($)=>$.kind==="duration")}get isEmail(){return!!this._def.checks.find(($)=>$.kind==="email")}get isURL(){return!!this._def.checks.find(($)=>$.kind==="url")}get isEmoji(){return!!this._def.checks.find(($)=>$.kind==="emoji")}get isUUID(){return!!this._def.checks.find(($)=>$.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(($)=>$.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(($)=>$.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(($)=>$.kind==="cuid2")}get isULID(){return!!this._def.checks.find(($)=>$.kind==="ulid")}get isIP(){return!!this._def.checks.find(($)=>$.kind==="ip")}get isCIDR(){return!!this._def.checks.find(($)=>$.kind==="cidr")}get isBase64(){return!!this._def.checks.find(($)=>$.kind==="base64")}get isBase64url(){return!!this._def.checks.find(($)=>$.kind==="base64url")}get minLength(){let $=null;for(let q of this._def.checks)if(q.kind==="min"){if($===null||q.value>$)$=q.value}return $}get maxLength(){let $=null;for(let q of this._def.checks)if(q.kind==="max"){if($===null||q.value<$)$=q.value}return $}}L.create=($)=>{return new L({checks:[],typeName:j.ZodString,coerce:$?.coerce??!1,...b($)})};function zq($,q){let _=($.toString().split(".")[1]||"").length,G=(q.toString().split(".")[1]||"").length,W=_>G?_:G,J=Number.parseInt($.toFixed(W).replace(".","")),H=Number.parseInt(q.toFixed(W).replace(".",""));return J%H/10**W}class l extends O{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse($){if(this._def.coerce)$.data=Number($.data);if(this._getType($)!==Q.number){let W=this._getOrReturnCtx($);return B(W,{code:X.invalid_type,expected:Q.number,received:W.parsedType}),z}let _=void 0,G=new V;for(let W of this._def.checks)if(W.kind==="int"){if(!R.isInteger($.data))_=this._getOrReturnCtx($,_),B(_,{code:X.invalid_type,expected:"integer",received:"float",message:W.message}),G.dirty()}else if(W.kind==="min"){if(W.inclusive?$.data<W.value:$.data<=W.value)_=this._getOrReturnCtx($,_),B(_,{code:X.too_small,minimum:W.value,type:"number",inclusive:W.inclusive,exact:!1,message:W.message}),G.dirty()}else if(W.kind==="max"){if(W.inclusive?$.data>W.value:$.data>=W.value)_=this._getOrReturnCtx($,_),B(_,{code:X.too_big,maximum:W.value,type:"number",inclusive:W.inclusive,exact:!1,message:W.message}),G.dirty()}else if(W.kind==="multipleOf"){if(zq($.data,W.value)!==0)_=this._getOrReturnCtx($,_),B(_,{code:X.not_multiple_of,multipleOf:W.value,message:W.message}),G.dirty()}else if(W.kind==="finite"){if(!Number.isFinite($.data))_=this._getOrReturnCtx($,_),B(_,{code:X.not_finite,message:W.message}),G.dirty()}else R.assertNever(W);return{status:G.value,value:$.data}}gte($,q){return this.setLimit("min",$,!0,w.toString(q))}gt($,q){return this.setLimit("min",$,!1,w.toString(q))}lte($,q){return this.setLimit("max",$,!0,w.toString(q))}lt($,q){return this.setLimit("max",$,!1,w.toString(q))}setLimit($,q,_,G){return new l({...this._def,checks:[...this._def.checks,{kind:$,value:q,inclusive:_,message:w.toString(G)}]})}_addCheck($){return new l({...this._def,checks:[...this._def.checks,$]})}int($){return this._addCheck({kind:"int",message:w.toString($)})}positive($){return this._addCheck({kind:"min",value:0,inclusive:!1,message:w.toString($)})}negative($){return this._addCheck({kind:"max",value:0,inclusive:!1,message:w.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:0,inclusive:!0,message:w.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:0,inclusive:!0,message:w.toString($)})}multipleOf($,q){return this._addCheck({kind:"multipleOf",value:$,message:w.toString(q)})}finite($){return this._addCheck({kind:"finite",message:w.toString($)})}safe($){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:w.toString($)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:w.toString($)})}get minValue(){let $=null;for(let q of this._def.checks)if(q.kind==="min"){if($===null||q.value>$)$=q.value}return $}get maxValue(){let $=null;for(let q of this._def.checks)if(q.kind==="max"){if($===null||q.value<$)$=q.value}return $}get isInt(){return!!this._def.checks.find(($)=>$.kind==="int"||$.kind==="multipleOf"&&R.isInteger($.value))}get isFinite(){let $=null,q=null;for(let _ of this._def.checks)if(_.kind==="finite"||_.kind==="int"||_.kind==="multipleOf")return!0;else if(_.kind==="min"){if(q===null||_.value>q)q=_.value}else if(_.kind==="max"){if($===null||_.value<$)$=_.value}return Number.isFinite(q)&&Number.isFinite($)}}l.create=($)=>{return new l({checks:[],typeName:j.ZodNumber,coerce:$?.coerce||!1,...b($)})};class x extends O{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse($){if(this._def.coerce)try{$.data=BigInt($.data)}catch{return this._getInvalidInput($)}if(this._getType($)!==Q.bigint)return this._getInvalidInput($);let _=void 0,G=new V;for(let W of this._def.checks)if(W.kind==="min"){if(W.inclusive?$.data<W.value:$.data<=W.value)_=this._getOrReturnCtx($,_),B(_,{code:X.too_small,type:"bigint",minimum:W.value,inclusive:W.inclusive,message:W.message}),G.dirty()}else if(W.kind==="max"){if(W.inclusive?$.data>W.value:$.data>=W.value)_=this._getOrReturnCtx($,_),B(_,{code:X.too_big,type:"bigint",maximum:W.value,inclusive:W.inclusive,message:W.message}),G.dirty()}else if(W.kind==="multipleOf"){if($.data%W.value!==BigInt(0))_=this._getOrReturnCtx($,_),B(_,{code:X.not_multiple_of,multipleOf:W.value,message:W.message}),G.dirty()}else R.assertNever(W);return{status:G.value,value:$.data}}_getInvalidInput($){let q=this._getOrReturnCtx($);return B(q,{code:X.invalid_type,expected:Q.bigint,received:q.parsedType}),z}gte($,q){return this.setLimit("min",$,!0,w.toString(q))}gt($,q){return this.setLimit("min",$,!1,w.toString(q))}lte($,q){return this.setLimit("max",$,!0,w.toString(q))}lt($,q){return this.setLimit("max",$,!1,w.toString(q))}setLimit($,q,_,G){return new x({...this._def,checks:[...this._def.checks,{kind:$,value:q,inclusive:_,message:w.toString(G)}]})}_addCheck($){return new x({...this._def,checks:[...this._def.checks,$]})}positive($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:w.toString($)})}negative($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:w.toString($)})}nonpositive($){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:w.toString($)})}nonnegative($){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:w.toString($)})}multipleOf($,q){return this._addCheck({kind:"multipleOf",value:$,message:w.toString(q)})}get minValue(){let $=null;for(let q of this._def.checks)if(q.kind==="min"){if($===null||q.value>$)$=q.value}return $}get maxValue(){let $=null;for(let q of this._def.checks)if(q.kind==="max"){if($===null||q.value<$)$=q.value}return $}}x.create=($)=>{return new x({checks:[],typeName:j.ZodBigInt,coerce:$?.coerce??!1,...b($)})};class d extends O{_parse($){if(this._def.coerce)$.data=Boolean($.data);if(this._getType($)!==Q.boolean){let _=this._getOrReturnCtx($);return B(_,{code:X.invalid_type,expected:Q.boolean,received:_.parsedType}),z}return U($.data)}}d.create=($)=>{return new d({typeName:j.ZodBoolean,coerce:$?.coerce||!1,...b($)})};class Z extends O{_parse($){if(this._def.coerce)$.data=new Date($.data);if(this._getType($)!==Q.date){let W=this._getOrReturnCtx($);return B(W,{code:X.invalid_type,expected:Q.date,received:W.parsedType}),z}if(Number.isNaN($.data.getTime())){let W=this._getOrReturnCtx($);return B(W,{code:X.invalid_date}),z}let _=new V,G=void 0;for(let W of this._def.checks)if(W.kind==="min"){if($.data.getTime()<W.value)G=this._getOrReturnCtx($,G),B(G,{code:X.too_small,message:W.message,inclusive:!0,exact:!1,minimum:W.value,type:"date"}),_.dirty()}else if(W.kind==="max"){if($.data.getTime()>W.value)G=this._getOrReturnCtx($,G),B(G,{code:X.too_big,message:W.message,inclusive:!0,exact:!1,maximum:W.value,type:"date"}),_.dirty()}else R.assertNever(W);return{status:_.value,value:new Date($.data.getTime())}}_addCheck($){return new Z({...this._def,checks:[...this._def.checks,$]})}min($,q){return this._addCheck({kind:"min",value:$.getTime(),message:w.toString(q)})}max($,q){return this._addCheck({kind:"max",value:$.getTime(),message:w.toString(q)})}get minDate(){let $=null;for(let q of this._def.checks)if(q.kind==="min"){if($===null||q.value>$)$=q.value}return $!=null?new Date($):null}get maxDate(){let $=null;for(let q of this._def.checks)if(q.kind==="max"){if($===null||q.value<$)$=q.value}return $!=null?new Date($):null}}Z.create=($)=>{return new Z({checks:[],coerce:$?.coerce||!1,typeName:j.ZodDate,...b($)})};class Q$ extends O{_parse($){if(this._getType($)!==Q.symbol){let _=this._getOrReturnCtx($);return B(_,{code:X.invalid_type,expected:Q.symbol,received:_.parsedType}),z}return U($.data)}}Q$.create=($)=>{return new Q$({typeName:j.ZodSymbol,...b($)})};class a extends O{_parse($){if(this._getType($)!==Q.undefined){let _=this._getOrReturnCtx($);return B(_,{code:X.invalid_type,expected:Q.undefined,received:_.parsedType}),z}return U($.data)}}a.create=($)=>{return new a({typeName:j.ZodUndefined,...b($)})};class s extends O{_parse($){if(this._getType($)!==Q.null){let _=this._getOrReturnCtx($);return B(_,{code:X.invalid_type,expected:Q.null,received:_.parsedType}),z}return U($.data)}}s.create=($)=>{return new s({typeName:j.ZodNull,...b($)})};class n extends O{constructor(){super(...arguments);this._any=!0}_parse($){return U($.data)}}n.create=($)=>{return new n({typeName:j.ZodAny,...b($)})};class T extends O{constructor(){super(...arguments);this._unknown=!0}_parse($){return U($.data)}}T.create=($)=>{return new T({typeName:j.ZodUnknown,...b($)})};class C extends O{_parse($){let q=this._getOrReturnCtx($);return B(q,{code:X.invalid_type,expected:Q.never,received:q.parsedType}),z}}C.create=($)=>{return new C({typeName:j.ZodNever,...b($)})};class Y$ extends O{_parse($){if(this._getType($)!==Q.undefined){let _=this._getOrReturnCtx($);return B(_,{code:X.invalid_type,expected:Q.void,received:_.parsedType}),z}return U($.data)}}Y$.create=($)=>{return new Y$({typeName:j.ZodVoid,...b($)})};class N extends O{_parse($){let{ctx:q,status:_}=this._processInputParams($),G=this._def;if(q.parsedType!==Q.array)return B(q,{code:X.invalid_type,expected:Q.array,received:q.parsedType}),z;if(G.exactLength!==null){let J=q.data.length>G.exactLength.value,H=q.data.length<G.exactLength.value;if(J||H)B(q,{code:J?X.too_big:X.too_small,minimum:H?G.exactLength.value:void 0,maximum:J?G.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:G.exactLength.message}),_.dirty()}if(G.minLength!==null){if(q.data.length<G.minLength.value)B(q,{code:X.too_small,minimum:G.minLength.value,type:"array",inclusive:!0,exact:!1,message:G.minLength.message}),_.dirty()}if(G.maxLength!==null){if(q.data.length>G.maxLength.value)B(q,{code:X.too_big,maximum:G.maxLength.value,type:"array",inclusive:!0,exact:!1,message:G.maxLength.message}),_.dirty()}if(q.common.async)return Promise.all([...q.data].map((J,H)=>{return G.type._parseAsync(new f(q,J,q.path,H))})).then((J)=>{return V.mergeArray(_,J)});let W=[...q.data].map((J,H)=>{return G.type._parseSync(new f(q,J,q.path,H))});return V.mergeArray(_,W)}get element(){return this._def.type}min($,q){return new N({...this._def,minLength:{value:$,message:w.toString(q)}})}max($,q){return new N({...this._def,maxLength:{value:$,message:w.toString(q)}})}length($,q){return new N({...this._def,exactLength:{value:$,message:w.toString(q)}})}nonempty($){return this.min(1,$)}}N.create=($,q)=>{return new N({type:$,minLength:null,maxLength:null,exactLength:null,typeName:j.ZodArray,...b(q)})};function r($){if($ instanceof E){let q={};for(let _ in $.shape){let G=$.shape[_];q[_]=D.create(r(G))}return new E({...$._def,shape:()=>q})}else if($ instanceof N)return new N({...$._def,type:r($.element)});else if($ instanceof D)return D.create(r($.unwrap()));else if($ instanceof P)return P.create(r($.unwrap()));else if($ instanceof k)return k.create($.items.map((q)=>r(q)));else return $}class E extends O{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let $=this._def.shape(),q=R.objectKeys($);return this._cached={shape:$,keys:q},this._cached}_parse($){if(this._getType($)!==Q.object){let M=this._getOrReturnCtx($);return B(M,{code:X.invalid_type,expected:Q.object,received:M.parsedType}),z}let{status:_,ctx:G}=this._processInputParams($),{shape:W,keys:J}=this._getCached(),H=[];if(!(this._def.catchall instanceof C&&this._def.unknownKeys==="strip")){for(let M in G.data)if(!J.includes(M))H.push(M)}let Y=[];for(let M of J){let S=W[M],v=G.data[M];Y.push({key:{status:"valid",value:M},value:S._parse(new f(G,v,G.path,M)),alwaysSet:M in G.data})}if(this._def.catchall instanceof C){let M=this._def.unknownKeys;if(M==="passthrough")for(let S of H)Y.push({key:{status:"valid",value:S},value:{status:"valid",value:G.data[S]}});else if(M==="strict"){if(H.length>0)B(G,{code:X.unrecognized_keys,keys:H}),_.dirty()}else if(M==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let M=this._def.catchall;for(let S of H){let v=G.data[S];Y.push({key:{status:"valid",value:S},value:M._parse(new f(G,v,G.path,S)),alwaysSet:S in G.data})}}if(G.common.async)return Promise.resolve().then(async()=>{let M=[];for(let S of Y){let v=await S.key,v$=await S.value;M.push({key:v,value:v$,alwaysSet:S.alwaysSet})}return M}).then((M)=>{return V.mergeObjectSync(_,M)});else return V.mergeObjectSync(_,Y)}get shape(){return this._def.shape()}strict($){return w.errToObj,new E({...this._def,unknownKeys:"strict",...$!==void 0?{errorMap:(q,_)=>{let G=this._def.errorMap?.(q,_).message??_.defaultError;if(q.code==="unrecognized_keys")return{message:w.errToObj($).message??G};return{message:G}}}:{}})}strip(){return new E({...this._def,unknownKeys:"strip"})}passthrough(){return new E({...this._def,unknownKeys:"passthrough"})}extend($){return new E({...this._def,shape:()=>({...this._def.shape(),...$})})}merge($){return new E({unknownKeys:$._def.unknownKeys,catchall:$._def.catchall,shape:()=>({...this._def.shape(),...$._def.shape()}),typeName:j.ZodObject})}setKey($,q){return this.augment({[$]:q})}catchall($){return new E({...this._def,catchall:$})}pick($){let q={};for(let _ of R.objectKeys($))if($[_]&&this.shape[_])q[_]=this.shape[_];return new E({...this._def,shape:()=>q})}omit($){let q={};for(let _ of R.objectKeys(this.shape))if(!$[_])q[_]=this.shape[_];return new E({...this._def,shape:()=>q})}deepPartial(){return r(this)}partial($){let q={};for(let _ of R.objectKeys(this.shape)){let G=this.shape[_];if($&&!$[_])q[_]=G;else q[_]=G.optional()}return new E({...this._def,shape:()=>q})}required($){let q={};for(let _ of R.objectKeys(this.shape))if($&&!$[_])q[_]=this.shape[_];else{let W=this.shape[_];while(W instanceof D)W=W._def.innerType;q[_]=W}return new E({...this._def,shape:()=>q})}keyof(){return P$(R.objectKeys(this.shape))}}E.create=($,q)=>{return new E({shape:()=>$,unknownKeys:"strip",catchall:C.create(),typeName:j.ZodObject,...b(q)})};E.strictCreate=($,q)=>{return new E({shape:()=>$,unknownKeys:"strict",catchall:C.create(),typeName:j.ZodObject,...b(q)})};E.lazycreate=($,q)=>{return new E({shape:$,unknownKeys:"strip",catchall:C.create(),typeName:j.ZodObject,...b(q)})};class t extends O{_parse($){let{ctx:q}=this._processInputParams($),_=this._def.options;function G(W){for(let H of W)if(H.result.status==="valid")return H.result;for(let H of W)if(H.result.status==="dirty")return q.common.issues.push(...H.ctx.common.issues),H.result;let J=W.map((H)=>new A(H.ctx.common.issues));return B(q,{code:X.invalid_union,unionErrors:J}),z}if(q.common.async)return Promise.all(_.map(async(W)=>{let J={...q,common:{...q.common,issues:[]},parent:null};return{result:await W._parseAsync({data:q.data,path:q.path,parent:J}),ctx:J}})).then(G);else{let W=void 0,J=[];for(let Y of _){let M={...q,common:{...q.common,issues:[]},parent:null},S=Y._parseSync({data:q.data,path:q.path,parent:M});if(S.status==="valid")return S;else if(S.status==="dirty"&&!W)W={result:S,ctx:M};if(M.common.issues.length)J.push(M.common.issues)}if(W)return q.common.issues.push(...W.ctx.common.issues),W.result;let H=J.map((Y)=>new A(Y));return B(q,{code:X.invalid_union,unionErrors:H}),z}}get options(){return this._def.options}}t.create=($,q)=>{return new t({options:$,typeName:j.ZodUnion,...b(q)})};var I=($)=>{if($ instanceof $$)return I($.schema);else if($ instanceof F)return I($.innerType());else if($ instanceof q$)return[$.value];else if($ instanceof m)return $.options;else if($ instanceof _$)return R.objectValues($.enum);else if($ instanceof W$)return I($._def.innerType);else if($ instanceof a)return[void 0];else if($ instanceof s)return[null];else if($ instanceof D)return[void 0,...I($.unwrap())];else if($ instanceof P)return[null,...I($.unwrap())];else if($ instanceof O$)return I($.unwrap());else if($ instanceof H$)return I($.unwrap());else if($ instanceof G$)return I($._def.innerType);else return[]};class S$ extends O{_parse($){let{ctx:q}=this._processInputParams($);if(q.parsedType!==Q.object)return B(q,{code:X.invalid_type,expected:Q.object,received:q.parsedType}),z;let _=this.discriminator,G=q.data[_],W=this.optionsMap.get(G);if(!W)return B(q,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[_]}),z;if(q.common.async)return W._parseAsync({data:q.data,path:q.path,parent:q});else return W._parseSync({data:q.data,path:q.path,parent:q})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create($,q,_){let G=new Map;for(let W of q){let J=I(W.shape[$]);if(!J.length)throw Error(`A discriminator value for key \`${$}\` could not be extracted from all schema options`);for(let H of J){if(G.has(H))throw Error(`Discriminator property ${String($)} has duplicate value ${String(H)}`);G.set(H,W)}}return new S$({typeName:j.ZodDiscriminatedUnion,discriminator:$,options:q,optionsMap:G,...b(_)})}}function A$($,q){let _=K($),G=K(q);if($===q)return{valid:!0,data:$};else if(_===Q.object&&G===Q.object){let W=R.objectKeys(q),J=R.objectKeys($).filter((Y)=>W.indexOf(Y)!==-1),H={...$,...q};for(let Y of J){let M=A$($[Y],q[Y]);if(!M.valid)return{valid:!1};H[Y]=M.data}return{valid:!0,data:H}}else if(_===Q.array&&G===Q.array){if($.length!==q.length)return{valid:!1};let W=[];for(let J=0;J<$.length;J++){let H=$[J],Y=q[J],M=A$(H,Y);if(!M.valid)return{valid:!1};W.push(M.data)}return{valid:!0,data:W}}else if(_===Q.date&&G===Q.date&&+$===+q)return{valid:!0,data:$};else return{valid:!1}}class e extends O{_parse($){let{status:q,ctx:_}=this._processInputParams($),G=(W,J)=>{if(j$(W)||j$(J))return z;let H=A$(W.value,J.value);if(!H.valid)return B(_,{code:X.invalid_intersection_types}),z;if(b$(W)||b$(J))q.dirty();return{status:q.value,value:H.data}};if(_.common.async)return Promise.all([this._def.left._parseAsync({data:_.data,path:_.path,parent:_}),this._def.right._parseAsync({data:_.data,path:_.path,parent:_})]).then(([W,J])=>G(W,J));else return G(this._def.left._parseSync({data:_.data,path:_.path,parent:_}),this._def.right._parseSync({data:_.data,path:_.path,parent:_}))}}e.create=($,q,_)=>{return new e({left:$,right:q,typeName:j.ZodIntersection,...b(_)})};class k extends O{_parse($){let{status:q,ctx:_}=this._processInputParams($);if(_.parsedType!==Q.array)return B(_,{code:X.invalid_type,expected:Q.array,received:_.parsedType}),z;if(_.data.length<this._def.items.length)return B(_,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),z;if(!this._def.rest&&_.data.length>this._def.items.length)B(_,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),q.dirty();let W=[..._.data].map((J,H)=>{let Y=this._def.items[H]||this._def.rest;if(!Y)return null;return Y._parse(new f(_,J,_.path,H))}).filter((J)=>!!J);if(_.common.async)return Promise.all(W).then((J)=>{return V.mergeArray(q,J)});else return V.mergeArray(q,W)}get items(){return this._def.items}rest($){return new k({...this._def,rest:$})}}k.create=($,q)=>{if(!Array.isArray($))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new k({items:$,typeName:j.ZodTuple,rest:null,...b(q)})};class M$ extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:q,ctx:_}=this._processInputParams($);if(_.parsedType!==Q.object)return B(_,{code:X.invalid_type,expected:Q.object,received:_.parsedType}),z;let G=[],W=this._def.keyType,J=this._def.valueType;for(let H in _.data)G.push({key:W._parse(new f(_,H,_.path,H)),value:J._parse(new f(_,_.data[H],_.path,H)),alwaysSet:H in _.data});if(_.common.async)return V.mergeObjectAsync(q,G);else return V.mergeObjectSync(q,G)}get element(){return this._def.valueType}static create($,q,_){if(q instanceof O)return new M$({keyType:$,valueType:q,typeName:j.ZodRecord,...b(_)});return new M$({keyType:L.create(),valueType:$,typeName:j.ZodRecord,...b(q)})}}class B$ extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse($){let{status:q,ctx:_}=this._processInputParams($);if(_.parsedType!==Q.map)return B(_,{code:X.invalid_type,expected:Q.map,received:_.parsedType}),z;let G=this._def.keyType,W=this._def.valueType,J=[..._.data.entries()].map(([H,Y],M)=>{return{key:G._parse(new f(_,H,_.path,[M,"key"])),value:W._parse(new f(_,Y,_.path,[M,"value"]))}});if(_.common.async){let H=new Map;return Promise.resolve().then(async()=>{for(let Y of J){let M=await Y.key,S=await Y.value;if(M.status==="aborted"||S.status==="aborted")return z;if(M.status==="dirty"||S.status==="dirty")q.dirty();H.set(M.value,S.value)}return{status:q.value,value:H}})}else{let H=new Map;for(let Y of J){let{key:M,value:S}=Y;if(M.status==="aborted"||S.status==="aborted")return z;if(M.status==="dirty"||S.status==="dirty")q.dirty();H.set(M.value,S.value)}return{status:q.value,value:H}}}}B$.create=($,q,_)=>{return new B$({valueType:q,keyType:$,typeName:j.ZodMap,...b(_)})};class c extends O{_parse($){let{status:q,ctx:_}=this._processInputParams($);if(_.parsedType!==Q.set)return B(_,{code:X.invalid_type,expected:Q.set,received:_.parsedType}),z;let G=this._def;if(G.minSize!==null){if(_.data.size<G.minSize.value)B(_,{code:X.too_small,minimum:G.minSize.value,type:"set",inclusive:!0,exact:!1,message:G.minSize.message}),q.dirty()}if(G.maxSize!==null){if(_.data.size>G.maxSize.value)B(_,{code:X.too_big,maximum:G.maxSize.value,type:"set",inclusive:!0,exact:!1,message:G.maxSize.message}),q.dirty()}let W=this._def.valueType;function J(Y){let M=new Set;for(let S of Y){if(S.status==="aborted")return z;if(S.status==="dirty")q.dirty();M.add(S.value)}return{status:q.value,value:M}}let H=[..._.data.values()].map((Y,M)=>W._parse(new f(_,Y,_.path,M)));if(_.common.async)return Promise.all(H).then((Y)=>J(Y));else return J(H)}min($,q){return new c({...this._def,minSize:{value:$,message:w.toString(q)}})}max($,q){return new c({...this._def,maxSize:{value:$,message:w.toString(q)}})}size($,q){return this.min($,q).max($,q)}nonempty($){return this.min(1,$)}}c.create=($,q)=>{return new c({valueType:$,minSize:null,maxSize:null,typeName:j.ZodSet,...b(q)})};class o extends O{constructor(){super(...arguments);this.validate=this.implement}_parse($){let{ctx:q}=this._processInputParams($);if(q.parsedType!==Q.function)return B(q,{code:X.invalid_type,expected:Q.function,received:q.parsedType}),z;function _(H,Y){return X$({data:H,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,p(),g].filter((M)=>!!M),issueData:{code:X.invalid_arguments,argumentsError:Y}})}function G(H,Y){return X$({data:H,path:q.path,errorMaps:[q.common.contextualErrorMap,q.schemaErrorMap,p(),g].filter((M)=>!!M),issueData:{code:X.invalid_return_type,returnTypeError:Y}})}let W={errorMap:q.common.contextualErrorMap},J=q.data;if(this._def.returns instanceof u){let H=this;return U(async function(...Y){let M=new A([]),S=await H._def.args.parseAsync(Y,W).catch((E$)=>{throw M.addIssue(_(Y,E$)),M}),v=await Reflect.apply(J,this,S);return await H._def.returns._def.type.parseAsync(v,W).catch((E$)=>{throw M.addIssue(G(v,E$)),M})})}else{let H=this;return U(function(...Y){let M=H._def.args.safeParse(Y,W);if(!M.success)throw new A([_(Y,M.error)]);let S=Reflect.apply(J,this,M.data),v=H._def.returns.safeParse(S,W);if(!v.success)throw new A([G(S,v.error)]);return v.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...$){return new o({...this._def,args:k.create($).rest(T.create())})}returns($){return new o({...this._def,returns:$})}implement($){return this.parse($)}strictImplement($){return this.parse($)}static create($,q,_){return new o({args:$?$:k.create([]).rest(T.create()),returns:q||T.create(),typeName:j.ZodFunction,...b(_)})}}class $$ extends O{get schema(){return this._def.getter()}_parse($){let{ctx:q}=this._processInputParams($);return this._def.getter()._parse({data:q.data,path:q.path,parent:q})}}$$.create=($,q)=>{return new $$({getter:$,typeName:j.ZodLazy,...b(q)})};class q$ extends O{_parse($){if($.data!==this._def.value){let q=this._getOrReturnCtx($);return B(q,{received:q.data,code:X.invalid_literal,expected:this._def.value}),z}return{status:"valid",value:$.data}}get value(){return this._def.value}}q$.create=($,q)=>{return new q$({value:$,typeName:j.ZodLiteral,...b(q)})};function P$($,q){return new m({values:$,typeName:j.ZodEnum,...b(q)})}class m extends O{_parse($){if(typeof $.data!=="string"){let q=this._getOrReturnCtx($),_=this._def.values;return B(q,{expected:R.joinValues(_),received:q.parsedType,code:X.invalid_type}),z}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has($.data)){let q=this._getOrReturnCtx($),_=this._def.values;return B(q,{received:q.data,code:X.invalid_enum_value,options:_}),z}return U($.data)}get options(){return this._def.values}get enum(){let $={};for(let q of this._def.values)$[q]=q;return $}get Values(){let $={};for(let q of this._def.values)$[q]=q;return $}get Enum(){let $={};for(let q of this._def.values)$[q]=q;return $}extract($,q=this._def){return m.create($,{...this._def,...q})}exclude($,q=this._def){return m.create(this.options.filter((_)=>!$.includes(_)),{...this._def,...q})}}m.create=P$;class _$ extends O{_parse($){let q=R.getValidEnumValues(this._def.values),_=this._getOrReturnCtx($);if(_.parsedType!==Q.string&&_.parsedType!==Q.number){let G=R.objectValues(q);return B(_,{expected:R.joinValues(G),received:_.parsedType,code:X.invalid_type}),z}if(!this._cache)this._cache=new Set(R.getValidEnumValues(this._def.values));if(!this._cache.has($.data)){let G=R.objectValues(q);return B(_,{received:_.data,code:X.invalid_enum_value,options:G}),z}return U($.data)}get enum(){return this._def.values}}_$.create=($,q)=>{return new _$({values:$,typeName:j.ZodNativeEnum,...b(q)})};class u extends O{unwrap(){return this._def.type}_parse($){let{ctx:q}=this._processInputParams($);if(q.parsedType!==Q.promise&&q.common.async===!1)return B(q,{code:X.invalid_type,expected:Q.promise,received:q.parsedType}),z;let _=q.parsedType===Q.promise?q.data:Promise.resolve(q.data);return U(_.then((G)=>{return this._def.type.parseAsync(G,{path:q.path,errorMap:q.common.contextualErrorMap})}))}}u.create=($,q)=>{return new u({type:$,typeName:j.ZodPromise,...b(q)})};class F extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===j.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse($){let{status:q,ctx:_}=this._processInputParams($),G=this._def.effect||null,W={addIssue:(J)=>{if(B(_,J),J.fatal)q.abort();else q.dirty()},get path(){return _.path}};if(W.addIssue=W.addIssue.bind(W),G.type==="preprocess"){let J=G.transform(_.data,W);if(_.common.async)return Promise.resolve(J).then(async(H)=>{if(q.value==="aborted")return z;let Y=await this._def.schema._parseAsync({data:H,path:_.path,parent:_});if(Y.status==="aborted")return z;if(Y.status==="dirty")return y(Y.value);if(q.value==="dirty")return y(Y.value);return Y});else{if(q.value==="aborted")return z;let H=this._def.schema._parseSync({data:J,path:_.path,parent:_});if(H.status==="aborted")return z;if(H.status==="dirty")return y(H.value);if(q.value==="dirty")return y(H.value);return H}}if(G.type==="refinement"){let J=(H)=>{let Y=G.refinement(H,W);if(_.common.async)return Promise.resolve(Y);if(Y instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return H};if(_.common.async===!1){let H=this._def.schema._parseSync({data:_.data,path:_.path,parent:_});if(H.status==="aborted")return z;if(H.status==="dirty")q.dirty();return J(H.value),{status:q.value,value:H.value}}else return this._def.schema._parseAsync({data:_.data,path:_.path,parent:_}).then((H)=>{if(H.status==="aborted")return z;if(H.status==="dirty")q.dirty();return J(H.value).then(()=>{return{status:q.value,value:H.value}})})}if(G.type==="transform")if(_.common.async===!1){let J=this._def.schema._parseSync({data:_.data,path:_.path,parent:_});if(!h(J))return z;let H=G.transform(J.value,W);if(H instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:q.value,value:H}}else return this._def.schema._parseAsync({data:_.data,path:_.path,parent:_}).then((J)=>{if(!h(J))return z;return Promise.resolve(G.transform(J.value,W)).then((H)=>({status:q.value,value:H}))});R.assertNever(G)}}F.create=($,q,_)=>{return new F({schema:$,typeName:j.ZodEffects,effect:q,...b(_)})};F.createWithPreprocess=($,q,_)=>{return new F({schema:q,effect:{type:"preprocess",transform:$},typeName:j.ZodEffects,...b(_)})};class D extends O{_parse($){if(this._getType($)===Q.undefined)return U(void 0);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}D.create=($,q)=>{return new D({innerType:$,typeName:j.ZodOptional,...b(q)})};class P extends O{_parse($){if(this._getType($)===Q.null)return U(null);return this._def.innerType._parse($)}unwrap(){return this._def.innerType}}P.create=($,q)=>{return new P({innerType:$,typeName:j.ZodNullable,...b(q)})};class W$ extends O{_parse($){let{ctx:q}=this._processInputParams($),_=q.data;if(q.parsedType===Q.undefined)_=this._def.defaultValue();return this._def.innerType._parse({data:_,path:q.path,parent:q})}removeDefault(){return this._def.innerType}}W$.create=($,q)=>{return new W$({innerType:$,typeName:j.ZodDefault,defaultValue:typeof q.default==="function"?q.default:()=>q.default,...b(q)})};class G$ extends O{_parse($){let{ctx:q}=this._processInputParams($),_={...q,common:{...q.common,issues:[]}},G=this._def.innerType._parse({data:_.data,path:_.path,parent:{..._}});if(i(G))return G.then((W)=>{return{status:"valid",value:W.status==="valid"?W.value:this._def.catchValue({get error(){return new A(_.common.issues)},input:_.data})}});else return{status:"valid",value:G.status==="valid"?G.value:this._def.catchValue({get error(){return new A(_.common.issues)},input:_.data})}}removeCatch(){return this._def.innerType}}G$.create=($,q)=>{return new G$({innerType:$,typeName:j.ZodCatch,catchValue:typeof q.catch==="function"?q.catch:()=>q.catch,...b(q)})};class w$ extends O{_parse($){if(this._getType($)!==Q.nan){let _=this._getOrReturnCtx($);return B(_,{code:X.invalid_type,expected:Q.nan,received:_.parsedType}),z}return{status:"valid",value:$.data}}}w$.create=($)=>{return new w$({typeName:j.ZodNaN,...b($)})};var jq=Symbol("zod_brand");class O$ extends O{_parse($){let{ctx:q}=this._processInputParams($),_=q.data;return this._def.type._parse({data:_,path:q.path,parent:q})}unwrap(){return this._def.type}}class z$ extends O{_parse($){let{status:q,ctx:_}=this._processInputParams($);if(_.common.async)return(async()=>{let W=await this._def.in._parseAsync({data:_.data,path:_.path,parent:_});if(W.status==="aborted")return z;if(W.status==="dirty")return q.dirty(),y(W.value);else return this._def.out._parseAsync({data:W.value,path:_.path,parent:_})})();else{let G=this._def.in._parseSync({data:_.data,path:_.path,parent:_});if(G.status==="aborted")return z;if(G.status==="dirty")return q.dirty(),{status:"dirty",value:G.value};else return this._def.out._parseSync({data:G.value,path:_.path,parent:_})}}static create($,q){return new z$({in:$,out:q,typeName:j.ZodPipeline})}}class H$ extends O{_parse($){let q=this._def.innerType._parse($),_=(G)=>{if(h(G))G.value=Object.freeze(G.value);return G};return i(q)?q.then((G)=>_(G)):_(q)}unwrap(){return this._def.innerType}}H$.create=($,q)=>{return new H$({innerType:$,typeName:j.ZodReadonly,...b(q)})};function C$($,q){let _=typeof $==="function"?$(q):typeof $==="string"?{message:$}:$;return typeof _==="string"?{message:_}:_}function h$($,q={},_){if($)return n.create().superRefine((G,W)=>{let J=$(G);if(J instanceof Promise)return J.then((H)=>{if(!H){let Y=C$(q,G),M=Y.fatal??_??!0;W.addIssue({code:"custom",...Y,fatal:M})}});if(!J){let H=C$(q,G),Y=H.fatal??_??!0;W.addIssue({code:"custom",...H,fatal:Y})}return});return n.create()}var bq={object:E.lazycreate},j;(function($){$.ZodString="ZodString",$.ZodNumber="ZodNumber",$.ZodNaN="ZodNaN",$.ZodBigInt="ZodBigInt",$.ZodBoolean="ZodBoolean",$.ZodDate="ZodDate",$.ZodSymbol="ZodSymbol",$.ZodUndefined="ZodUndefined",$.ZodNull="ZodNull",$.ZodAny="ZodAny",$.ZodUnknown="ZodUnknown",$.ZodNever="ZodNever",$.ZodVoid="ZodVoid",$.ZodArray="ZodArray",$.ZodObject="ZodObject",$.ZodUnion="ZodUnion",$.ZodDiscriminatedUnion="ZodDiscriminatedUnion",$.ZodIntersection="ZodIntersection",$.ZodTuple="ZodTuple",$.ZodRecord="ZodRecord",$.ZodMap="ZodMap",$.ZodSet="ZodSet",$.ZodFunction="ZodFunction",$.ZodLazy="ZodLazy",$.ZodLiteral="ZodLiteral",$.ZodEnum="ZodEnum",$.ZodEffects="ZodEffects",$.ZodNativeEnum="ZodNativeEnum",$.ZodOptional="ZodOptional",$.ZodNullable="ZodNullable",$.ZodDefault="ZodDefault",$.ZodCatch="ZodCatch",$.ZodPromise="ZodPromise",$.ZodBranded="ZodBranded",$.ZodPipeline="ZodPipeline",$.ZodReadonly="ZodReadonly"})(j||(j={}));var Sq=($,q={message:`Input not instance of ${$.name}`})=>h$((_)=>_ instanceof $,q),T$=L.create,l$=l.create,Oq=w$.create,Rq=x.create,x$=d.create,Eq=Z.create,Vq=Q$.create,Uq=a.create,Aq=s.create,vq=n.create,Lq=T.create,Nq=C.create,Dq=Y$.create,fq=N.create,Fq=E.create,Kq=E.strictCreate,Cq=t.create,kq=S$.create,gq=e.create,Iq=k.create,Pq=M$.create,hq=B$.create,Tq=c.create,lq=o.create,xq=$$.create,mq=q$.create,yq=m.create,Zq=_$.create,nq=u.create,cq=F.create,uq=D.create,pq=P.create,iq=F.createWithPreprocess,rq=z$.create,oq=()=>T$().optional(),dq=()=>l$().optional(),aq=()=>x$().optional(),sq={string:($)=>L.create({...$,coerce:!0}),number:($)=>l.create({...$,coerce:!0}),boolean:($)=>d.create({...$,coerce:!0}),bigint:($)=>x.create({...$,coerce:!0}),date:($)=>Z.create({...$,coerce:!0})};var tq=z;
2
+
3
+ //# debugId=7EC2971CCF255D8264756E2164756E21