react-luminus-components 1.2.35 → 1.2.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("./UserAvatarToggle-rzyVxLmG.cjs"),Me=require("./useConfirm-9zGqmWEb.cjs"),He=require("react"),Ge=require("./textUtils-CHVVh2oi.cjs"),Ke=require("./dateUtils-CWKBTsx7.cjs");require("react-hook-form");const Pe=require("./useKeyPress-BRCIx392.cjs"),Xe=require("./usePermissions-CO93mmCn.cjs");var x;(function(r){r.assertEqual=s=>s;function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},r.getValidEnumValues=s=>{const a=r.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return r.objectValues(i)},r.objectValues=s=>r.objectKeys(s).map(function(a){return s[a]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},r.find=(s,a)=>{for(const i of s)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var Ce;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Ce||(Ce={}));const f=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),z=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},d=x.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"]),Qe=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class O extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let o=n,u=0;for(;u<i.path.length;){const c=i.path[u];u===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return s(this),n}static assert(e){if(!(e instanceof O))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}O.create=r=>new O(r);const G=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}};let $e=G;function Fe(r){$e=r}function _e(){return $e}const ve=r=>{const{data:e,path:t,errorMaps:n,issueData:s}=r,a=[...t,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const u=n.filter(c=>!!c).slice().reverse();for(const c of u)o=c(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},et=[];function l(r,e){const t=_e(),n=ve({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===G?void 0:G].filter(s=>!!s)});r.common.issues.push(n)}class Z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const s of t){if(s.status==="aborted")return p;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const s of t){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return Z.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const s of t){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return p;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const p=Object.freeze({status:"aborted"}),J=r=>({status:"dirty",value:r}),S=r=>({status:"valid",value:r}),Ne=r=>r.status==="aborted",Oe=r=>r.status==="dirty",ee=r=>r.status==="valid",te=r=>typeof Promise<"u"&&r instanceof Promise;function ge(r,e,t,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function ze(r,e,t,n,s){if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));var Q,F;class A{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const je=(r,e)=>{if(ee(e))return{success:!0,data:e.value};if(!r.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 O(r.common.issues);return this._error=t,this._error}}};function _(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{var u,c;const{message:y}=r;return i.code==="invalid_enum_value"?{message:y??o.defaultError}:typeof o.data>"u"?{message:(u=y??n)!==null&&u!==void 0?u:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=y??t)!==null&&c!==void 0?c:o.defaultError}},description:s}}class v{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)}get description(){return this._def.description}_getType(e){return z(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Z,ctx:{common:e.parent.common,data:e.data,parsedType:z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(te(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 n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)},a=this._parseSync({data:e,path:s.path,parent:s});return je(s,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(te(s)?s:Promise.resolve(s));return je(n,a)}refine(e,t){const n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:d.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new R({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return j.create(this,this._def)}nullable(){return U.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return I.create(this,this._def)}promise(){return X.create(this,this._def)}or(e){return ae.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new R({..._(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new le({..._(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Ie({typeName:m.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new fe({..._(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pe.create(this,e)}readonly(){return he.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tt=/^c[^\s-]{8,}$/i,rt=/^[0-9a-z]+$/,nt=/^[0-9A-HJKMNP-TV-Z]{26}$/,st=/^[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,at=/^[a-z0-9_-]{21}$/i,it=/^[-+]?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)?)??$/,ot=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Se;const ct=/^(?:(?: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])$/,ut=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,lt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ve="((\\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])))",ft=new RegExp(`^${Ve}$`);function De(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function ht(r){return new RegExp(`^${De(r)}$`)}function Le(r){let e=`${Ve}T${De(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function mt(r,e){return!!((e==="v4"||!e)&&ct.test(r)||(e==="v6"||!e)&&ut.test(r))}class E extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),p}const n=new Z;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?l(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")ot.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"email",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Se||(Se=new RegExp(dt,"u")),Se.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"emoji",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")st.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"uuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")at.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"nanoid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")tt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")rt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid2",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")nt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ulid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),l(s,{validation:"url",code:d.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"regex",code:d.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Le(a).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?ft.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?ht(a).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?it.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"duration",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?mt(e.data,a.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ip",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?lt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64",code:d.invalid_string,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:d.invalid_string,...h.errToObj(n)})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}E.create=r=>{var e;return new E({checks:[],typeName:m.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,..._(r)})};function pt(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,a=parseInt(r.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return a%i/Math.pow(10,s)}class V extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),p}let n;const s=new Z;for(const a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?pt(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_finite,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}V.create=r=>new V({checks:[],typeName:m.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class D extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==f.bigint){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.bigint,received:a.parsedType}),p}let n;const s=new Z;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}D.create=r=>{var e;return new D({checks:[],typeName:m.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,..._(r)})};class re extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.boolean,received:n.parsedType}),p}return S(e.data)}}re.create=r=>new re({typeName:m.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class B extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),p}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),p}const n=new Z;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):x.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}B.create=r=>new B({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:m.ZodDate,..._(r)});class xe extends v{_parse(e){if(this._getType(e)!==f.symbol){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.symbol,received:n.parsedType}),p}return S(e.data)}}xe.create=r=>new xe({typeName:m.ZodSymbol,..._(r)});class ne extends v{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.undefined,received:n.parsedType}),p}return S(e.data)}}ne.create=r=>new ne({typeName:m.ZodUndefined,..._(r)});class se extends v{_parse(e){if(this._getType(e)!==f.null){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.null,received:n.parsedType}),p}return S(e.data)}}se.create=r=>new se({typeName:m.ZodNull,..._(r)});class K extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return S(e.data)}}K.create=r=>new K({typeName:m.ZodAny,..._(r)});class q extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return S(e.data)}}q.create=r=>new q({typeName:m.ZodUnknown,..._(r)});class $ extends v{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),p}}$.create=r=>new $({typeName:m.ZodNever,..._(r)});class ke extends v{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.void,received:n.parsedType}),p}return S(e.data)}}ke.create=r=>new ke({typeName:m.ZodVoid,..._(r)});class I extends v{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==f.array)return l(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),p;if(s.exactLength!==null){const i=t.data.length>s.exactLength.value,o=t.data.length<s.exactLength.value;(i||o)&&(l(t,{code:i?d.too_big:d.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(l(t,{code:d.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(l(t,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>s.type._parseAsync(new A(t,i,t.path,o)))).then(i=>Z.mergeArray(n,i));const a=[...t.data].map((i,o)=>s.type._parseSync(new A(t,i,t.path,o)));return Z.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new I({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new I({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new I({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}I.create=(r,e)=>new I({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,..._(e)});function Y(r){if(r instanceof k){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=j.create(Y(n))}return new k({...r._def,shape:()=>e})}else return r instanceof I?new I({...r._def,type:Y(r.element)}):r instanceof j?j.create(Y(r.unwrap())):r instanceof U?U.create(Y(r.unwrap())):r instanceof M?M.create(r.items.map(e=>Y(e))):r}class k extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const c=this._getOrReturnCtx(e);return l(c,{code:d.invalid_type,expected:f.object,received:c.parsedType}),p}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||o.push(c);const u=[];for(const c of i){const y=a[c],N=s.data[c];u.push({key:{status:"valid",value:c},value:y._parse(new A(s,N,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof $){const c=this._def.unknownKeys;if(c==="passthrough")for(const y of o)u.push({key:{status:"valid",value:y},value:{status:"valid",value:s.data[y]}});else if(c==="strict")o.length>0&&(l(s,{code:d.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const y of o){const N=s.data[y];u.push({key:{status:"valid",value:y},value:c._parse(new A(s,N,s.path,y)),alwaysSet:y in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const y of u){const N=await y.key,Ze=await y.value;c.push({key:N,value:Ze,alwaysSet:y.alwaysSet})}return c}).then(c=>Z.mergeObjectSync(n,c)):Z.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var s,a,i,o;const u=(i=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,t,n).message)!==null&&i!==void 0?i:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const t={};return x.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new k({...this._def,shape:()=>t})}omit(e){const t={};return x.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new k({...this._def,shape:()=>t})}deepPartial(){return Y(this)}partial(e){const t={};return x.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}),new k({...this._def,shape:()=>t})}required(e){const t={};return x.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof j;)a=a._def.innerType;t[n]=a}}),new k({...this._def,shape:()=>t})}keyof(){return Ue(x.objectKeys(this.shape))}}k.create=(r,e)=>new k({shape:()=>r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,..._(e)});k.strictCreate=(r,e)=>new k({shape:()=>r,unknownKeys:"strict",catchall:$.create(),typeName:m.ZodObject,..._(e)});k.lazycreate=(r,e)=>new k({shape:r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,..._(e)});class ae extends v{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new O(o.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(n.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const u of n){const c={...t,common:{...t.common,issues:[]},parent:null},y=u._parseSync({data:t.data,path:t.path,parent:c});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(u=>new O(u));return l(t,{code:d.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}ae.create=(r,e)=>new ae({options:r,typeName:m.ZodUnion,..._(e)});const P=r=>r instanceof de?P(r.schema):r instanceof R?P(r.innerType()):r instanceof ce?[r.value]:r instanceof L?r.options:r instanceof ue?x.objectValues(r.enum):r instanceof le?P(r._def.innerType):r instanceof ne?[void 0]:r instanceof se?[null]:r instanceof j?[void 0,...P(r.unwrap())]:r instanceof U?[null,...P(r.unwrap())]:r instanceof Ie||r instanceof he?P(r.unwrap()):r instanceof fe?P(r._def.innerType):[];class Te extends v{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return l(t,{code:d.invalid_type,expected:f.object,received:t.parsedType}),p;const n=this.discriminator,s=t.data[n],a=this.optionsMap.get(s);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const a of t){const i=P(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new Te({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,..._(n)})}}function Ee(r,e){const t=z(r),n=z(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&n===f.object){const s=x.objectKeys(e),a=x.objectKeys(r).filter(o=>s.indexOf(o)!==-1),i={...r,...e};for(const o of a){const u=Ee(r[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(t===f.array&&n===f.array){if(r.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],u=Ee(i,o);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return t===f.date&&n===f.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class ie extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Ne(a)||Ne(i))return p;const o=Ee(a.value,i.value);return o.valid?((Oe(a)||Oe(i))&&t.dirty(),{status:t.value,value:o.data}):(l(n,{code:d.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ie.create=(r,e,t)=>new ie({left:r,right:e,typeName:m.ZodIntersection,..._(t)});class M extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return l(n,{code:d.invalid_type,expected:f.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return l(n,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(l(n,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((i,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new A(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>Z.mergeArray(t,i)):Z.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:r,typeName:m.ZodTuple,rest:null,..._(e)})};class oe extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return l(n,{code:d.invalid_type,expected:f.object,received:n.parsedType}),p;const s=[],a=this._def.keyType,i=this._def.valueType;for(const o in n.data)s.push({key:a._parse(new A(n,o,n.path,o)),value:i._parse(new A(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?Z.mergeObjectAsync(t,s):Z.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof v?new oe({keyType:e,valueType:t,typeName:m.ZodRecord,..._(n)}):new oe({keyType:E.create(),valueType:e,typeName:m.ZodRecord,..._(t)})}}class be extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return l(n,{code:d.invalid_type,expected:f.map,received:n.parsedType}),p;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,u],c)=>({key:s._parse(new A(n,o,n.path,[c,"key"])),value:a._parse(new A(n,u,n.path,[c,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of i){const c=await u.key,y=await u.value;if(c.status==="aborted"||y.status==="aborted")return p;(c.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(c.value,y.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const u of i){const c=u.key,y=u.value;if(c.status==="aborted"||y.status==="aborted")return p;(c.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(c.value,y.value)}return{status:t.value,value:o}}}}be.create=(r,e,t)=>new be({valueType:e,keyType:r,typeName:m.ZodMap,..._(t)});class W extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return l(n,{code:d.invalid_type,expected:f.set,received:n.parsedType}),p;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(l(n,{code:d.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(l(n,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const a=this._def.valueType;function i(u){const c=new Set;for(const y of u){if(y.status==="aborted")return p;y.status==="dirty"&&t.dirty(),c.add(y.value)}return{status:t.value,value:c}}const o=[...n.data.values()].map((u,c)=>a._parse(new A(n,u,n.path,c)));return n.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,t){return new W({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new W({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}W.create=(r,e)=>new W({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,..._(e)});class H extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return l(t,{code:d.invalid_type,expected:f.function,received:t.parsedType}),p;function n(o,u){return ve({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_e(),G].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:u}})}function s(o,u){return ve({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_e(),G].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof X){const o=this;return S(async function(...u){const c=new O([]),y=await o._def.args.parseAsync(u,a).catch(ye=>{throw c.addIssue(n(u,ye)),c}),N=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(N,a).catch(ye=>{throw c.addIssue(s(N,ye)),c})})}else{const o=this;return S(function(...u){const c=o._def.args.safeParse(u,a);if(!c.success)throw new O([n(u,c.error)]);const y=Reflect.apply(i,this,c.data),N=o._def.returns.safeParse(y,a);if(!N.success)throw new O([s(y,N.error)]);return N.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new H({...this._def,args:M.create(e).rest(q.create())})}returns(e){return new H({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new H({args:e||M.create([]).rest(q.create()),returns:t||q.create(),typeName:m.ZodFunction,..._(n)})}}class de extends v{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})}}de.create=(r,e)=>new de({getter:r,typeName:m.ZodLazy,..._(e)});class ce extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}ce.create=(r,e)=>new ce({value:r,typeName:m.ZodLiteral,..._(e)});function Ue(r,e){return new L({values:r,typeName:m.ZodEnum,..._(e)})}class L extends v{constructor(){super(...arguments),Q.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return l(t,{expected:x.joinValues(n),received:t.parsedType,code:d.invalid_type}),p}if(ge(this,Q)||ze(this,Q,new Set(this._def.values)),!ge(this,Q).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:n}),p}return S(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,t=this._def){return L.create(e,{...this._def,...t})}exclude(e,t=this._def){return L.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}Q=new WeakMap;L.create=Ue;class ue extends v{constructor(){super(...arguments),F.set(this,void 0)}_parse(e){const t=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const s=x.objectValues(t);return l(n,{expected:x.joinValues(s),received:n.parsedType,code:d.invalid_type}),p}if(ge(this,F)||ze(this,F,new Set(x.getValidEnumValues(this._def.values))),!ge(this,F).has(e.data)){const s=x.objectValues(t);return l(n,{received:n.data,code:d.invalid_enum_value,options:s}),p}return S(e.data)}get enum(){return this._def.values}}F=new WeakMap;ue.create=(r,e)=>new ue({values:r,typeName:m.ZodNativeEnum,..._(e)});class X extends v{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),p;const n=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return S(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}X.create=(r,e)=>new X({type:r,typeName:m.ZodPromise,..._(e)});class R extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{l(n,i),i.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;const u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?p:u.status==="dirty"||t.value==="dirty"?J(u.value):u});{if(t.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?p:o.status==="dirty"||t.value==="dirty"?J(o.value):o}}if(s.type==="refinement"){const i=o=>{const u=s.refinement(o,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ee(i))return i;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>ee(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);x.assertNever(s)}}R.create=(r,e,t)=>new R({schema:r,typeName:m.ZodEffects,effect:e,..._(t)});R.createWithPreprocess=(r,e,t)=>new R({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,..._(t)});class j extends v{_parse(e){return this._getType(e)===f.undefined?S(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(r,e)=>new j({innerType:r,typeName:m.ZodOptional,..._(e)});class U extends v{_parse(e){return this._getType(e)===f.null?S(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}U.create=(r,e)=>new U({innerType:r,typeName:m.ZodNullable,..._(e)});class le extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}le.create=(r,e)=>new le({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class fe extends v{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return te(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new O(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new O(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}fe.create=(r,e)=>new fe({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class we extends v{_parse(e){if(this._getType(e)!==f.nan){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.nan,received:n.parsedType}),p}return{status:"valid",value:e.data}}}we.create=r=>new we({typeName:m.ZodNaN,..._(r)});const yt=Symbol("zod_brand");class Ie extends v{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class pe extends v{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),J(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?p:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new pe({in:e,out:t,typeName:m.ZodPipeline})}}class he extends v{_parse(e){const t=this._def.innerType._parse(e),n=s=>(ee(s)&&(s.value=Object.freeze(s.value)),s);return te(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}}he.create=(r,e)=>new he({innerType:r,typeName:m.ZodReadonly,..._(e)});function qe(r,e={},t){return r?K.create().superRefine((n,s)=>{var a,i;if(!r(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,c=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...c,fatal:u})}}):K.create()}const _t={object:k.lazycreate};var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const vt=(r,e={message:`Input not instance of ${r.name}`})=>qe(t=>t instanceof r,e),Be=E.create,We=V.create,gt=we.create,xt=D.create,Ye=re.create,kt=B.create,bt=xe.create,wt=ne.create,Tt=se.create,Zt=K.create,St=q.create,Ct=$.create,Nt=ke.create,Ot=I.create,Et=k.create,It=k.strictCreate,Rt=ae.create,jt=Te.create,At=ie.create,Mt=M.create,Pt=oe.create,$t=be.create,zt=W.create,Vt=H.create,Dt=de.create,Lt=ce.create,Ut=L.create,qt=ue.create,Bt=X.create,Ae=R.create,Wt=j.create,Yt=U.create,Jt=R.createWithPreprocess,Ht=pe.create,Gt=()=>Be().optional(),Kt=()=>We().optional(),Xt=()=>Ye().optional(),Qt={string:r=>E.create({...r,coerce:!0}),number:r=>V.create({...r,coerce:!0}),boolean:r=>re.create({...r,coerce:!0}),bigint:r=>D.create({...r,coerce:!0}),date:r=>B.create({...r,coerce:!0})},Ft=p;var C=Object.freeze({__proto__:null,defaultErrorMap:G,setErrorMap:Fe,getErrorMap:_e,makeIssue:ve,EMPTY_PATH:et,addIssueToContext:l,ParseStatus:Z,INVALID:p,DIRTY:J,OK:S,isAborted:Ne,isDirty:Oe,isValid:ee,isAsync:te,get util(){return x},get objectUtil(){return Ce},ZodParsedType:f,getParsedType:z,ZodType:v,datetimeRegex:Le,ZodString:E,ZodNumber:V,ZodBigInt:D,ZodBoolean:re,ZodDate:B,ZodSymbol:xe,ZodUndefined:ne,ZodNull:se,ZodAny:K,ZodUnknown:q,ZodNever:$,ZodVoid:ke,ZodArray:I,ZodObject:k,ZodUnion:ae,ZodDiscriminatedUnion:Te,ZodIntersection:ie,ZodTuple:M,ZodRecord:oe,ZodMap:be,ZodSet:W,ZodFunction:H,ZodLazy:de,ZodLiteral:ce,ZodEnum:L,ZodNativeEnum:ue,ZodPromise:X,ZodEffects:R,ZodTransformer:R,ZodOptional:j,ZodNullable:U,ZodDefault:le,ZodCatch:fe,ZodNaN:we,BRAND:yt,ZodBranded:Ie,ZodPipeline:pe,ZodReadonly:he,custom:qe,Schema:v,ZodSchema:v,late:_t,get ZodFirstPartyTypeKind(){return m},coerce:Qt,any:Zt,array:Ot,bigint:xt,boolean:Ye,date:kt,discriminatedUnion:jt,effect:Ae,enum:Ut,function:Vt,instanceof:vt,intersection:At,lazy:Dt,literal:Lt,map:$t,nan:gt,nativeEnum:qt,never:Ct,null:Tt,nullable:Yt,number:We,object:Et,oboolean:Xt,onumber:Kt,optional:Wt,ostring:Gt,pipeline:Ht,preprocess:Jt,promise:Bt,record:Pt,set:zt,strictObject:It,string:Be,symbol:bt,transformer:Ae,tuple:Mt,undefined:wt,union:Rt,unknown:St,void:Nt,NEVER:Ft,ZodIssueCode:d,quotelessJson:Qe,ZodError:O});const er=()=>{const{formValidationTexts:r}=He.useContext(me.LuminusComponentsContext),e=g=>(g!=null&&g.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).transform(w=>w??null),t=g=>e(g).nullable().optional().transform(b=>b??null),n=g=>(g!=null&&g.useCoerce?C.coerce:C).number({invalid_type_error:r.required}).min((g==null?void 0:g.min)??Number.NEGATIVE_INFINITY).max((g==null?void 0:g.max)??Number.POSITIVE_INFINITY).transform(w=>w??null),s=g=>n(g).nullable().optional().transform(b=>b??null),a=g=>(g!=null&&g.useCoerce?C.coerce:C).boolean({invalid_type_error:r.required}).transform(b=>b??null),i=g=>(g!=null&&g.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).refine(Ke.isISODate,{message:r.invalidDate}).transform(w=>w??null),o=g=>i(g).nullable().transform(b=>b??null),u=(g,b)=>C.enum(g,{invalid_type_error:r.required}).transform(Re=>Re??null);return{zString:t,zStringRequired:e,zNumber:s,zNumberRequired:n,zBool:a,zDate:o,zDateRequired:i,zEnum:(g,b)=>u(g).nullable().transform(w=>w??null),zEnumRequired:u,zObjectIdInt:g=>C.object({id:s({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdIntRequired:g=>C.object({id:n()}).transform(w=>w??null),zObjectIdStr:g=>C.object({id:t({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdStrRequired:g=>C.object({id:e()}).transform(w=>w??null),zFile:({required:g,multiple:b,maxFileSize:w})=>C.any().transform(T=>Array.from(T??[])).refine(T=>!g||(T==null?void 0:T.length)>0,"File is required.").refine(T=>b||(T==null?void 0:T.length)<=1,"Multiple files not allowed.").refine(T=>T.every(Je=>Je.size<=w),`Maximum file size is ${Ge.formatFileSize(w)}.`).transform(T=>(b?T:T==null?void 0:T[0])??null)}};exports.cancelToken=me.cancelToken;exports.useAuth=me.useAuth;exports.useAxios=me.useAxios;exports.useNotifications=me.useNotifications;exports.useConfirm=Me.useConfirm;exports.usePrompt=Me.usePrompt;exports.useClickOutside=Pe.useClickOutside;exports.useKeyPress=Pe.useKeyPress;exports.usePermissions=Xe.usePermissions;exports.useZodSchemaTypes=er;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const me=require("./UserAvatarToggle-rzyVxLmG.cjs"),Me=require("./useConfirm-9zGqmWEb.cjs"),He=require("react"),Ge=require("./textUtils-CHVVh2oi.cjs"),Ke=require("./dateUtils-CWKBTsx7.cjs");require("react-hook-form");const Pe=require("./useKeyPress-BRCIx392.cjs"),Xe=require("./usePermissions-CO93mmCn.cjs");var x;(function(r){r.assertEqual=s=>s;function e(s){}r.assertIs=e;function t(s){throw new Error}r.assertNever=t,r.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},r.getValidEnumValues=s=>{const a=r.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return r.objectValues(i)},r.objectValues=s=>r.objectKeys(s).map(function(a){return s[a]}),r.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},r.find=(s,a)=>{for(const i of s)if(a(i))return i},r.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var Ce;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Ce||(Ce={}));const f=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),z=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(r)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},d=x.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"]),Qe=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class N extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let o=n,u=0;for(;u<i.path.length;){const c=i.path[u];u===i.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(i))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return s(this),n}static assert(e){if(!(e instanceof N))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},n=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):n.push(e(s));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}N.create=r=>new N(r);const G=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}};let $e=G;function Fe(r){$e=r}function ve(){return $e}const _e=r=>{const{data:e,path:t,errorMaps:n,issueData:s}=r,a=[...t,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const u=n.filter(c=>!!c).slice().reverse();for(const c of u)o=c(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},et=[];function l(r,e){const t=ve(),n=_e({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===G?void 0:G].filter(s=>!!s)});r.common.issues.push(n)}class Z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const s of t){if(s.status==="aborted")return p;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const s of t){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return Z.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const s of t){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return p;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const p=Object.freeze({status:"aborted"}),J=r=>({status:"dirty",value:r}),S=r=>({status:"valid",value:r}),Oe=r=>r.status==="aborted",Ne=r=>r.status==="dirty",ee=r=>r.status==="valid",te=r=>typeof Promise<"u"&&r instanceof Promise;function ge(r,e,t,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function ze(r,e,t,n,s){if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));var Q,F;class A{constructor(e,t,n,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const je=(r,e)=>{if(ee(e))return{success:!0,data:e.value};if(!r.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 N(r.common.issues);return this._error=t,this._error}}};function v(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:s}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{var u,c;const{message:y}=r;return i.code==="invalid_enum_value"?{message:y??o.defaultError}:typeof o.data>"u"?{message:(u=y??n)!==null&&u!==void 0?u:o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:(c=y??t)!==null&&c!==void 0?c:o.defaultError}},description:s}}class _{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)}get description(){return this._def.description}_getType(e){return z(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Z,ctx:{common:e.parent.common,data:e.data,parsedType:z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(te(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 n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const s={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)},a=this._parseSync({data:e,path:s.path,parent:s});return je(s,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:z(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(te(s)?s:Promise.resolve(s));return je(n,a)}refine(e,t){const n=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:d.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof t=="function"?t(n,s):t),!1))}_refinement(e){return new I({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return j.create(this,this._def)}nullable(){return U.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return R.create(this,this._def)}promise(){return X.create(this,this._def)}or(e){return ae.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new I({...v(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new le({...v(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Re({typeName:m.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new fe({...v(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pe.create(this,e)}readonly(){return he.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tt=/^c[^\s-]{8,}$/i,rt=/^[0-9a-z]+$/,nt=/^[0-9A-HJKMNP-TV-Z]{26}$/,st=/^[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,at=/^[a-z0-9_-]{21}$/i,it=/^[-+]?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)?)??$/,ot=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Se;const ct=/^(?:(?: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])$/,ut=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,lt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ve="((\\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])))",ft=new RegExp(`^${Ve}$`);function De(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function ht(r){return new RegExp(`^${De(r)}$`)}function Le(r){let e=`${Ve}T${De(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function mt(r,e){return!!((e==="v4"||!e)&&ct.test(r)||(e==="v6"||!e)&&ut.test(r))}class E extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.string,received:a.parsedType}),p}const n=new Z;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?l(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")ot.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"email",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Se||(Se=new RegExp(dt,"u")),Se.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"emoji",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")st.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"uuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")at.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"nanoid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")tt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")rt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid2",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")nt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ulid",code:d.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),l(s,{validation:"url",code:d.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"regex",code:d.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?Le(a).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?ft.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?ht(a).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?it.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"duration",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?mt(e.data,a.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ip",code:d.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?lt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64",code:d.invalid_string,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_regex(e,t,n){return this.refinement(s=>e.test(s),{validation:t,code:d.invalid_string,...h.errToObj(n)})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}E.create=r=>{var e;return new E({checks:[],typeName:m.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};function pt(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=t>n?t:n,a=parseInt(r.toFixed(s).replace(".","")),i=parseInt(e.toFixed(s).replace(".",""));return a%i/Math.pow(10,s)}class V extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==f.number){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.number,received:a.parsedType}),p}let n;const s=new Z;for(const a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?pt(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_finite,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}V.create=r=>new V({checks:[],typeName:m.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class D extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==f.bigint){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.bigint,received:a.parsedType}),p}let n;const s=new Z;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),l(n,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,n,s){return new D({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:h.toString(s)}]})}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}D.create=r=>{var e;return new D({checks:[],typeName:m.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...v(r)})};class re extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.boolean,received:n.parsedType}),p}return S(e.data)}}re.create=r=>new re({typeName:m.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...v(r)});class B extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_type,expected:f.date,received:a.parsedType}),p}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:d.invalid_date}),p}const n=new Z;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):x.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}B.create=r=>new B({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:m.ZodDate,...v(r)});class xe extends _{_parse(e){if(this._getType(e)!==f.symbol){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.symbol,received:n.parsedType}),p}return S(e.data)}}xe.create=r=>new xe({typeName:m.ZodSymbol,...v(r)});class ne extends _{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.undefined,received:n.parsedType}),p}return S(e.data)}}ne.create=r=>new ne({typeName:m.ZodUndefined,...v(r)});class se extends _{_parse(e){if(this._getType(e)!==f.null){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.null,received:n.parsedType}),p}return S(e.data)}}se.create=r=>new se({typeName:m.ZodNull,...v(r)});class K extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return S(e.data)}}K.create=r=>new K({typeName:m.ZodAny,...v(r)});class q extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return S(e.data)}}q.create=r=>new q({typeName:m.ZodUnknown,...v(r)});class $ extends _{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),p}}$.create=r=>new $({typeName:m.ZodNever,...v(r)});class ke extends _{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.void,received:n.parsedType}),p}return S(e.data)}}ke.create=r=>new ke({typeName:m.ZodVoid,...v(r)});class R extends _{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),s=this._def;if(t.parsedType!==f.array)return l(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),p;if(s.exactLength!==null){const i=t.data.length>s.exactLength.value,o=t.data.length<s.exactLength.value;(i||o)&&(l(t,{code:i?d.too_big:d.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(l(t,{code:d.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(l(t,{code:d.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>s.type._parseAsync(new A(t,i,t.path,o)))).then(i=>Z.mergeArray(n,i));const a=[...t.data].map((i,o)=>s.type._parseSync(new A(t,i,t.path,o)));return Z.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new R({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new R({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new R({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}R.create=(r,e)=>new R({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...v(e)});function Y(r){if(r instanceof k){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=j.create(Y(n))}return new k({...r._def,shape:()=>e})}else return r instanceof R?new R({...r._def,type:Y(r.element)}):r instanceof j?j.create(Y(r.unwrap())):r instanceof U?U.create(Y(r.unwrap())):r instanceof M?M.create(r.items.map(e=>Y(e))):r}class k extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==f.object){const c=this._getOrReturnCtx(e);return l(c,{code:d.invalid_type,expected:f.object,received:c.parsedType}),p}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||o.push(c);const u=[];for(const c of i){const y=a[c],O=s.data[c];u.push({key:{status:"valid",value:c},value:y._parse(new A(s,O,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof $){const c=this._def.unknownKeys;if(c==="passthrough")for(const y of o)u.push({key:{status:"valid",value:y},value:{status:"valid",value:s.data[y]}});else if(c==="strict")o.length>0&&(l(s,{code:d.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const y of o){const O=s.data[y];u.push({key:{status:"valid",value:y},value:c._parse(new A(s,O,s.path,y)),alwaysSet:y in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const y of u){const O=await y.key,Ze=await y.value;c.push({key:O,value:Ze,alwaysSet:y.alwaysSet})}return c}).then(c=>Z.mergeObjectSync(n,c)):Z.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var s,a,i,o;const u=(i=(a=(s=this._def).errorMap)===null||a===void 0?void 0:a.call(s,t,n).message)!==null&&i!==void 0?i:n.defaultError;return t.code==="unrecognized_keys"?{message:(o=h.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const t={};return x.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new k({...this._def,shape:()=>t})}omit(e){const t={};return x.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new k({...this._def,shape:()=>t})}deepPartial(){return Y(this)}partial(e){const t={};return x.objectKeys(this.shape).forEach(n=>{const s=this.shape[n];e&&!e[n]?t[n]=s:t[n]=s.optional()}),new k({...this._def,shape:()=>t})}required(e){const t={};return x.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof j;)a=a._def.innerType;t[n]=a}}),new k({...this._def,shape:()=>t})}keyof(){return Ue(x.objectKeys(this.shape))}}k.create=(r,e)=>new k({shape:()=>r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...v(e)});k.strictCreate=(r,e)=>new k({shape:()=>r,unknownKeys:"strict",catchall:$.create(),typeName:m.ZodObject,...v(e)});k.lazycreate=(r,e)=>new k({shape:r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...v(e)});class ae extends _{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new N(o.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(n.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const u of n){const c={...t,common:{...t.common,issues:[]},parent:null},y=u._parseSync({data:t.data,path:t.path,parent:c});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:c}),c.common.issues.length&&i.push(c.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(u=>new N(u));return l(t,{code:d.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}ae.create=(r,e)=>new ae({options:r,typeName:m.ZodUnion,...v(e)});const P=r=>r instanceof de?P(r.schema):r instanceof I?P(r.innerType()):r instanceof ce?[r.value]:r instanceof L?r.options:r instanceof ue?x.objectValues(r.enum):r instanceof le?P(r._def.innerType):r instanceof ne?[void 0]:r instanceof se?[null]:r instanceof j?[void 0,...P(r.unwrap())]:r instanceof U?[null,...P(r.unwrap())]:r instanceof Re||r instanceof he?P(r.unwrap()):r instanceof fe?P(r._def.innerType):[];class Te extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return l(t,{code:d.invalid_type,expected:f.object,received:t.parsedType}),p;const n=this.discriminator,s=t.data[n],a=this.optionsMap.get(s);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const s=new Map;for(const a of t){const i=P(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new Te({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...v(n)})}}function Ee(r,e){const t=z(r),n=z(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&n===f.object){const s=x.objectKeys(e),a=x.objectKeys(r).filter(o=>s.indexOf(o)!==-1),i={...r,...e};for(const o of a){const u=Ee(r[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(t===f.array&&n===f.array){if(r.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<r.length;a++){const i=r[a],o=e[a],u=Ee(i,o);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return t===f.date&&n===f.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class ie extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Oe(a)||Oe(i))return p;const o=Ee(a.value,i.value);return o.valid?((Ne(a)||Ne(i))&&t.dirty(),{status:t.value,value:o.data}):(l(n,{code:d.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ie.create=(r,e,t)=>new ie({left:r,right:e,typeName:m.ZodIntersection,...v(t)});class M extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return l(n,{code:d.invalid_type,expected:f.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return l(n,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(l(n,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((i,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new A(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>Z.mergeArray(t,i)):Z.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:r,typeName:m.ZodTuple,rest:null,...v(e)})};class oe extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return l(n,{code:d.invalid_type,expected:f.object,received:n.parsedType}),p;const s=[],a=this._def.keyType,i=this._def.valueType;for(const o in n.data)s.push({key:a._parse(new A(n,o,n.path,o)),value:i._parse(new A(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?Z.mergeObjectAsync(t,s):Z.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof _?new oe({keyType:e,valueType:t,typeName:m.ZodRecord,...v(n)}):new oe({keyType:E.create(),valueType:e,typeName:m.ZodRecord,...v(t)})}}class be extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return l(n,{code:d.invalid_type,expected:f.map,received:n.parsedType}),p;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,u],c)=>({key:s._parse(new A(n,o,n.path,[c,"key"])),value:a._parse(new A(n,u,n.path,[c,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of i){const c=await u.key,y=await u.value;if(c.status==="aborted"||y.status==="aborted")return p;(c.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(c.value,y.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const u of i){const c=u.key,y=u.value;if(c.status==="aborted"||y.status==="aborted")return p;(c.status==="dirty"||y.status==="dirty")&&t.dirty(),o.set(c.value,y.value)}return{status:t.value,value:o}}}}be.create=(r,e,t)=>new be({valueType:e,keyType:r,typeName:m.ZodMap,...v(t)});class W extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return l(n,{code:d.invalid_type,expected:f.set,received:n.parsedType}),p;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(l(n,{code:d.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(l(n,{code:d.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const a=this._def.valueType;function i(u){const c=new Set;for(const y of u){if(y.status==="aborted")return p;y.status==="dirty"&&t.dirty(),c.add(y.value)}return{status:t.value,value:c}}const o=[...n.data.values()].map((u,c)=>a._parse(new A(n,u,n.path,c)));return n.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,t){return new W({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new W({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}W.create=(r,e)=>new W({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...v(e)});class H extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return l(t,{code:d.invalid_type,expected:f.function,received:t.parsedType}),p;function n(o,u){return _e({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ve(),G].filter(c=>!!c),issueData:{code:d.invalid_arguments,argumentsError:u}})}function s(o,u){return _e({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ve(),G].filter(c=>!!c),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof X){const o=this;return S(async function(...u){const c=new N([]),y=await o._def.args.parseAsync(u,a).catch(ye=>{throw c.addIssue(n(u,ye)),c}),O=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(O,a).catch(ye=>{throw c.addIssue(s(O,ye)),c})})}else{const o=this;return S(function(...u){const c=o._def.args.safeParse(u,a);if(!c.success)throw new N([n(u,c.error)]);const y=Reflect.apply(i,this,c.data),O=o._def.returns.safeParse(y,a);if(!O.success)throw new N([s(y,O.error)]);return O.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new H({...this._def,args:M.create(e).rest(q.create())})}returns(e){return new H({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new H({args:e||M.create([]).rest(q.create()),returns:t||q.create(),typeName:m.ZodFunction,...v(n)})}}class de extends _{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})}}de.create=(r,e)=>new de({getter:r,typeName:m.ZodLazy,...v(e)});class ce extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}ce.create=(r,e)=>new ce({value:r,typeName:m.ZodLiteral,...v(e)});function Ue(r,e){return new L({values:r,typeName:m.ZodEnum,...v(e)})}class L extends _{constructor(){super(...arguments),Q.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return l(t,{expected:x.joinValues(n),received:t.parsedType,code:d.invalid_type}),p}if(ge(this,Q)||ze(this,Q,new Set(this._def.values)),!ge(this,Q).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:n}),p}return S(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,t=this._def){return L.create(e,{...this._def,...t})}exclude(e,t=this._def){return L.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}Q=new WeakMap;L.create=Ue;class ue extends _{constructor(){super(...arguments),F.set(this,void 0)}_parse(e){const t=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const s=x.objectValues(t);return l(n,{expected:x.joinValues(s),received:n.parsedType,code:d.invalid_type}),p}if(ge(this,F)||ze(this,F,new Set(x.getValidEnumValues(this._def.values))),!ge(this,F).has(e.data)){const s=x.objectValues(t);return l(n,{received:n.data,code:d.invalid_enum_value,options:s}),p}return S(e.data)}get enum(){return this._def.values}}F=new WeakMap;ue.create=(r,e)=>new ue({values:r,typeName:m.ZodNativeEnum,...v(e)});class X extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),p;const n=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return S(n.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}X.create=(r,e)=>new X({type:r,typeName:m.ZodPromise,...v(e)});class I extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{l(n,i),i.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return p;const u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?p:u.status==="dirty"||t.value==="dirty"?J(u.value):u});{if(t.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?p:o.status==="dirty"||t.value==="dirty"?J(o.value):o}}if(s.type==="refinement"){const i=o=>{const u=s.refinement(o,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ee(i))return i;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>ee(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:t.value,value:o})):i);x.assertNever(s)}}I.create=(r,e,t)=>new I({schema:r,typeName:m.ZodEffects,effect:e,...v(t)});I.createWithPreprocess=(r,e,t)=>new I({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...v(t)});class j extends _{_parse(e){return this._getType(e)===f.undefined?S(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(r,e)=>new j({innerType:r,typeName:m.ZodOptional,...v(e)});class U extends _{_parse(e){return this._getType(e)===f.null?S(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}U.create=(r,e)=>new U({innerType:r,typeName:m.ZodNullable,...v(e)});class le extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}le.create=(r,e)=>new le({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class fe extends _{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return te(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new N(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new N(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}fe.create=(r,e)=>new fe({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class we extends _{_parse(e){if(this._getType(e)!==f.nan){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:f.nan,received:n.parsedType}),p}return{status:"valid",value:e.data}}}we.create=r=>new we({typeName:m.ZodNaN,...v(r)});const yt=Symbol("zod_brand");class Re extends _{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class pe extends _{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),J(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?p:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,t){return new pe({in:e,out:t,typeName:m.ZodPipeline})}}class he extends _{_parse(e){const t=this._def.innerType._parse(e),n=s=>(ee(s)&&(s.value=Object.freeze(s.value)),s);return te(t)?t.then(s=>n(s)):n(t)}unwrap(){return this._def.innerType}}he.create=(r,e)=>new he({innerType:r,typeName:m.ZodReadonly,...v(e)});function qe(r,e={},t){return r?K.create().superRefine((n,s)=>{var a,i;if(!r(n)){const o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(i=(a=o.fatal)!==null&&a!==void 0?a:t)!==null&&i!==void 0?i:!0,c=typeof o=="string"?{message:o}:o;s.addIssue({code:"custom",...c,fatal:u})}}):K.create()}const vt={object:k.lazycreate};var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const _t=(r,e={message:`Input not instance of ${r.name}`})=>qe(t=>t instanceof r,e),Be=E.create,We=V.create,gt=we.create,xt=D.create,Ye=re.create,kt=B.create,bt=xe.create,wt=ne.create,Tt=se.create,Zt=K.create,St=q.create,Ct=$.create,Ot=ke.create,Nt=R.create,Et=k.create,Rt=k.strictCreate,It=ae.create,jt=Te.create,At=ie.create,Mt=M.create,Pt=oe.create,$t=be.create,zt=W.create,Vt=H.create,Dt=de.create,Lt=ce.create,Ut=L.create,qt=ue.create,Bt=X.create,Ae=I.create,Wt=j.create,Yt=U.create,Jt=I.createWithPreprocess,Ht=pe.create,Gt=()=>Be().optional(),Kt=()=>We().optional(),Xt=()=>Ye().optional(),Qt={string:r=>E.create({...r,coerce:!0}),number:r=>V.create({...r,coerce:!0}),boolean:r=>re.create({...r,coerce:!0}),bigint:r=>D.create({...r,coerce:!0}),date:r=>B.create({...r,coerce:!0})},Ft=p;var C=Object.freeze({__proto__:null,defaultErrorMap:G,setErrorMap:Fe,getErrorMap:ve,makeIssue:_e,EMPTY_PATH:et,addIssueToContext:l,ParseStatus:Z,INVALID:p,DIRTY:J,OK:S,isAborted:Oe,isDirty:Ne,isValid:ee,isAsync:te,get util(){return x},get objectUtil(){return Ce},ZodParsedType:f,getParsedType:z,ZodType:_,datetimeRegex:Le,ZodString:E,ZodNumber:V,ZodBigInt:D,ZodBoolean:re,ZodDate:B,ZodSymbol:xe,ZodUndefined:ne,ZodNull:se,ZodAny:K,ZodUnknown:q,ZodNever:$,ZodVoid:ke,ZodArray:R,ZodObject:k,ZodUnion:ae,ZodDiscriminatedUnion:Te,ZodIntersection:ie,ZodTuple:M,ZodRecord:oe,ZodMap:be,ZodSet:W,ZodFunction:H,ZodLazy:de,ZodLiteral:ce,ZodEnum:L,ZodNativeEnum:ue,ZodPromise:X,ZodEffects:I,ZodTransformer:I,ZodOptional:j,ZodNullable:U,ZodDefault:le,ZodCatch:fe,ZodNaN:we,BRAND:yt,ZodBranded:Re,ZodPipeline:pe,ZodReadonly:he,custom:qe,Schema:_,ZodSchema:_,late:vt,get ZodFirstPartyTypeKind(){return m},coerce:Qt,any:Zt,array:Nt,bigint:xt,boolean:Ye,date:kt,discriminatedUnion:jt,effect:Ae,enum:Ut,function:Vt,instanceof:_t,intersection:At,lazy:Dt,literal:Lt,map:$t,nan:gt,nativeEnum:qt,never:Ct,null:Tt,nullable:Yt,number:We,object:Et,oboolean:Xt,onumber:Kt,optional:Wt,ostring:Gt,pipeline:Ht,preprocess:Jt,promise:Bt,record:Pt,set:zt,strictObject:Rt,string:Be,symbol:bt,transformer:Ae,tuple:Mt,undefined:wt,union:It,unknown:St,void:Ot,NEVER:Ft,ZodIssueCode:d,quotelessJson:Qe,ZodError:N});const er=()=>{const{formValidationTexts:r}=He.useContext(me.LuminusComponentsContext),e=g=>(g!=null&&g.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).transform(w=>w??null),t=g=>e(g).nullable().optional().transform(b=>b??null),n=g=>{const b=(g!=null&&g.useCoerce?C.coerce:C).number({invalid_type_error:r.required});return(g==null?void 0:g.min)!==void 0&&b.min(g.min),(g==null?void 0:g.max)!==void 0&&b.max(g.max),b.transform(w=>w??null)},s=g=>n(g).nullable().optional().transform(b=>b??null),a=g=>(g!=null&&g.useCoerce?C.coerce:C).boolean({invalid_type_error:r.required}).transform(b=>b??null),i=g=>(g!=null&&g.useCoerce?C.coerce:C).string({invalid_type_error:r.required}).refine(Ke.isISODate,{message:r.invalidDate}).transform(w=>w??null),o=g=>i(g).nullable().transform(b=>b??null),u=(g,b)=>C.enum(g,{invalid_type_error:r.required}).transform(Ie=>Ie??null);return{zString:t,zStringRequired:e,zNumber:s,zNumberRequired:n,zBool:a,zDate:o,zDateRequired:i,zEnum:(g,b)=>u(g).nullable().transform(w=>w??null),zEnumRequired:u,zObjectIdInt:g=>C.object({id:s({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdIntRequired:g=>C.object({id:n()}).transform(w=>w??null),zObjectIdStr:g=>C.object({id:t({useCoerce:!0})}).nullable().transform(w=>w??null),zObjectIdStrRequired:g=>C.object({id:e()}).transform(w=>w??null),zFile:({required:g,multiple:b,maxFileSize:w})=>C.any().transform(T=>Array.from(T??[])).refine(T=>!g||(T==null?void 0:T.length)>0,"File is required.").refine(T=>b||(T==null?void 0:T.length)<=1,"Multiple files not allowed.").refine(T=>T.every(Je=>Je.size<=w),`Maximum file size is ${Ge.formatFileSize(w)}.`).transform(T=>(b?T:T==null?void 0:T[0])??null)}};exports.cancelToken=me.cancelToken;exports.useAuth=me.useAuth;exports.useAxios=me.useAxios;exports.useNotifications=me.useNotifications;exports.useConfirm=Me.useConfirm;exports.usePrompt=Me.usePrompt;exports.useClickOutside=Pe.useClickOutside;exports.useKeyPress=Pe.useKeyPress;exports.usePermissions=Xe.usePermissions;exports.useZodSchemaTypes=er;
package/dist/hooks.es.js CHANGED
@@ -72,7 +72,7 @@ const f = x.arrayToEnum([
72
72
  "never",
73
73
  "map",
74
74
  "set"
75
- ]), z = (r) => {
75
+ ]), P = (r) => {
76
76
  switch (typeof r) {
77
77
  case "undefined":
78
78
  return f.undefined;
@@ -111,7 +111,7 @@ const f = x.arrayToEnum([
111
111
  "not_multiple_of",
112
112
  "not_finite"
113
113
  ]), Ge = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
114
- class O extends Error {
114
+ class N extends Error {
115
115
  constructor(e) {
116
116
  super(), this.issues = [], this.addIssue = (n) => {
117
117
  this.issues = [...this.issues, n];
@@ -148,7 +148,7 @@ class O extends Error {
148
148
  return s(this), n;
149
149
  }
150
150
  static assert(e) {
151
- if (!(e instanceof O))
151
+ if (!(e instanceof N))
152
152
  throw new Error(`Not a ZodError: ${e}`);
153
153
  }
154
154
  toString() {
@@ -170,7 +170,7 @@ class O extends Error {
170
170
  return this.flatten();
171
171
  }
172
172
  }
173
- O.create = (r) => new O(r);
173
+ N.create = (r) => new N(r);
174
174
  const G = (r, e) => {
175
175
  let t;
176
176
  switch (r.code) {
@@ -313,7 +313,7 @@ class Z {
313
313
  }
314
314
  const p = Object.freeze({
315
315
  status: "aborted"
316
- }), J = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ce = (r) => r.status === "aborted", Ne = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
316
+ }), J = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ce = (r) => r.status === "aborted", Oe = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
317
317
  function ve(r, e, t, n) {
318
318
  if (typeof e == "function" ? r !== e || !n : !e.has(r))
319
319
  throw new TypeError("Cannot read private member from an object whose class did not declare it");
@@ -337,7 +337,7 @@ class A {
337
337
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
338
338
  }
339
339
  }
340
- const Re = (r, e) => {
340
+ const Ie = (r, e) => {
341
341
  if (ee(e))
342
342
  return { success: !0, data: e.value };
343
343
  if (!r.common.issues.length)
@@ -347,7 +347,7 @@ const Re = (r, e) => {
347
347
  get error() {
348
348
  if (this._error)
349
349
  return this._error;
350
- const t = new O(r.common.issues);
350
+ const t = new N(r.common.issues);
351
351
  return this._error = t, this._error;
352
352
  }
353
353
  };
@@ -372,13 +372,13 @@ class v {
372
372
  return this._def.description;
373
373
  }
374
374
  _getType(e) {
375
- return z(e.data);
375
+ return P(e.data);
376
376
  }
377
377
  _getOrReturnCtx(e, t) {
378
378
  return t || {
379
379
  common: e.parent.common,
380
380
  data: e.data,
381
- parsedType: z(e.data),
381
+ parsedType: P(e.data),
382
382
  schemaErrorMap: this._def.errorMap,
383
383
  path: e.path,
384
384
  parent: e.parent
@@ -390,7 +390,7 @@ class v {
390
390
  ctx: {
391
391
  common: e.parent.common,
392
392
  data: e.data,
393
- parsedType: z(e.data),
393
+ parsedType: P(e.data),
394
394
  schemaErrorMap: this._def.errorMap,
395
395
  path: e.path,
396
396
  parent: e.parent
@@ -425,9 +425,9 @@ class v {
425
425
  schemaErrorMap: this._def.errorMap,
426
426
  parent: null,
427
427
  data: e,
428
- parsedType: z(e)
428
+ parsedType: P(e)
429
429
  }, a = this._parseSync({ data: e, path: s.path, parent: s });
430
- return Re(s, a);
430
+ return Ie(s, a);
431
431
  }
432
432
  async parseAsync(e, t) {
433
433
  const n = await this.safeParseAsync(e, t);
@@ -446,9 +446,9 @@ class v {
446
446
  schemaErrorMap: this._def.errorMap,
447
447
  parent: null,
448
448
  data: e,
449
- parsedType: z(e)
449
+ parsedType: P(e)
450
450
  }, s = this._parse({ data: e, path: n.path, parent: n }), a = await (te(s) ? s : Promise.resolve(s));
451
- return Re(n, a);
451
+ return Ie(n, a);
452
452
  }
453
453
  refine(e, t) {
454
454
  const n = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
@@ -464,7 +464,7 @@ class v {
464
464
  return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof t == "function" ? t(n, s) : t), !1));
465
465
  }
466
466
  _refinement(e) {
467
- return new R({
467
+ return new I({
468
468
  schema: this,
469
469
  typeName: m.ZodEffects,
470
470
  effect: { type: "refinement", refinement: e }
@@ -483,7 +483,7 @@ class v {
483
483
  return this.nullable().optional();
484
484
  }
485
485
  array() {
486
- return I.create(this, this._def);
486
+ return R.create(this, this._def);
487
487
  }
488
488
  promise() {
489
489
  return K.create(this, this._def);
@@ -495,7 +495,7 @@ class v {
495
495
  return ie.create(this, e, this._def);
496
496
  }
497
497
  transform(e) {
498
- return new R({
498
+ return new I({
499
499
  ..._(this._def),
500
500
  schema: this,
501
501
  typeName: m.ZodEffects,
@@ -550,15 +550,15 @@ class v {
550
550
  const Qe = /^c[^\s-]{8,}$/i, Fe = /^[0-9a-z]+$/, et = /^[0-9A-HJKMNP-TV-Z]{26}$/, tt = /^[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, rt = /^[a-z0-9_-]{21}$/i, nt = /^[-+]?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)?)??$/, st = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, at = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
551
551
  let Ze;
552
552
  const it = /^(?:(?: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])$/, ot = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, dt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, $e = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ct = new RegExp(`^${$e}$`);
553
- function Pe(r) {
553
+ function ze(r) {
554
554
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
555
555
  return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
556
556
  }
557
557
  function ut(r) {
558
- return new RegExp(`^${Pe(r)}$`);
558
+ return new RegExp(`^${ze(r)}$`);
559
559
  }
560
- function ze(r) {
561
- let e = `${$e}T${Pe(r)}`;
560
+ function Pe(r) {
561
+ let e = `${$e}T${ze(r)}`;
562
562
  const t = [];
563
563
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
564
564
  }
@@ -682,7 +682,7 @@ class E extends v {
682
682
  code: d.invalid_string,
683
683
  validation: { endsWith: a.value },
684
684
  message: a.message
685
- }), n.dirty()) : a.kind === "datetime" ? ze(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
685
+ }), n.dirty()) : a.kind === "datetime" ? Pe(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
686
686
  code: d.invalid_string,
687
687
  validation: "datetime",
688
688
  message: a.message
@@ -1399,7 +1399,7 @@ B.create = (r) => new B({
1399
1399
  typeName: m.ZodUnknown,
1400
1400
  ..._(r)
1401
1401
  });
1402
- class P extends v {
1402
+ class z extends v {
1403
1403
  _parse(e) {
1404
1404
  const t = this._getOrReturnCtx(e);
1405
1405
  return l(t, {
@@ -1409,7 +1409,7 @@ class P extends v {
1409
1409
  }), p;
1410
1410
  }
1411
1411
  }
1412
- P.create = (r) => new P({
1412
+ z.create = (r) => new z({
1413
1413
  typeName: m.ZodNever,
1414
1414
  ..._(r)
1415
1415
  });
@@ -1430,7 +1430,7 @@ xe.create = (r) => new xe({
1430
1430
  typeName: m.ZodVoid,
1431
1431
  ..._(r)
1432
1432
  });
1433
- class I extends v {
1433
+ class R extends v {
1434
1434
  _parse(e) {
1435
1435
  const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
1436
1436
  if (t.parsedType !== f.array)
@@ -1474,19 +1474,19 @@ class I extends v {
1474
1474
  return this._def.type;
1475
1475
  }
1476
1476
  min(e, t) {
1477
- return new I({
1477
+ return new R({
1478
1478
  ...this._def,
1479
1479
  minLength: { value: e, message: h.toString(t) }
1480
1480
  });
1481
1481
  }
1482
1482
  max(e, t) {
1483
- return new I({
1483
+ return new R({
1484
1484
  ...this._def,
1485
1485
  maxLength: { value: e, message: h.toString(t) }
1486
1486
  });
1487
1487
  }
1488
1488
  length(e, t) {
1489
- return new I({
1489
+ return new R({
1490
1490
  ...this._def,
1491
1491
  exactLength: { value: e, message: h.toString(t) }
1492
1492
  });
@@ -1495,7 +1495,7 @@ class I extends v {
1495
1495
  return this.min(1, e);
1496
1496
  }
1497
1497
  }
1498
- I.create = (r, e) => new I({
1498
+ R.create = (r, e) => new R({
1499
1499
  type: r,
1500
1500
  minLength: null,
1501
1501
  maxLength: null,
@@ -1515,7 +1515,7 @@ function Y(r) {
1515
1515
  shape: () => e
1516
1516
  });
1517
1517
  } else
1518
- return r instanceof I ? new I({
1518
+ return r instanceof R ? new R({
1519
1519
  ...r._def,
1520
1520
  type: Y(r.element)
1521
1521
  }) : r instanceof j ? j.create(Y(r.unwrap())) : r instanceof U ? U.create(Y(r.unwrap())) : r instanceof M ? M.create(r.items.map((e) => Y(e))) : r;
@@ -1540,19 +1540,19 @@ class k extends v {
1540
1540
  }), p;
1541
1541
  }
1542
1542
  const { status: n, ctx: s } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), o = [];
1543
- if (!(this._def.catchall instanceof P && this._def.unknownKeys === "strip"))
1543
+ if (!(this._def.catchall instanceof z && this._def.unknownKeys === "strip"))
1544
1544
  for (const c in s.data)
1545
1545
  i.includes(c) || o.push(c);
1546
1546
  const u = [];
1547
1547
  for (const c of i) {
1548
- const y = a[c], N = s.data[c];
1548
+ const y = a[c], O = s.data[c];
1549
1549
  u.push({
1550
1550
  key: { status: "valid", value: c },
1551
- value: y._parse(new A(s, N, s.path, c)),
1551
+ value: y._parse(new A(s, O, s.path, c)),
1552
1552
  alwaysSet: c in s.data
1553
1553
  });
1554
1554
  }
1555
- if (this._def.catchall instanceof P) {
1555
+ if (this._def.catchall instanceof z) {
1556
1556
  const c = this._def.unknownKeys;
1557
1557
  if (c === "passthrough")
1558
1558
  for (const y of o)
@@ -1570,11 +1570,11 @@ class k extends v {
1570
1570
  } else {
1571
1571
  const c = this._def.catchall;
1572
1572
  for (const y of o) {
1573
- const N = s.data[y];
1573
+ const O = s.data[y];
1574
1574
  u.push({
1575
1575
  key: { status: "valid", value: y },
1576
1576
  value: c._parse(
1577
- new A(s, N, s.path, y)
1577
+ new A(s, O, s.path, y)
1578
1578
  //, ctx.child(key), value, getParsedType(value)
1579
1579
  ),
1580
1580
  alwaysSet: y in s.data
@@ -1584,9 +1584,9 @@ class k extends v {
1584
1584
  return s.common.async ? Promise.resolve().then(async () => {
1585
1585
  const c = [];
1586
1586
  for (const y of u) {
1587
- const N = await y.key, Te = await y.value;
1587
+ const O = await y.key, Te = await y.value;
1588
1588
  c.push({
1589
- key: N,
1589
+ key: O,
1590
1590
  value: Te,
1591
1591
  alwaysSet: y.alwaysSet
1592
1592
  });
@@ -1790,21 +1790,21 @@ class k extends v {
1790
1790
  k.create = (r, e) => new k({
1791
1791
  shape: () => r,
1792
1792
  unknownKeys: "strip",
1793
- catchall: P.create(),
1793
+ catchall: z.create(),
1794
1794
  typeName: m.ZodObject,
1795
1795
  ..._(e)
1796
1796
  });
1797
1797
  k.strictCreate = (r, e) => new k({
1798
1798
  shape: () => r,
1799
1799
  unknownKeys: "strict",
1800
- catchall: P.create(),
1800
+ catchall: z.create(),
1801
1801
  typeName: m.ZodObject,
1802
1802
  ..._(e)
1803
1803
  });
1804
1804
  k.lazycreate = (r, e) => new k({
1805
1805
  shape: r,
1806
1806
  unknownKeys: "strip",
1807
- catchall: P.create(),
1807
+ catchall: z.create(),
1808
1808
  typeName: m.ZodObject,
1809
1809
  ..._(e)
1810
1810
  });
@@ -1818,7 +1818,7 @@ class ae extends v {
1818
1818
  for (const o of a)
1819
1819
  if (o.result.status === "dirty")
1820
1820
  return t.common.issues.push(...o.ctx.common.issues), o.result;
1821
- const i = a.map((o) => new O(o.ctx.common.issues));
1821
+ const i = a.map((o) => new N(o.ctx.common.issues));
1822
1822
  return l(t, {
1823
1823
  code: d.invalid_union,
1824
1824
  unionErrors: i
@@ -1865,7 +1865,7 @@ class ae extends v {
1865
1865
  }
1866
1866
  if (a)
1867
1867
  return t.common.issues.push(...a.ctx.common.issues), a.result;
1868
- const o = i.map((u) => new O(u));
1868
+ const o = i.map((u) => new N(u));
1869
1869
  return l(t, {
1870
1870
  code: d.invalid_union,
1871
1871
  unionErrors: o
@@ -1881,7 +1881,7 @@ ae.create = (r, e) => new ae({
1881
1881
  typeName: m.ZodUnion,
1882
1882
  ..._(e)
1883
1883
  });
1884
- const $ = (r) => r instanceof de ? $(r.schema) : r instanceof R ? $(r.innerType()) : r instanceof ce ? [r.value] : r instanceof L ? r.options : r instanceof ue ? x.objectValues(r.enum) : r instanceof le ? $(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof se ? [null] : r instanceof j ? [void 0, ...$(r.unwrap())] : r instanceof U ? [null, ...$(r.unwrap())] : r instanceof Ee || r instanceof he ? $(r.unwrap()) : r instanceof fe ? $(r._def.innerType) : [];
1884
+ const $ = (r) => r instanceof de ? $(r.schema) : r instanceof I ? $(r.innerType()) : r instanceof ce ? [r.value] : r instanceof L ? r.options : r instanceof ue ? x.objectValues(r.enum) : r instanceof le ? $(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof se ? [null] : r instanceof j ? [void 0, ...$(r.unwrap())] : r instanceof U ? [null, ...$(r.unwrap())] : r instanceof Ee || r instanceof he ? $(r.unwrap()) : r instanceof fe ? $(r._def.innerType) : [];
1885
1885
  class we extends v {
1886
1886
  _parse(e) {
1887
1887
  const { ctx: t } = this._processInputParams(e);
@@ -1944,14 +1944,14 @@ class we extends v {
1944
1944
  });
1945
1945
  }
1946
1946
  }
1947
- function Oe(r, e) {
1948
- const t = z(r), n = z(e);
1947
+ function Ne(r, e) {
1948
+ const t = P(r), n = P(e);
1949
1949
  if (r === e)
1950
1950
  return { valid: !0, data: r };
1951
1951
  if (t === f.object && n === f.object) {
1952
1952
  const s = x.objectKeys(e), a = x.objectKeys(r).filter((o) => s.indexOf(o) !== -1), i = { ...r, ...e };
1953
1953
  for (const o of a) {
1954
- const u = Oe(r[o], e[o]);
1954
+ const u = Ne(r[o], e[o]);
1955
1955
  if (!u.valid)
1956
1956
  return { valid: !1 };
1957
1957
  i[o] = u.data;
@@ -1962,7 +1962,7 @@ function Oe(r, e) {
1962
1962
  return { valid: !1 };
1963
1963
  const s = [];
1964
1964
  for (let a = 0; a < r.length; a++) {
1965
- const i = r[a], o = e[a], u = Oe(i, o);
1965
+ const i = r[a], o = e[a], u = Ne(i, o);
1966
1966
  if (!u.valid)
1967
1967
  return { valid: !1 };
1968
1968
  s.push(u.data);
@@ -1976,8 +1976,8 @@ class ie extends v {
1976
1976
  const { status: t, ctx: n } = this._processInputParams(e), s = (a, i) => {
1977
1977
  if (Ce(a) || Ce(i))
1978
1978
  return p;
1979
- const o = Oe(a.value, i.value);
1980
- return o.valid ? ((Ne(a) || Ne(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(n, {
1979
+ const o = Ne(a.value, i.value);
1980
+ return o.valid ? ((Oe(a) || Oe(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(n, {
1981
1981
  code: d.invalid_intersection_types
1982
1982
  }), p);
1983
1983
  };
@@ -2260,11 +2260,11 @@ class H extends v {
2260
2260
  if (this._def.returns instanceof K) {
2261
2261
  const o = this;
2262
2262
  return S(async function(...u) {
2263
- const c = new O([]), y = await o._def.args.parseAsync(u, a).catch((pe) => {
2263
+ const c = new N([]), y = await o._def.args.parseAsync(u, a).catch((pe) => {
2264
2264
  throw c.addIssue(n(u, pe)), c;
2265
- }), N = await Reflect.apply(i, this, y);
2266
- return await o._def.returns._def.type.parseAsync(N, a).catch((pe) => {
2267
- throw c.addIssue(s(N, pe)), c;
2265
+ }), O = await Reflect.apply(i, this, y);
2266
+ return await o._def.returns._def.type.parseAsync(O, a).catch((pe) => {
2267
+ throw c.addIssue(s(O, pe)), c;
2268
2268
  });
2269
2269
  });
2270
2270
  } else {
@@ -2272,11 +2272,11 @@ class H extends v {
2272
2272
  return S(function(...u) {
2273
2273
  const c = o._def.args.safeParse(u, a);
2274
2274
  if (!c.success)
2275
- throw new O([n(u, c.error)]);
2276
- const y = Reflect.apply(i, this, c.data), N = o._def.returns.safeParse(y, a);
2277
- if (!N.success)
2278
- throw new O([s(y, N.error)]);
2279
- return N.data;
2275
+ throw new N([n(u, c.error)]);
2276
+ const y = Reflect.apply(i, this, c.data), O = o._def.returns.safeParse(y, a);
2277
+ if (!O.success)
2278
+ throw new N([s(y, O.error)]);
2279
+ return O.data;
2280
2280
  });
2281
2281
  }
2282
2282
  }
@@ -2472,7 +2472,7 @@ K.create = (r, e) => new K({
2472
2472
  typeName: m.ZodPromise,
2473
2473
  ..._(e)
2474
2474
  });
2475
- class R extends v {
2475
+ class I extends v {
2476
2476
  innerType() {
2477
2477
  return this._def.schema;
2478
2478
  }
@@ -2549,13 +2549,13 @@ class R extends v {
2549
2549
  x.assertNever(s);
2550
2550
  }
2551
2551
  }
2552
- R.create = (r, e, t) => new R({
2552
+ I.create = (r, e, t) => new I({
2553
2553
  schema: r,
2554
2554
  typeName: m.ZodEffects,
2555
2555
  effect: e,
2556
2556
  ..._(t)
2557
2557
  });
2558
- R.createWithPreprocess = (r, e, t) => new R({
2558
+ I.createWithPreprocess = (r, e, t) => new I({
2559
2559
  schema: e,
2560
2560
  effect: { type: "preprocess", transform: r },
2561
2561
  typeName: m.ZodEffects,
@@ -2626,7 +2626,7 @@ class fe extends v {
2626
2626
  status: "valid",
2627
2627
  value: a.status === "valid" ? a.value : this._def.catchValue({
2628
2628
  get error() {
2629
- return new O(n.common.issues);
2629
+ return new N(n.common.issues);
2630
2630
  },
2631
2631
  input: n.data
2632
2632
  })
@@ -2634,7 +2634,7 @@ class fe extends v {
2634
2634
  status: "valid",
2635
2635
  value: s.status === "valid" ? s.value : this._def.catchValue({
2636
2636
  get error() {
2637
- return new O(n.common.issues);
2637
+ return new N(n.common.issues);
2638
2638
  },
2639
2639
  input: n.data
2640
2640
  })
@@ -2753,7 +2753,7 @@ var m;
2753
2753
  })(m || (m = {}));
2754
2754
  const pt = (r, e = {
2755
2755
  message: `Input not instance of ${r.name}`
2756
- }) => De((t) => t instanceof r, e), Le = E.create, Ue = V.create, yt = be.create, _t = D.create, Be = re.create, vt = q.create, gt = ge.create, xt = ne.create, kt = se.create, bt = X.create, wt = B.create, Tt = P.create, Zt = xe.create, St = I.create, Ct = k.create, Nt = k.strictCreate, Ot = ae.create, Et = we.create, It = ie.create, Rt = M.create, jt = oe.create, At = ke.create, Mt = W.create, $t = H.create, Pt = de.create, zt = ce.create, Vt = L.create, Dt = ue.create, Lt = K.create, je = R.create, Ut = j.create, Bt = U.create, qt = R.createWithPreprocess, Wt = me.create, Yt = () => Le().optional(), Jt = () => Ue().optional(), Ht = () => Be().optional(), Gt = {
2756
+ }) => De((t) => t instanceof r, e), Le = E.create, Ue = V.create, yt = be.create, _t = D.create, Be = re.create, vt = q.create, gt = ge.create, xt = ne.create, kt = se.create, bt = X.create, wt = B.create, Tt = z.create, Zt = xe.create, St = R.create, Ct = k.create, Ot = k.strictCreate, Nt = ae.create, Et = we.create, Rt = ie.create, It = M.create, jt = oe.create, At = ke.create, Mt = W.create, $t = H.create, zt = de.create, Pt = ce.create, Vt = L.create, Dt = ue.create, Lt = K.create, je = I.create, Ut = j.create, Bt = U.create, qt = I.createWithPreprocess, Wt = me.create, Yt = () => Le().optional(), Jt = () => Ue().optional(), Ht = () => Be().optional(), Gt = {
2757
2757
  string: (r) => E.create({ ...r, coerce: !0 }),
2758
2758
  number: (r) => V.create({ ...r, coerce: !0 }),
2759
2759
  boolean: (r) => re.create({
@@ -2776,7 +2776,7 @@ var C = /* @__PURE__ */ Object.freeze({
2776
2776
  DIRTY: J,
2777
2777
  OK: S,
2778
2778
  isAborted: Ce,
2779
- isDirty: Ne,
2779
+ isDirty: Oe,
2780
2780
  isValid: ee,
2781
2781
  isAsync: te,
2782
2782
  get util() {
@@ -2786,9 +2786,9 @@ var C = /* @__PURE__ */ Object.freeze({
2786
2786
  return Se;
2787
2787
  },
2788
2788
  ZodParsedType: f,
2789
- getParsedType: z,
2789
+ getParsedType: P,
2790
2790
  ZodType: v,
2791
- datetimeRegex: ze,
2791
+ datetimeRegex: Pe,
2792
2792
  ZodString: E,
2793
2793
  ZodNumber: V,
2794
2794
  ZodBigInt: D,
@@ -2799,9 +2799,9 @@ var C = /* @__PURE__ */ Object.freeze({
2799
2799
  ZodNull: se,
2800
2800
  ZodAny: X,
2801
2801
  ZodUnknown: B,
2802
- ZodNever: P,
2802
+ ZodNever: z,
2803
2803
  ZodVoid: xe,
2804
- ZodArray: I,
2804
+ ZodArray: R,
2805
2805
  ZodObject: k,
2806
2806
  ZodUnion: ae,
2807
2807
  ZodDiscriminatedUnion: we,
@@ -2816,8 +2816,8 @@ var C = /* @__PURE__ */ Object.freeze({
2816
2816
  ZodEnum: L,
2817
2817
  ZodNativeEnum: ue,
2818
2818
  ZodPromise: K,
2819
- ZodEffects: R,
2820
- ZodTransformer: R,
2819
+ ZodEffects: I,
2820
+ ZodTransformer: I,
2821
2821
  ZodOptional: j,
2822
2822
  ZodNullable: U,
2823
2823
  ZodDefault: le,
@@ -2845,9 +2845,9 @@ var C = /* @__PURE__ */ Object.freeze({
2845
2845
  enum: Vt,
2846
2846
  function: $t,
2847
2847
  instanceof: pt,
2848
- intersection: It,
2849
- lazy: Pt,
2850
- literal: zt,
2848
+ intersection: Rt,
2849
+ lazy: zt,
2850
+ literal: Pt,
2851
2851
  map: At,
2852
2852
  nan: yt,
2853
2853
  nativeEnum: Dt,
@@ -2865,28 +2865,31 @@ var C = /* @__PURE__ */ Object.freeze({
2865
2865
  promise: Lt,
2866
2866
  record: jt,
2867
2867
  set: Mt,
2868
- strictObject: Nt,
2868
+ strictObject: Ot,
2869
2869
  string: Le,
2870
2870
  symbol: gt,
2871
2871
  transformer: je,
2872
- tuple: Rt,
2872
+ tuple: It,
2873
2873
  undefined: xt,
2874
- union: Ot,
2874
+ union: Nt,
2875
2875
  unknown: wt,
2876
2876
  void: Zt,
2877
2877
  NEVER: Xt,
2878
2878
  ZodIssueCode: d,
2879
2879
  quotelessJson: Ge,
2880
- ZodError: O
2880
+ ZodError: N
2881
2881
  });
2882
2882
  const nr = () => {
2883
2883
  const { formValidationTexts: r } = Ye(We), e = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
2884
2884
  invalid_type_error: r.required
2885
- }).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((b) => b ?? null), n = (g) => (g != null && g.useCoerce ? C.coerce : C).number({
2886
- invalid_type_error: r.required
2887
- }).min((g == null ? void 0 : g.min) ?? Number.NEGATIVE_INFINITY).max((g == null ? void 0 : g.max) ?? Number.POSITIVE_INFINITY).transform((w) => w ?? null), s = (g) => n(g).nullable().optional().transform((b) => b ?? null), a = (g) => (g != null && g.useCoerce ? C.coerce : C).boolean({
2885
+ }).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((b) => b ?? null), n = (g) => {
2886
+ const b = (g != null && g.useCoerce ? C.coerce : C).number({
2887
+ invalid_type_error: r.required
2888
+ });
2889
+ return (g == null ? void 0 : g.min) !== void 0 && b.min(g.min), (g == null ? void 0 : g.max) !== void 0 && b.max(g.max), b.transform((w) => w ?? null);
2890
+ }, s = (g) => n(g).nullable().optional().transform((b) => b ?? null), a = (g) => (g != null && g.useCoerce ? C.coerce : C).boolean({
2888
2891
  invalid_type_error: r.required
2889
- }).transform((b) => b ?? null), i = (g) => (g != null && g.useCoerce ? C.coerce : C).string({ invalid_type_error: r.required }).refine(He, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((b) => b ?? null), u = (g, b) => C.enum(g, { invalid_type_error: r.required }).transform((Ie) => Ie ?? null);
2892
+ }).transform((b) => b ?? null), i = (g) => (g != null && g.useCoerce ? C.coerce : C).string({ invalid_type_error: r.required }).refine(He, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((b) => b ?? null), u = (g, b) => C.enum(g, { invalid_type_error: r.required }).transform((Re) => Re ?? null);
2890
2893
  return {
2891
2894
  zString: t,
2892
2895
  zStringRequired: e,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-luminus-components",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
5
5
  "type": "module",
6
6
  "repository": {