@kne-components/react-file 0.1.19 → 0.1.20

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 (37) hide show
  1. package/build/asset-manifest.json +20 -18
  2. package/build/index.html +1 -1
  3. package/build/remoteEntry.js +1 -1
  4. package/build/remoteEntry.js.map +1 -1
  5. package/build/static/css/784.b114183d.chunk.css +2 -0
  6. package/build/static/css/784.b114183d.chunk.css.map +1 -0
  7. package/build/static/css/813.7aed43b5.chunk.css +12 -0
  8. package/build/static/css/813.7aed43b5.chunk.css.map +1 -0
  9. package/build/static/js/257.76b6ccae.chunk.js +2 -0
  10. package/build/static/js/257.76b6ccae.chunk.js.map +1 -0
  11. package/build/static/js/612.a18f4128.chunk.js +3 -0
  12. package/build/static/js/612.a18f4128.chunk.js.map +1 -0
  13. package/build/static/js/638.469f0c5d.chunk.js +2 -0
  14. package/build/static/js/638.469f0c5d.chunk.js.map +1 -0
  15. package/build/static/js/689.2eced7a1.chunk.js +3 -0
  16. package/build/static/js/689.2eced7a1.chunk.js.map +1 -0
  17. package/build/static/js/{784.b6420626.chunk.js → 784.84b6856b.chunk.js} +2 -2
  18. package/build/static/js/{784.b6420626.chunk.js.map → 784.84b6856b.chunk.js.map} +1 -1
  19. package/build/static/js/{813.7c0e617a.chunk.js → 813.6c0ec6ea.chunk.js} +2 -2
  20. package/build/static/js/{813.7c0e617a.chunk.js.map → 813.6c0ec6ea.chunk.js.map} +1 -1
  21. package/build/static/js/main.9e610865.js +2 -0
  22. package/build/static/js/main.9e610865.js.map +1 -0
  23. package/package.json +1 -1
  24. package/build/static/css/784.621cbd66.chunk.css +0 -2
  25. package/build/static/css/784.621cbd66.chunk.css.map +0 -1
  26. package/build/static/css/813.e7152dd0.chunk.css +0 -12
  27. package/build/static/css/813.e7152dd0.chunk.css.map +0 -1
  28. package/build/static/js/612.c5eb6bcc.chunk.js +0 -3
  29. package/build/static/js/612.c5eb6bcc.chunk.js.map +0 -1
  30. package/build/static/js/689.e9664d55.chunk.js +0 -3
  31. package/build/static/js/689.e9664d55.chunk.js.map +0 -1
  32. package/build/static/js/969.a046887b.chunk.js +0 -2
  33. package/build/static/js/969.a046887b.chunk.js.map +0 -1
  34. package/build/static/js/main.3e42586a.js +0 -2
  35. package/build/static/js/main.3e42586a.js.map +0 -1
  36. /package/build/static/js/{612.c5eb6bcc.chunk.js.LICENSE.txt → 612.a18f4128.chunk.js.LICENSE.txt} +0 -0
  37. /package/build/static/js/{689.e9664d55.chunk.js.LICENSE.txt → 689.2eced7a1.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_kne_components_react_file=self.webpackChunk_kne_components_react_file||[]).push([[379,969],{8969:(e,t,a)=>{a.r(t),a.d(t,{Consumer:()=>Ft,Global:()=>$t,GlobalSetting:()=>Wt,GlobalValue:()=>Jt,Preset:()=>Ht,Provider:()=>Mt,context:()=>Rt,createContext:()=>It,default:()=>Rt,useContext:()=>Dt,useGlobalContext:()=>Lt,useGlobalValue:()=>qt,usePreset:()=>zt});var n={};a.r(n),a.d(n,{BRAND:()=>Le,DIRTY:()=>x,EMPTY_PATH:()=>_,INVALID:()=>A,NEVER:()=>Et,OK:()=>w,ParseStatus:()=>k,Schema:()=>P,ZodAny:()=>ue,ZodArray:()=>fe,ZodBigInt:()=>se,ZodBoolean:()=>re,ZodBranded:()=>ze,ZodCatch:()=>Fe,ZodDate:()=>ie,ZodDefault:()=>Me,ZodDiscriminatedUnion:()=>_e,ZodEffects:()=>Pe,ZodEnum:()=>Se,ZodError:()=>p,ZodFirstPartyTypeKind:()=>We,ZodFunction:()=>Oe,ZodIntersection:()=>ke,ZodIssueCode:()=>l,ZodLazy:()=>Te,ZodLiteral:()=>Ce,ZodMap:()=>we,ZodNaN:()=>De,ZodNativeEnum:()=>Ne,ZodNever:()=>he,ZodNull:()=>ce,ZodNullable:()=>Re,ZodNumber:()=>ne,ZodObject:()=>ve,ZodOptional:()=>Ie,ZodParsedType:()=>c,ZodPipeline:()=>Ve,ZodPromise:()=>Ee,ZodReadonly:()=>Ke,ZodRecord:()=>xe,ZodSchema:()=>P,ZodSet:()=>Ze,ZodString:()=>te,ZodSymbol:()=>oe,ZodTransformer:()=>Pe,ZodTuple:()=>Ae,ZodType:()=>P,ZodUndefined:()=>de,ZodUnion:()=>ye,ZodUnknown:()=>le,ZodVoid:()=>pe,addIssueToContext:()=>b,any:()=>nt,array:()=>ot,bigint:()=>He,boolean:()=>Xe,coerce:()=>Nt,custom:()=>$e,date:()=>Qe,datetimeRegex:()=>X,defaultErrorMap:()=>f,discriminatedUnion:()=>lt,effect:()=>xt,enum:()=>bt,function:()=>yt,getErrorMap:()=>y,getParsedType:()=>u,instanceof:()=>qe,intersection:()=>ht,isAborted:()=>Z,isAsync:()=>C,isDirty:()=>O,isValid:()=>T,late:()=>Be,lazy:()=>gt,literal:()=>_t,makeIssue:()=>g,map:()=>mt,nan:()=>Ye,nativeEnum:()=>kt,never:()=>rt,null:()=>at,nullable:()=>Zt,number:()=>Je,object:()=>dt,objectUtil:()=>r,oboolean:()=>St,onumber:()=>jt,optional:()=>wt,ostring:()=>Ct,pipeline:()=>Tt,preprocess:()=>Ot,promise:()=>At,quotelessJson:()=>h,record:()=>ft,set:()=>vt,setErrorMap:()=>v,strictObject:()=>ct,string:()=>Ge,symbol:()=>et,transformer:()=>xt,tuple:()=>pt,undefined:()=>tt,union:()=>ut,unknown:()=>st,util:()=>s,void:()=>it});var s,r,i=a(94922),o=a.n(i),d=a(89379);!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!==typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"===typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"===typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"===typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map((e=>"string"===typeof e?"'".concat(e,"'"):e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"===typeof t?t.toString():t}(s||(s={})),function(e){e.mergeShapes=(e,t)=>(0,d.A)((0,d.A)({},e),t)}(r||(r={}));const c=s.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),u=e=>{switch(typeof e){case"undefined":return c.undefined;case"string":return c.string;case"number":return Number.isNaN(e)?c.nan:c.number;case"boolean":return c.boolean;case"function":return c.function;case"bigint":return c.bigint;case"symbol":return c.symbol;case"object":return Array.isArray(e)?c.array:null===e?c.null:e.then&&"function"===typeof e.then&&e.catch&&"function"===typeof e.catch?c.promise:"undefined"!==typeof Map&&e instanceof Map?c.map:"undefined"!==typeof Set&&e instanceof Set?c.set:"undefined"!==typeof Date&&e instanceof Date?c.date:c.object;default:return c.unknown}},l=s.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"]),h=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class p extends Error{get errors(){return this.issues}constructor(e){var t;super(),t=this,this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.issues=[...t.issues,...e]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}static assert(e){if(!(e instanceof p))throw new Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,s.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e.message;const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}p.create=e=>new p(e);const f=(e,t)=>{let a;switch(e.code){case l.invalid_type:a=e.received===c.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case l.invalid_literal:a="Invalid literal value, expected ".concat(JSON.stringify(e.expected,s.jsonStringifyReplacer));break;case l.unrecognized_keys:a="Unrecognized key(s) in object: ".concat(s.joinValues(e.keys,", "));break;case l.invalid_union:a="Invalid input";break;case l.invalid_union_discriminator:a="Invalid discriminator value. Expected ".concat(s.joinValues(e.options));break;case l.invalid_enum_value:a="Invalid enum value. Expected ".concat(s.joinValues(e.options),", received '").concat(e.received,"'");break;case l.invalid_arguments:a="Invalid function arguments";break;case l.invalid_return_type:a="Invalid function return type";break;case l.invalid_date:a="Invalid date";break;case l.invalid_string:"object"===typeof e.validation?"includes"in e.validation?(a='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"===typeof e.validation.position&&(a="".concat(a," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?a='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?a='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):s.assertNever(e.validation):a="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case l.too_small:a="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case l.too_big:a="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case l.custom:a="Invalid input";break;case l.invalid_intersection_types:a="Intersection results could not be merged";break;case l.not_multiple_of:a="Number must be a multiple of ".concat(e.multipleOf);break;case l.not_finite:a="Number must be finite";break;default:a=t.defaultError,s.assertNever(e)}return{message:a}};let m=f;function v(e){m=e}function y(){return m}const g=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,r=[...a,...s.path||[]],i=(0,d.A)((0,d.A)({},s),{},{path:r});if(void 0!==s.message)return(0,d.A)((0,d.A)({},s),{},{path:r,message:s.message});let o="";const c=n.filter((e=>!!e)).slice().reverse();for(const d of c)o=d(i,{data:t,defaultError:o}).message;return(0,d.A)((0,d.A)({},s),{},{path:r,message:o})},_=[];function b(e,t){const a=y(),n=g({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===f?void 0:f].filter((e=>!!e))});e.common.issues.push(n)}class k{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return A;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const e=await n.key,t=await n.value;a.push({key:e,value:t})}return k.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return A;if("aborted"===s.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||"undefined"===typeof s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const A=Object.freeze({status:"aborted"}),x=e=>({status:"dirty",value:e}),w=e=>({status:"valid",value:e}),Z=e=>"aborted"===e.status,O=e=>"dirty"===e.status,T=e=>"valid"===e.status,C=e=>"undefined"!==typeof Promise&&e instanceof Promise;var j;!function(e){e.errToObj=e=>"string"===typeof e?{message:e}:e||{},e.toString=e=>"string"===typeof e?e:null===e||void 0===e?void 0:e.message}(j||(j={}));class S{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const N=(e,t)=>{if(T(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new p(e.common.issues);return this._error=t,this._error}}};function E(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(t,s)=>{var r;const{message:i}=e;return"invalid_enum_value"===t.code?{message:null!==i&&void 0!==i?i:s.defaultError}:"undefined"===typeof s.data?{message:null!==(o=null!==i&&void 0!==i?i:n)&&void 0!==o?o:s.defaultError}:"invalid_type"!==t.code?{message:s.defaultError}:{message:null!==(r=null!==i&&void 0!==i?i:a)&&void 0!==r?r:s.defaultError};var o},description:s}}class P{get description(){return this._def.description}_getType(e){return u(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:u(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:u(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(C(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null===t||void 0===t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null===t||void 0===t?void 0:t.errorMap},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:u(e)},s=this._parseSync({data:e,path:n.path,parent:n});return N(n,s)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:u(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return T(a)?{value:a.value}:{issues:t.common.issues}}catch(n){var a;null!==n&&void 0!==n&&null!==(a=n.message)&&void 0!==a&&null!==(a=a.toLowerCase())&&void 0!==a&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then((e=>T(e)?{value:e.value}:{issues:t.common.issues}))}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null===t||void 0===t?void 0:t.errorMap,async:!0},path:(null===t||void 0===t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:u(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(C(n)?n:Promise.resolve(n));return N(a,s)}refine(e,t){return this._refinement(((a,n)=>{const s=e(a),r=()=>n.addIssue((0,d.A)({code:l.custom},(e=>"string"===typeof t||"undefined"===typeof t?{message:t}:"function"===typeof t?t(e):t)(a)));return"undefined"!==typeof Promise&&s instanceof Promise?s.then((e=>!!e||(r(),!1))):!!s||(r(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"===typeof t?t(a,n):t),!1)))}_refinement(e){return new Pe({schema:this,typeName:We.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 Ie.create(this,this._def)}nullable(){return Re.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fe.create(this)}promise(){return Ee.create(this,this._def)}or(e){return ye.create([this,e],this._def)}and(e){return ke.create(this,e,this._def)}transform(e){return new Pe((0,d.A)((0,d.A)({},E(this._def)),{},{schema:this,typeName:We.ZodEffects,effect:{type:"transform",transform:e}}))}default(e){const t="function"===typeof e?e:()=>e;return new Me((0,d.A)((0,d.A)({},E(this._def)),{},{innerType:this,defaultValue:t,typeName:We.ZodDefault}))}brand(){return new ze((0,d.A)({typeName:We.ZodBranded,type:this},E(this._def)))}catch(e){const t="function"===typeof e?e:()=>e;return new Fe((0,d.A)((0,d.A)({},E(this._def)),{},{innerType:this,catchValue:t,typeName:We.ZodCatch}))}describe(e){return new(0,this.constructor)((0,d.A)((0,d.A)({},this._def),{},{description:e}))}pipe(e){return Ve.create(this,e)}readonly(){return Ke.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const I=/^c[^\s-]{8,}$/i,R=/^[0-9a-z]+$/,M=/^[0-9A-HJKMNP-TV-Z]{26}$/i,F=/^[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,D=/^[a-z0-9_-]{21}$/i,L=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,z=/^[-+]?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)?)??$/,V=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let K;const U=/^(?:(?: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])$/,$=/^(?:(?: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])$/,B=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,G=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J="((\\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])))",Y=new RegExp("^".concat(J,"$"));function H(e){let t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));const a=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(a)}function X(e){let t="".concat(J,"T").concat(H(e));const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(a.join("|"),")"),new RegExp("^".concat(t,"$"))}function Q(e,t){if(!L.test(e))return!1;try{const[a]=e.split("."),n=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),s=JSON.parse(atob(n));return"object"===typeof s&&null!==s&&((!("typ"in s)||"JWT"===(null===s||void 0===s?void 0:s.typ))&&(!!s.alg&&(!t||s.alg===t)))}catch(a){return!1}}function ee(e,t){return!("v4"!==t&&t||!$.test(e))||!("v6"!==t&&t||!W.test(e))}class te extends P{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==c.string){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.string,received:t.parsedType}),A}const t=new k;let a;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:l.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:l.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const n=e.data.length>o.value,s=e.data.length<o.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?b(a,{code:l.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&b(a,{code:l.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)V.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"email",code:l.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)K||(K=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),K.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"emoji",code:l.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)F.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"uuid",code:l.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)D.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"nanoid",code:l.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)I.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid",code:l.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)R.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid2",code:l.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)M.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ulid",code:l.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(i){a=this._getOrReturnCtx(e,a),b(a,{validation:"url",code:l.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"regex",code:l.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(a=this._getOrReturnCtx(e,a),b(a,{code:l.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:l.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:l.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){X(o).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:l.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){Y.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:l.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){new RegExp("^".concat(H(o),"$")).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:l.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?z.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"duration",code:l.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?(n=e.data,("v4"!==(r=o.version)&&r||!U.test(n))&&("v6"!==r&&r||!B.test(n))&&(a=this._getOrReturnCtx(e,a),b(a,{validation:"ip",code:l.invalid_string,message:o.message}),t.dirty())):"jwt"===o.kind?Q(e.data,o.alg)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"jwt",code:l.invalid_string,message:o.message}),t.dirty()):"cidr"===o.kind?ee(e.data,o.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cidr",code:l.invalid_string,message:o.message}),t.dirty()):"base64"===o.kind?q.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64",code:l.invalid_string,message:o.message}),t.dirty()):"base64url"===o.kind?G.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64url",code:l.invalid_string,message:o.message}),t.dirty()):s.assertNever(o);var n,r;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),(0,d.A)({validation:t,code:l.invalid_string},j.errToObj(a)))}_addCheck(e){return new te((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,e]}))}email(e){return this._addCheck((0,d.A)({kind:"email"},j.errToObj(e)))}url(e){return this._addCheck((0,d.A)({kind:"url"},j.errToObj(e)))}emoji(e){return this._addCheck((0,d.A)({kind:"emoji"},j.errToObj(e)))}uuid(e){return this._addCheck((0,d.A)({kind:"uuid"},j.errToObj(e)))}nanoid(e){return this._addCheck((0,d.A)({kind:"nanoid"},j.errToObj(e)))}cuid(e){return this._addCheck((0,d.A)({kind:"cuid"},j.errToObj(e)))}cuid2(e){return this._addCheck((0,d.A)({kind:"cuid2"},j.errToObj(e)))}ulid(e){return this._addCheck((0,d.A)({kind:"ulid"},j.errToObj(e)))}base64(e){return this._addCheck((0,d.A)({kind:"base64"},j.errToObj(e)))}base64url(e){return this._addCheck((0,d.A)({kind:"base64url"},j.errToObj(e)))}jwt(e){return this._addCheck((0,d.A)({kind:"jwt"},j.errToObj(e)))}ip(e){return this._addCheck((0,d.A)({kind:"ip"},j.errToObj(e)))}cidr(e){return this._addCheck((0,d.A)({kind:"cidr"},j.errToObj(e)))}datetime(e){var t,a;return"string"===typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck((0,d.A)({kind:"datetime",precision:"undefined"===typeof(null===e||void 0===e?void 0:e.precision)?null:null===e||void 0===e?void 0:e.precision,offset:null!==(t=null===e||void 0===e?void 0:e.offset)&&void 0!==t&&t,local:null!==(a=null===e||void 0===e?void 0:e.local)&&void 0!==a&&a},j.errToObj(null===e||void 0===e?void 0: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((0,d.A)({kind:"time",precision:"undefined"===typeof(null===e||void 0===e?void 0:e.precision)?null:null===e||void 0===e?void 0:e.precision},j.errToObj(null===e||void 0===e?void 0:e.message)))}duration(e){return this._addCheck((0,d.A)({kind:"duration"},j.errToObj(e)))}regex(e,t){return this._addCheck((0,d.A)({kind:"regex",regex:e},j.errToObj(t)))}includes(e,t){return this._addCheck((0,d.A)({kind:"includes",value:e,position:null===t||void 0===t?void 0:t.position},j.errToObj(null===t||void 0===t?void 0:t.message)))}startsWith(e,t){return this._addCheck((0,d.A)({kind:"startsWith",value:e},j.errToObj(t)))}endsWith(e,t){return this._addCheck((0,d.A)({kind:"endsWith",value:e},j.errToObj(t)))}min(e,t){return this._addCheck((0,d.A)({kind:"min",value:e},j.errToObj(t)))}max(e,t){return this._addCheck((0,d.A)({kind:"max",value:e},j.errToObj(t)))}length(e,t){return this._addCheck((0,d.A)({kind:"length",value:e},j.errToObj(t)))}nonempty(e){return this.min(1,j.errToObj(e))}trim(){return new te((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,{kind:"trim"}]}))}toLowerCase(){return new te((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,{kind:"toLowerCase"}]}))}toUpperCase(){return new te((0,d.A)((0,d.A)({},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(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ae(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return Number.parseInt(e.toFixed(s).replace(".",""))%Number.parseInt(t.toFixed(s).replace(".",""))/10**s}te.create=e=>{var t;return new te((0,d.A)({checks:[],typeName:We.ZodString,coerce:null!==(t=null===e||void 0===e?void 0:e.coerce)&&void 0!==t&&t},E(e)))};class ne extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==c.number){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.number,received:t.parsedType}),A}let t;const a=new k;for(const n of this._def.checks)if("int"===n.kind)s.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),b(t,{code:l.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),b(t,{code:l.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),b(t,{code:l.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==ae(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),b(t,{code:l.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),b(t,{code:l.not_finite,message:n.message}),a.dirty()):s.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,a,n){return new ne((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:j.toString(n)}]}))}_addCheck(e){return new ne((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,e]}))}int(e){return this._addCheck({kind:"int",message:j.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:j.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&s.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"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)}}ne.create=e=>new ne((0,d.A)({checks:[],typeName:We.ZodNumber,coerce:(null===e||void 0===e?void 0:e.coerce)||!1},E(e)));class se extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(n){return this._getInvalidInput(e)}if(this._getType(e)!==c.bigint)return this._getInvalidInput(e);let t;const a=new k;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),b(t,{code:l.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),a.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),b(t,{code:l.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),a.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),b(t,{code:l.not_multiple_of,multipleOf:r.value,message:r.message}),a.dirty()):s.assertNever(r);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.bigint,received:t.parsedType}),A}gte(e,t){return this.setLimit("min",e,!0,j.toString(t))}gt(e,t){return this.setLimit("min",e,!1,j.toString(t))}lte(e,t){return this.setLimit("max",e,!0,j.toString(t))}lt(e,t){return this.setLimit("max",e,!1,j.toString(t))}setLimit(e,t,a,n){return new se((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:j.toString(n)}]}))}_addCheck(e){return new se((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,e]}))}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:j.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}se.create=e=>{var t;return new se((0,d.A)({checks:[],typeName:We.ZodBigInt,coerce:null!==(t=null===e||void 0===e?void 0:e.coerce)&&void 0!==t&&t},E(e)))};class re extends P{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==c.boolean){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.boolean,received:t.parsedType}),A}return w(e.data)}}re.create=e=>new re((0,d.A)({typeName:We.ZodBoolean,coerce:(null===e||void 0===e?void 0:e.coerce)||!1},E(e)));class ie extends P{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==c.date){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.date,received:t.parsedType}),A}if(Number.isNaN(e.data.getTime())){return b(this._getOrReturnCtx(e),{code:l.invalid_date}),A}const t=new k;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:l.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:l.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):s.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ie((0,d.A)((0,d.A)({},this._def),{},{checks:[...this._def.checks,e]}))}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:j.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:j.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ie.create=e=>new ie((0,d.A)({checks:[],coerce:(null===e||void 0===e?void 0:e.coerce)||!1,typeName:We.ZodDate},E(e)));class oe extends P{_parse(e){if(this._getType(e)!==c.symbol){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.symbol,received:t.parsedType}),A}return w(e.data)}}oe.create=e=>new oe((0,d.A)({typeName:We.ZodSymbol},E(e)));class de extends P{_parse(e){if(this._getType(e)!==c.undefined){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.undefined,received:t.parsedType}),A}return w(e.data)}}de.create=e=>new de((0,d.A)({typeName:We.ZodUndefined},E(e)));class ce extends P{_parse(e){if(this._getType(e)!==c.null){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.null,received:t.parsedType}),A}return w(e.data)}}ce.create=e=>new ce((0,d.A)({typeName:We.ZodNull},E(e)));class ue extends P{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}ue.create=e=>new ue((0,d.A)({typeName:We.ZodAny},E(e)));class le extends P{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}le.create=e=>new le((0,d.A)({typeName:We.ZodUnknown},E(e)));class he extends P{_parse(e){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.never,received:t.parsedType}),A}}he.create=e=>new he((0,d.A)({typeName:We.ZodNever},E(e)));class pe extends P{_parse(e){if(this._getType(e)!==c.undefined){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.void,received:t.parsedType}),A}return w(e.data)}}pe.create=e=>new pe((0,d.A)({typeName:We.ZodVoid},E(e)));class fe extends P{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==c.array)return b(t,{code:l.invalid_type,expected:c.array,received:t.parsedType}),A;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(b(t,{code:e?l.too_big:l.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(b(t,{code:l.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(b(t,{code:l.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new S(t,e,t.path,a))))).then((e=>k.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new S(t,e,t.path,a))));return k.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new fe((0,d.A)((0,d.A)({},this._def),{},{minLength:{value:e,message:j.toString(t)}}))}max(e,t){return new fe((0,d.A)((0,d.A)({},this._def),{},{maxLength:{value:e,message:j.toString(t)}}))}length(e,t){return new fe((0,d.A)((0,d.A)({},this._def),{},{exactLength:{value:e,message:j.toString(t)}}))}nonempty(e){return this.min(1,e)}}function me(e){if(e instanceof ve){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=Ie.create(me(n))}return new ve((0,d.A)((0,d.A)({},e._def),{},{shape:()=>t}))}return e instanceof fe?new fe((0,d.A)((0,d.A)({},e._def),{},{type:me(e.element)})):e instanceof Ie?Ie.create(me(e.unwrap())):e instanceof Re?Re.create(me(e.unwrap())):e instanceof Ae?Ae.create(e.items.map((e=>me(e)))):e}fe.create=(e,t)=>new fe((0,d.A)({type:e,minLength:null,maxLength:null,exactLength:null,typeName:We.ZodArray},E(t)));class ve extends P{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=s.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==c.object){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.object,received:t.parsedType}),A}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),r=[];if(!(this._def.catchall instanceof he&&"strip"===this._def.unknownKeys))for(const o in a.data)s.includes(o)||r.push(o);const i=[];for(const o of s){const e=n[o],t=a.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new S(a,t,a.path,o)),alwaysSet:o in a.data})}if(this._def.catchall instanceof he){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of r)i.push({key:{status:"valid",value:t},value:{status:"valid",value:a.data[t]}});else if("strict"===e)r.length>0&&(b(a,{code:l.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const n=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new S(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key,n=await t.value;e.push({key:a,value:n,alwaysSet:t.alwaysSet})}return e})).then((e=>k.mergeObjectSync(t,e))):k.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return j.errToObj,new ve((0,d.A)((0,d.A)({},this._def),{},{unknownKeys:"strict"},void 0!==e?{errorMap:(t,a)=>{var n,s,r,i;const o=null!==(n=null===(s=(r=this._def).errorMap)||void 0===s?void 0:s.call(r,t,a).message)&&void 0!==n?n:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=j.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}))}strip(){return new ve((0,d.A)((0,d.A)({},this._def),{},{unknownKeys:"strip"}))}passthrough(){return new ve((0,d.A)((0,d.A)({},this._def),{},{unknownKeys:"passthrough"}))}extend(e){return new ve((0,d.A)((0,d.A)({},this._def),{},{shape:()=>(0,d.A)((0,d.A)({},this._def.shape()),e)}))}merge(e){return new ve({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>(0,d.A)((0,d.A)({},this._def.shape()),e._def.shape()),typeName:We.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ve((0,d.A)((0,d.A)({},this._def),{},{catchall:e}))}pick(e){const t={};for(const a of s.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new ve((0,d.A)((0,d.A)({},this._def),{},{shape:()=>t}))}omit(e){const t={};for(const a of s.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new ve((0,d.A)((0,d.A)({},this._def),{},{shape:()=>t}))}deepPartial(){return me(this)}partial(e){const t={};for(const a of s.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new ve((0,d.A)((0,d.A)({},this._def),{},{shape:()=>t}))}required(e){const t={};for(const a of s.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof Ie;)e=e._def.innerType;t[a]=e}return new ve((0,d.A)((0,d.A)({},this._def),{},{shape:()=>t}))}keyof(){return je(s.objectKeys(this.shape))}}ve.create=(e,t)=>new ve((0,d.A)({shape:()=>e,unknownKeys:"strip",catchall:he.create(),typeName:We.ZodObject},E(t))),ve.strictCreate=(e,t)=>new ve((0,d.A)({shape:()=>e,unknownKeys:"strict",catchall:he.create(),typeName:We.ZodObject},E(t))),ve.lazycreate=(e,t)=>new ve((0,d.A)({shape:e,unknownKeys:"strip",catchall:he.create(),typeName:We.ZodObject},E(t)));class ye extends P{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a=(0,d.A)((0,d.A)({},t),{},{common:(0,d.A)((0,d.A)({},t.common),{},{issues:[]}),parent:null});return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const a=e.map((e=>new p(e.ctx.common.issues)));return b(t,{code:l.invalid_union,unionErrors:a}),A}));{let e;const n=[];for(const r of a){const a=(0,d.A)((0,d.A)({},t),{},{common:(0,d.A)((0,d.A)({},t.common),{},{issues:[]}),parent:null}),s=r._parseSync({data:t.data,path:t.path,parent:a});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new p(e)));return b(t,{code:l.invalid_union,unionErrors:s}),A}}get options(){return this._def.options}}ye.create=(e,t)=>new ye((0,d.A)({options:e,typeName:We.ZodUnion},E(t)));const ge=e=>e instanceof Te?ge(e.schema):e instanceof Pe?ge(e.innerType()):e instanceof Ce?[e.value]:e instanceof Se?e.options:e instanceof Ne?s.objectValues(e.enum):e instanceof Me?ge(e._def.innerType):e instanceof de?[void 0]:e instanceof ce?[null]:e instanceof Ie?[void 0,...ge(e.unwrap())]:e instanceof Re?[null,...ge(e.unwrap())]:e instanceof ze||e instanceof Ke?ge(e.unwrap()):e instanceof Fe?ge(e._def.innerType):[];class _e extends P{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.object)return b(t,{code:l.invalid_type,expected:c.object,received:t.parsedType}),A;const a=this.discriminator,n=t.data[a],s=this.optionsMap.get(n);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}):(b(t,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const n=new Map;for(const s of t){const t=ge(s.shape[e]);if(!t.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(const a of t){if(n.has(a))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(a)));n.set(a,s)}}return new _e((0,d.A)({typeName:We.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n},E(a)))}}function be(e,t){const a=u(e),n=u(t);if(e===t)return{valid:!0,data:e};if(a===c.object&&n===c.object){const a=s.objectKeys(t),n=s.objectKeys(e).filter((e=>-1!==a.indexOf(e))),r=(0,d.A)((0,d.A)({},e),t);for(const s of n){const a=be(e[s],t[s]);if(!a.valid)return{valid:!1};r[s]=a.data}return{valid:!0,data:r}}if(a===c.array&&n===c.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=be(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===c.date&&n===c.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class ke extends P{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(Z(e)||Z(n))return A;const s=be(e.value,n.value);return s.valid?((O(e)||O(n))&&t.dirty(),{status:t.value,value:s.data}):(b(a,{code:l.invalid_intersection_types}),A)};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=>{let[t,a]=e;return n(t,a)})):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ke.create=(e,t,a)=>new ke((0,d.A)({left:e,right:t,typeName:We.ZodIntersection},E(a)));class Ae extends P{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.array)return b(a,{code:l.invalid_type,expected:c.array,received:a.parsedType}),A;if(a.data.length<this._def.items.length)return b(a,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&a.data.length>this._def.items.length&&(b(a,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new S(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>k.mergeArray(t,e))):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Ae((0,d.A)((0,d.A)({},this._def),{},{rest:e}))}}Ae.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ae((0,d.A)({items:e,typeName:We.ZodTuple,rest:null},E(t)))};class xe extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.object)return b(a,{code:l.invalid_type,expected:c.object,received:a.parsedType}),A;const n=[],s=this._def.keyType,r=this._def.valueType;for(const i in a.data)n.push({key:s._parse(new S(a,i,a.path,i)),value:r._parse(new S(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?k.mergeObjectAsync(t,n):k.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,a){return new xe(t instanceof P?(0,d.A)({keyType:e,valueType:t,typeName:We.ZodRecord},E(a)):(0,d.A)({keyType:te.create(),valueType:e,typeName:We.ZodRecord},E(t)))}}class we extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.map)return b(a,{code:l.invalid_type,expected:c.map,received:a.parsedType}),A;const n=this._def.keyType,s=this._def.valueType,r=[...a.data.entries()].map(((e,t)=>{let[r,i]=e;return{key:n._parse(new S(a,r,a.path,[t,"key"])),value:s._parse(new S(a,i,a.path,[t,"value"]))}}));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return A;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return A;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}we.create=(e,t,a)=>new we((0,d.A)({valueType:t,keyType:e,typeName:We.ZodMap},E(a)));class Ze extends P{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.set)return b(a,{code:l.invalid_type,expected:c.set,received:a.parsedType}),A;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(b(a,{code:l.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(b(a,{code:l.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function r(e){const a=new Set;for(const n of e){if("aborted"===n.status)return A;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>s._parse(new S(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new Ze((0,d.A)((0,d.A)({},this._def),{},{minSize:{value:e,message:j.toString(t)}}))}max(e,t){return new Ze((0,d.A)((0,d.A)({},this._def),{},{maxSize:{value:e,message:j.toString(t)}}))}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ze.create=(e,t)=>new Ze((0,d.A)({valueType:e,minSize:null,maxSize:null,typeName:We.ZodSet},E(t)));class Oe extends P{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.function)return b(t,{code:l.invalid_type,expected:c.function,received:t.parsedType}),A;function a(e,a){return g({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),f].filter((e=>!!e)),issueData:{code:l.invalid_arguments,argumentsError:a}})}function n(e,a){return g({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,y(),f].filter((e=>!!e)),issueData:{code:l.invalid_return_type,returnTypeError:a}})}const s={errorMap:t.common.contextualErrorMap},r=t.data;if(this._def.returns instanceof Ee){const e=this;return w((async function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];const d=new p([]),c=await e._def.args.parseAsync(i,s).catch((e=>{throw d.addIssue(a(i,e)),d})),u=await Reflect.apply(r,this,c);return await e._def.returns._def.type.parseAsync(u,s).catch((e=>{throw d.addIssue(n(u,e)),d}))}))}{const e=this;return w((function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];const d=e._def.args.safeParse(i,s);if(!d.success)throw new p([a(i,d.error)]);const c=Reflect.apply(r,this,d.data),u=e._def.returns.safeParse(c,s);if(!u.success)throw new p([n(c,u.error)]);return u.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return new Oe((0,d.A)((0,d.A)({},this._def),{},{args:Ae.create(t).rest(le.create())}))}returns(e){return new Oe((0,d.A)((0,d.A)({},this._def),{},{returns:e}))}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Oe((0,d.A)({args:e||Ae.create([]).rest(le.create()),returns:t||le.create(),typeName:We.ZodFunction},E(a)))}}class Te extends P{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Te.create=(e,t)=>new Te((0,d.A)({getter:e,typeName:We.ZodLazy},E(t)));class Ce extends P{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return b(t,{received:t.data,code:l.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function je(e,t){return new Se((0,d.A)({values:e,typeName:We.ZodEnum},E(t)))}Ce.create=(e,t)=>new Ce((0,d.A)({value:e,typeName:We.ZodLiteral},E(t)));class Se extends P{_parse(e){if("string"!==typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return b(t,{expected:s.joinValues(a),received:t.parsedType,code:l.invalid_type}),A}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return b(t,{received:t.data,code:l.invalid_enum_value,options:a}),A}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return Se.create(e,(0,d.A)((0,d.A)({},this._def),t))}exclude(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return Se.create(this.options.filter((t=>!e.includes(t))),(0,d.A)((0,d.A)({},this._def),t))}}Se.create=je;class Ne extends P{_parse(e){const t=s.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==c.string&&a.parsedType!==c.number){const e=s.objectValues(t);return b(a,{expected:s.joinValues(e),received:a.parsedType,code:l.invalid_type}),A}if(this._cache||(this._cache=new Set(s.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=s.objectValues(t);return b(a,{received:a.data,code:l.invalid_enum_value,options:e}),A}return w(e.data)}get enum(){return this._def.values}}Ne.create=(e,t)=>new Ne((0,d.A)({values:e,typeName:We.ZodNativeEnum},E(t)));class Ee extends P{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.promise&&!1===t.common.async)return b(t,{code:l.invalid_type,expected:c.promise,received:t.parsedType}),A;const a=t.parsedType===c.promise?t.data:Promise.resolve(t.data);return w(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ee.create=(e,t)=>new Ee((0,d.A)({type:e,typeName:We.ZodPromise},E(t)));class Pe extends P{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===We.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{b(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(a.data,r);if(a.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return A;const n=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===n.status?A:"dirty"===n.status||"dirty"===t.value?x(n.value):n}));{if("aborted"===t.value)return A;const n=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===n.status?A:"dirty"===n.status||"dirty"===t.value?x(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?A:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?A:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!T(e))return A;const s=n.transform(e.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>T(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):A))}s.assertNever(n)}}Pe.create=(e,t,a)=>new Pe((0,d.A)({schema:e,typeName:We.ZodEffects,effect:t},E(a))),Pe.createWithPreprocess=(e,t,a)=>new Pe((0,d.A)({schema:t,effect:{type:"preprocess",transform:e},typeName:We.ZodEffects},E(a)));class Ie extends P{_parse(e){return this._getType(e)===c.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ie.create=(e,t)=>new Ie((0,d.A)({innerType:e,typeName:We.ZodOptional},E(t)));class Re extends P{_parse(e){return this._getType(e)===c.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Re.create=(e,t)=>new Re((0,d.A)({innerType:e,typeName:We.ZodNullable},E(t)));class Me extends P{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===c.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Me.create=(e,t)=>new Me((0,d.A)({innerType:e,typeName:We.ZodDefault,defaultValue:"function"===typeof t.default?t.default:()=>t.default},E(t)));class Fe extends P{_parse(e){const{ctx:t}=this._processInputParams(e),a=(0,d.A)((0,d.A)({},t),{},{common:(0,d.A)((0,d.A)({},t.common),{},{issues:[]})}),n=this._def.innerType._parse({data:a.data,path:a.path,parent:(0,d.A)({},a)});return C(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new p(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new p(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Fe.create=(e,t)=>new Fe((0,d.A)({innerType:e,typeName:We.ZodCatch,catchValue:"function"===typeof t.catch?t.catch:()=>t.catch},E(t)));class De extends P{_parse(e){if(this._getType(e)!==c.nan){const t=this._getOrReturnCtx(e);return b(t,{code:l.invalid_type,expected:c.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}De.create=e=>new De((0,d.A)({typeName:We.ZodNaN},E(e)));const Le=Symbol("zod_brand");class ze extends P{_parse(e){const{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 Ve extends P{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),x(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?A:"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 Ve({in:e,out:t,typeName:We.ZodPipeline})}}class Ke extends P{_parse(e){const t=this._def.innerType._parse(e),a=e=>(T(e)&&(e.value=Object.freeze(e.value)),e);return C(t)?t.then((e=>a(e))):a(t)}unwrap(){return this._def.innerType}}function Ue(e,t){const a="function"===typeof e?e(t):"string"===typeof e?{message:e}:e;return"string"===typeof a?{message:a}:a}function $e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return e?ue.create().superRefine(((n,s)=>{const r=e(n);if(r instanceof Promise)return r.then((e=>{if(!e){var r,i;const e=Ue(t,n),o=null===(r=null!==(i=e.fatal)&&void 0!==i?i:a)||void 0===r||r;s.addIssue((0,d.A)((0,d.A)({code:"custom"},e),{},{fatal:o}))}}));if(!r){var i,o;const e=Ue(t,n),r=null===(i=null!==(o=e.fatal)&&void 0!==o?o:a)||void 0===i||i;s.addIssue((0,d.A)((0,d.A)({code:"custom"},e),{},{fatal:r}))}})):ue.create()}Ke.create=(e,t)=>new Ke((0,d.A)({innerType:e,typeName:We.ZodReadonly},E(t)));const Be={object:ve.lazycreate};var We;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(We||(We={}));const qe=function(e){return $e((t=>t instanceof e),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)})},Ge=te.create,Je=ne.create,Ye=De.create,He=se.create,Xe=re.create,Qe=ie.create,et=oe.create,tt=de.create,at=ce.create,nt=ue.create,st=le.create,rt=he.create,it=pe.create,ot=fe.create,dt=ve.create,ct=ve.strictCreate,ut=ye.create,lt=_e.create,ht=ke.create,pt=Ae.create,ft=xe.create,mt=we.create,vt=Ze.create,yt=Oe.create,gt=Te.create,_t=Ce.create,bt=Se.create,kt=Ne.create,At=Ee.create,xt=Pe.create,wt=Ie.create,Zt=Re.create,Ot=Pe.createWithPreprocess,Tt=Ve.create,Ct=()=>Ge().optional(),jt=()=>Je().optional(),St=()=>Xe().optional(),Nt={string:e=>te.create((0,d.A)((0,d.A)({},e),{},{coerce:!0})),number:e=>ne.create((0,d.A)((0,d.A)({},e),{},{coerce:!0})),boolean:e=>re.create((0,d.A)((0,d.A)({},e),{},{coerce:!0})),bigint:e=>se.create((0,d.A)((0,d.A)({},e),{},{coerce:!0})),date:e=>ie.create((0,d.A)((0,d.A)({},e),{},{coerce:!0}))},Et=A,Pt=function(){const{name:e,callback:t,description:a}="string"===typeof(arguments.length<=0?void 0:arguments[0])?{name:arguments.length<=0?void 0:arguments[0],callback:arguments.length<=1?void 0:arguments[1],description:arguments.length<=2?void 0:arguments[2]}:{callback:arguments.length<=0?void 0:arguments[0],description:arguments.length<=1?void 0:arguments[1]},s=t(n),{props:r,required:i}=Array.isArray(s)?{props:s[0],required:s[1]}:{props:s,required:void 0},o=dt(r).required(i).describe(a||""),d=e=>o.passthrough().parse(e);return d.identifier=e,d.schema=o,d},It=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,i.createContext)(e),{Provider:a,Consumer:n}=t;return{context:t,Provider:a,Consumer:n,useContext:()=>(0,i.useContext)(t)}},Rt=It({}),{Provider:Mt,Consumer:Ft,useContext:Dt}=Rt,Lt=Dt,zt=()=>{const e=Dt();return Object.assign({},{apis:{}},null==e?void 0:e.preset)};function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Vt.apply(null,arguments)}const Kt=["preset","children"],Ut=Pt("Global",(e=>({preset:e.unknown().default({}).describe("global\u4e2d\u7684\u9884\u8bbe\u53c2\u6570\uff0c\u7ec4\u4ef6\u521d\u59cb\u5316\u65f6\u4f20\u5165\u4e0d\u53ef\u4fee\u6539"),children:e.unknown()})),"context\u7684Provider"),$t=e=>{const t=Ut(e),{preset:a,children:n}=t,s=function(e,t){if(null==e)return{};var a={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;a[n]=e[n]}return a}(t,Kt),[r,d]=(0,i.useState)({}),c=(0,i.useCallback)(((e,t)=>{d((a=>Object.assign({},a,{[e]:"function"===typeof t?t(a[e]):t})))}),[]);return o().createElement(Mt,{value:Vt({},s,{global:r,preset:a,setGlobal:d,setGlobalWithKey:c})},n)},Bt=Pt("GlobalSetting",(e=>({loader:e.function().describe("\u8bbe\u7f6e\u5230global\u7684\u503c\uff0c\u4e3a\u4e00\u4e2a\u6216\u591a\u4e2a\u952e\u503c\u5bf9\uff0c\u5c06\u4f1a\u548c\u4e4b\u524d\u7684global\u8fdb\u884cObject.assign\u5408\u5e76").returns(e.promise(e.unknown())),needReady:e.boolean().default(!0).describe("\u662f\u5426\u5728global\u503c\u8bbe\u7f6e\u597d\u4e4b\u524d\u4e0d\u663e\u793achildren"),children:e.unknown()})),"\u8bbe\u7f6eglobal\u7684\u503c\uff0c\u901a\u5e38\u662f\u901a\u8fc7\u5f02\u6b65\u83b7\u53d6"),Wt=e=>{const{loader:t,needReady:a,children:n}=Bt(e),[s,r]=(0,i.useState)(!1),{global:o,setGlobal:d}=Dt(),c=(0,i.useRef)(null),u=(0,i.useRef)(t);return(0,i.useEffect)((()=>{u.current().then((e=>{d((t=>{const a=Object.assign({},t,e);return c.current=a,a}))}))}),[]),(0,i.useEffect)((()=>{o===c.current&&r(!0)}),[o]),a&&!s?null:n},qt=function(){const{name:e,callback:t,description:a}="string"===typeof(arguments.length<=0?void 0:arguments[0])?{name:arguments.length<=0?void 0:arguments[0],callback:arguments.length<=1?void 0:arguments[1],description:arguments.length<=2?void 0:arguments[2]}:{callback:arguments.length<=0?void 0:arguments[0],description:arguments.length<=1?void 0:arguments[1]},{args:s,returns:r}=t(n),i=yt().args(...s);r&&i.returns(r),i.describe(a||"");const o=e=>i.parse(e);return o.identifier=e,o.schema=i,o}("useGlobalValue",(e=>({args:[e.string().describe("globalKey:\u9700\u8981\u4eceglobal\u83b7\u53d6\u7684\u503c")],returns:e.unknown().describe("\u83b7\u53d6\u5230\u7684global\u7684key\u7684\u503c")})),"\u83b7\u53d6global\u91cc\u9762\u7684globalKey\u5bf9\u5e94\u7684\u503c\u7684hooks")((e=>{const{global:t}=Dt();return t[e]})),Gt=Pt("GlobalValue",(e=>[{globalKey:e.string().describe("\u9700\u8981\u83b7\u53d6\u7684global\u7684key"),children:e.function().args(e.object({value:e.unknown().describe("\u83b7\u53d6\u5230\u7684global\u7684key\u7684\u503c")}))},{children:!0,globalKey:!0}]),"\u83b7\u53d6global\u4e2dglobalKey\u7684\u503c"),Jt=e=>{const{globalKey:t,children:a}=Gt(e);return a({value:qt(t)})},Yt=Pt("Preset",(e=>[{children:e.function().args(e.unknown().describe("\u9884\u8bbe\u5bf9\u8c61")).describe("\u63a5\u6536\u9884\u8bbe\u5bf9\u8c61\u7684\u65b9\u6cd5")},{children:!0}]),"\u83b7\u53d6Preset\u7684\u503c"),Ht=e=>{const{children:t}=Yt(e);return t(zt())}},20816:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(82284);function s(e){var t=function(e,t){if("object"!=(0,n.A)(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var s=a.call(e,t||"default");if("object"!=(0,n.A)(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},64467:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(20816);function s(e,t,a){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}},82284:(e,t,a)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}a.d(t,{A:()=>n})},89379:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(64467);function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?s(Object(a),!0).forEach((function(t){(0,n.A)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}}}]);
2
- //# sourceMappingURL=969.a046887b.chunk.js.map