@learncard/helpers 1.0.6 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- var Pt=Object.create;var ae=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var At=Object.getOwnPropertyNames;var Dt=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var p=(e,t)=>ae(e,"name",{value:t,configurable:!0});var De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=(e,t)=>{for(var a in t)ae(e,a,{get:t[a],enumerable:!0})},Le=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of At(t))!Lt.call(e,n)&&n!==a&&ae(e,n,{get:()=>t[n],enumerable:!(i=Rt(t,n))||i.enumerable});return e};var $t=(e,t,a)=>(a=e!=null?Pt(Dt(e)):{},Le(t||!e||!e.__esModule?ae(a,"default",{value:e,enumerable:!0}):a,e)),Ut=e=>Le(ae({},"__esModule",{value:!0}),e);var St=De((dr,jt)=>{"use strict";var Ze=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,Bt=Object.getOwnPropertyNames,Kt=Object.prototype.hasOwnProperty,c=p((e,t)=>Ze(e,"name",{value:t,configurable:!0}),"d"),Wt=p((e,t)=>{for(var a in t)Ze(e,a,{get:t[a],enumerable:!0})},"Et"),Ft=p((e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Bt(t))!Kt.call(e,n)&&n!==a&&Ze(e,n,{get:()=>t[n],enumerable:!(i=zt(t,n))||i.enumerable});return e},"St"),qt=p(e=>Ft(Ze({},"__esModule",{value:!0}),e),"Nt"),Ue={};Wt(Ue,{AchievementCredentialValidator:()=>Ua,AchievementCriteriaValidator:()=>Ma,AchievementSubjectValidator:()=>je,AchievementTypeValidator:()=>nt,AchievementValidator:()=>ht,AddressValidator:()=>Qe,AlignmentTargetTypeValidator:()=>rt,AlignmentValidator:()=>me,BoostRecipientValidator:()=>Xa,BoostValidator:()=>Ya,ContextValidator:()=>Ie,CredentialInfoValidator:()=>Wa,CredentialRecordValidator:()=>Fa,CredentialSchemaValidator:()=>et,CredentialStatusValidator:()=>Xe,CredentialSubjectValidator:()=>xe,CriteriaValidator:()=>st,EncryptedCredentialRecordValidator:()=>Zt,EncryptedRecordValidator:()=>Ae,EndorsementCredentialValidator:()=>dt,EndorsementSubjectValidator:()=>ot,EvidenceValidator:()=>gt,GeoCoordinatesValidator:()=>He,IdentifierEntryValidator:()=>Ve,IdentifierTypeValidator:()=>Ye,IdentityObjectValidator:()=>mt,ImageValidator:()=>he,JWERecipientHeaderValidator:()=>bt,JWERecipientValidator:()=>xt,JWEValidator:()=>kt,JWKValidator:()=>_t,KnownAchievementTypeValidator:()=>it,LCNBoostClaimLinkOptionsValidator:()=>ar,LCNBoostClaimLinkSigningAuthorityValidator:()=>tr,LCNBoostStatus:()=>wt,LCNNotificationDataValidator:()=>Et,LCNNotificationMessageValidator:()=>Ct,LCNNotificationTypeEnumValidator:()=>Tt,LCNNotificationValidator:()=>er,LCNProfileConnectionStatusEnum:()=>Ha,LCNProfileValidator:()=>ke,LCNSigningAuthorityForUserValidator:()=>rr,LCNSigningAuthorityValidator:()=>Nt,PaginatedEncryptedCredentialRecordsValidator:()=>Ga,PaginatedEncryptedRecordsValidator:()=>Ja,PaginationOptionsValidator:()=>qa,PaginationResponseValidator:()=>Re,ProfileValidator:()=>te,ProofValidator:()=>V,RefreshServiceValidator:()=>tt,RelatedValidator:()=>lt,ResultDescriptionValidator:()=>pt,ResultStatusTypeValidator:()=>ft,ResultTypeValidator:()=>ct,ResultValidator:()=>yt,RubricCriterionValidator:()=>ut,SentCredentialInfoValidator:()=>Qa,UnsignedAchievementCredentialValidator:()=>vt,UnsignedVCValidator:()=>ue,UnsignedVPValidator:()=>at,VCValidator:()=>Ne,VPValidator:()=>$a,VerificationCheckValidator:()=>za,VerificationItemValidator:()=>Ka,VerificationStatusEnum:()=>Ba,VerificationStatusValidator:()=>Pe});jt.exports=qt(Ue);var x;(function(e){e.assertEqual=n=>n;function t(n){}p(t,"e"),c(t,"assertIs"),e.assertIs=t;function a(n){throw new Error}p(a,"t"),c(a,"assertNever"),e.assertNever=a,e.arrayToEnum=n=>{let s={};for(let o of n)s[o]=o;return s},e.getValidEnumValues=n=>{let s=e.objectKeys(n).filter(d=>typeof n[n[d]]!="number"),o={};for(let d of s)o[d]=n[d];return e.objectValues(o)},e.objectValues=n=>e.objectKeys(n).map(function(s){return n[s]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.push(o);return s},e.find=(n,s)=>{for(let o of n)if(s(o))return o},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}p(i,"n"),c(i,"joinValues"),e.joinValues=i,e.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(x||(x={}));var u=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=c(e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(e)?u.array:e===null?u.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?u.promise:typeof Map<"u"&&e instanceof Map?u.map:typeof Set<"u"&&e instanceof Set?u.set:typeof Date<"u"&&e instanceof Date?u.date:u.object;default:return u.unknown}},"getParsedType"),l=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"]),Jt=c(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),N=p(class extends Error{constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};let 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){let t=e||function(n){return n.message},a={_errors:[]},i=c(n=>{for(let s of n.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,d=0;for(;d<s.path.length;){let m=s.path[d];d===s.path.length-1?(o[m]=o[m]||{_errors:[]},o[m]._errors.push(t(s))):o[m]=o[m]||{_errors:[]},o=o[m],d++}}},"processError");return i(this),a}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){let t={},a=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):a.push(e(i));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}},"N");c(N,"ZodError");N.create=e=>new N(e);var re=c((e,t)=>{let a;switch(e.code){case l.invalid_type:e.received===u.undefined?a="Required":a=`Expected ${e.expected}, received ${e.received}`;break;case l.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,x.jsonStringifyReplacer)}`;break;case l.unrecognized_keys:a=`Unrecognized key(s) in object: ${x.joinValues(e.keys,", ")}`;break;case l.invalid_union:a="Invalid input";break;case l.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${x.joinValues(e.options)}`;break;case l.invalid_enum_value:a=`Invalid enum value. Expected ${x.joinValues(e.options)}, received '${e.received}'`;break;case l.invalid_arguments:a="Invalid function arguments";break;case l.invalid_return_type:a="Invalid function return type";break;case l.invalid_date:a="Invalid date";break;case l.invalid_string:typeof e.validation=="object"?"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:x.assertNever(e.validation):e.validation!=="regex"?a=`Invalid ${e.validation}`:a="Invalid";break;case l.too_small:e.type==="array"?a=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?a=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?a=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?a=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:a="Invalid input";break;case l.too_big:e.type==="array"?a=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?a=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?a=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?a=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:a="Invalid input";break;case l.custom:a="Invalid input";break;case l.invalid_intersection_types:a="Intersection results could not be merged";break;case l.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case l.not_finite:a="Number must be finite";break;default:a=t.defaultError,x.assertNever(e)}return{message:a}},"errorMap"),ze=re;function Be(e){ze=e}p(Be,"jt");c(Be,"setErrorMap");function ie(){return ze}p(ie,"_e");c(ie,"getErrorMap");var ye=c(e=>{let{data:t,path:a,errorMaps:i,issueData:n}=e,s=[...a,...n.path||[]],o={...n,path:s},d="",m=i.filter(b=>!!b).slice().reverse();for(let b of m)d=b(o,{data:t,defaultError:d}).message;return{...n,path:s,message:n.message||d}},"makeIssue"),Gt=[];function h(e,t){let a=ye({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ie(),re].filter(i=>!!i)});e.common.issues.push(a)}p(h,"h");c(h,"addIssueToContext");var w=p(class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let a=[];for(let i of t){if(i.status==="aborted")return y;i.status==="dirty"&&e.dirty(),a.push(i.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){let a=[];for(let i of t)a.push({key:await i.key,value:await i.value});return w.mergeObjectSync(e,a)}static mergeObjectSync(e,t){let a={};for(let i of t){let{key:n,value:s}=i;if(n.status==="aborted"||s.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),(typeof s.value<"u"||i.alwaysSet)&&(a[n.value]=s.value)}return{status:e.value,value:a}}},"T");c(w,"ParseStatus");var y=Object.freeze({status:"aborted"}),Ke=c(e=>({status:"dirty",value:e}),"DIRTY"),Z=c(e=>({status:"valid",value:e}),"OK"),Ce=c(e=>e.status==="aborted","isAborted"),Ee=c(e=>e.status==="dirty","isDirty"),ge=c(e=>e.status==="valid","isValid"),ve=c(e=>typeof Promise<"u"&&e instanceof Promise,"isAsync"),_;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(_||(_={}));var E=p(class{constructor(e,t,a,i){this.parent=e,this.data=t,this._path=a,this._key=i}get path(){return this._path.concat(this._key)}},"E");c(E,"ParseInputLazyPath");var Me=c((e,t)=>{if(ge(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new N(e.common.issues)}},"handleResult");function g(e){if(!e)return{};let{errorMap:t,invalid_type_error:a,required_error:i,description:n}=e;if(t&&(a||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:c((s,o)=>s.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:i??o.defaultError}:{message:a??o.defaultError},"customMap"),description:n}}p(g,"v");c(g,"processCreateParams");var v=p(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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new w,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ve(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;let i={common:{issues:[],async:(a=t?.async)!==null&&a!==void 0?a:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parseSync({data:e,path:i.path,parent:i});return Me(i,n)}async parseAsync(e,t){let a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){let a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},i=this._parse({data:e,path:a.path,parent:a}),n=await(ve(i)?i:Promise.resolve(i));return Me(a,n)}refine(e,t){let a=c(i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t,"getIssueProperties");return this._refinement((i,n)=>{let s=e(i),o=c(()=>n.addIssue({code:l.custom,...a(i)}),"setError");return typeof Promise<"u"&&s instanceof Promise?s.then(d=>d?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,i)=>e(a)?!0:(i.addIssue(typeof t=="function"?t(a,i):t),!1))}_refinement(e){return new T({schema:this,typeName:f.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return j.create(this,this._def)}nullable(){return L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return C.create(this,this._def)}promise(){return B.create(this,this._def)}or(e){return G.create([this,e],this._def)}and(e){return H.create(this,e,this._def)}transform(e){return new T({...g(this._def),schema:this,typeName:f.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new ee({...g(this._def),innerType:this,defaultValue:t,typeName:f.ZodDefault})}brand(){return new Oe({typeName:f.ZodBranded,type:this,...g(this._def)})}catch(e){let t=typeof e=="function"?e:()=>e;return new le({...g(this._def),innerType:this,catchValue:t,typeName:f.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pe.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},"g");c(v,"ZodType");var Ht=/^c[^\s-]{8,}$/i,Qt=/^[a-z][a-z0-9]*$/,Yt=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Xt=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|([^-]([a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}))$/,ea=c(e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),I=p(class extends v{constructor(){super(...arguments),this._regex=(e,t,a)=>this.refinement(i=>e.test(i),{validation:t,code:l.invalid_string,..._.errToObj(a)}),this.nonempty=e=>this.min(1,_.errToObj(e)),this.trim=()=>new I({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let i=this._getOrReturnCtx(e);return h(i,{code:l.invalid_type,expected:u.string,received:i.parsedType}),y}let t=new w,a;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind==="length"){let n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?h(a,{code:l.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&h(a,{code:l.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if(i.kind==="email")Xt.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"email",code:l.invalid_string,message:i.message}),t.dirty());else if(i.kind==="uuid")Yt.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"uuid",code:l.invalid_string,message:i.message}),t.dirty());else if(i.kind==="cuid")Ht.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"cuid",code:l.invalid_string,message:i.message}),t.dirty());else if(i.kind==="cuid2")Qt.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"cuid2",code:l.invalid_string,message:i.message}),t.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),h(a,{validation:"url",code:l.invalid_string,message:i.message}),t.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"regex",code:l.invalid_string,message:i.message}),t.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),h(a,{code:l.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),h(a,{code:l.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty()):i.kind==="datetime"?ea(i).test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:l.invalid_string,validation:"datetime",message:i.message}),t.dirty()):x.assertNever(i);return{status:t.value,value:e.data}}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,..._.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,..._.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}},"R");c(I,"ZodString");I.create=e=>{var t;return new I({checks:[],typeName:f.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...g(e)})};function We(e,t){let a=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=a>i?a:i,s=parseInt(e.toFixed(n).replace(".","")),o=parseInt(t.toFixed(n).replace(".",""));return s%o/Math.pow(10,n)}p(We,"Dt");c(We,"floatSafeRemainder");var A=p(class 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)!==u.number){let i=this._getOrReturnCtx(e);return h(i,{code:l.invalid_type,expected:u.number,received:i.parsedType}),y}let t,a=new w;for(let i of this._def.checks)i.kind==="int"?x.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:l.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:l.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:l.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?We(e.data,i.value)!==0&&(t=this._getOrReturnCtx(e,t),h(t,{code:l.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:l.not_finite,message:i.message}),a.dirty()):x.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,a,i){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:_.toString(i)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:_.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}},"O");c(A,"ZodNumber");A.create=e=>new A({checks:[],typeName:f.ZodNumber,coerce:e?.coerce||!1,...g(e)});var W=p(class extends v{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==u.bigint){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.bigint,received:t.parsedType}),y}return Z(e.data)}},"W");c(W,"ZodBigInt");W.create=e=>{var t;return new W({typeName:f.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...g(e)})};var F=p(class extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.boolean,received:t.parsedType}),y}return Z(e.data)}},"J");c(F,"ZodBoolean");F.create=e=>new F({typeName:f.ZodBoolean,coerce:e?.coerce||!1,...g(e)});var $=p(class extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let i=this._getOrReturnCtx(e);return h(i,{code:l.invalid_type,expected:u.date,received:i.parsedType}),y}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return h(i,{code:l.invalid_date}),y}let t=new w,a;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:l.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:l.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):x.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}},"z");c($,"ZodDate");$.create=e=>new $({checks:[],coerce:e?.coerce||!1,typeName:f.ZodDate,...g(e)});var ne=p(class extends v{_parse(e){if(this._getType(e)!==u.symbol){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.symbol,received:t.parsedType}),y}return Z(e.data)}},"ne");c(ne,"ZodSymbol");ne.create=e=>new ne({typeName:f.ZodSymbol,...g(e)});var q=p(class extends v{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.undefined,received:t.parsedType}),y}return Z(e.data)}},"q");c(q,"ZodUndefined");q.create=e=>new q({typeName:f.ZodUndefined,...g(e)});var J=p(class extends v{_parse(e){if(this._getType(e)!==u.null){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.null,received:t.parsedType}),y}return Z(e.data)}},"G");c(J,"ZodNull");J.create=e=>new J({typeName:f.ZodNull,...g(e)});var U=p(class extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return Z(e.data)}},"$");c(U,"ZodAny");U.create=e=>new U({typeName:f.ZodAny,...g(e)});var R=p(class extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Z(e.data)}},"P");c(R,"ZodUnknown");R.create=e=>new R({typeName:f.ZodUnknown,...g(e)});var S=p(class extends v{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.never,received:t.parsedType}),y}},"j");c(S,"ZodNever");S.create=e=>new S({typeName:f.ZodNever,...g(e)});var se=p(class extends v{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.void,received:t.parsedType}),y}return Z(e.data)}},"ae");c(se,"ZodVoid");se.create=e=>new se({typeName:f.ZodVoid,...g(e)});var C=p(class extends v{_parse(e){let{ctx:t,status:a}=this._processInputParams(e),i=this._def;if(t.parsedType!==u.array)return h(t,{code:l.invalid_type,expected:u.array,received:t.parsedType}),y;if(i.exactLength!==null){let s=t.data.length>i.exactLength.value,o=t.data.length<i.exactLength.value;(s||o)&&(h(t,{code:s?l.too_big:l.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),a.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(h(t,{code:l.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),a.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(h(t,{code:l.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>i.type._parseAsync(new E(t,s,t.path,o)))).then(s=>w.mergeArray(a,s));let n=[...t.data].map((s,o)=>i.type._parseSync(new E(t,s,t.path,o)));return w.mergeArray(a,n)}get element(){return this._def.type}min(e,t){return new C({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new C({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return new C({...this._def,exactLength:{value:e,message:_.toString(t)}})}nonempty(e){return this.min(1,e)}},"V");c(C,"ZodArray");C.create=(e,t)=>new C({type:e,minLength:null,maxLength:null,exactLength:null,typeName:f.ZodArray,...g(t)});var _e;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(_e||(_e={}));function M(e){if(e instanceof k){let t={};for(let a in e.shape){let i=e.shape[a];t[a]=j.create(M(i))}return new k({...e._def,shape:()=>t})}else return e instanceof C?C.create(M(e.element)):e instanceof j?j.create(M(e.unwrap())):e instanceof L?L.create(M(e.unwrap())):e instanceof O?O.create(e.items.map(t=>M(t))):e}p(M,"le");c(M,"deepPartialify");var k=p(class extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==u.object){let d=this._getOrReturnCtx(e);return h(d,{code:l.invalid_type,expected:u.object,received:d.parsedType}),y}let{status:t,ctx:a}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),s=[];if(!(this._def.catchall instanceof S&&this._def.unknownKeys==="strip"))for(let d in a.data)n.includes(d)||s.push(d);let o=[];for(let d of n){let m=i[d],b=a.data[d];o.push({key:{status:"valid",value:d},value:m._parse(new E(a,b,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof S){let d=this._def.unknownKeys;if(d==="passthrough")for(let m of s)o.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(d==="strict")s.length>0&&(h(a,{code:l.unrecognized_keys,keys:s}),t.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let m of s){let b=a.data[m];o.push({key:{status:"valid",value:m},value:d._parse(new E(a,b,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let d=[];for(let m of o){let b=await m.key;d.push({key:b,value:await m.value,alwaysSet:m.alwaysSet})}return d}).then(d=>w.mergeObjectSync(t,d)):w.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,n,s,o;let d=(s=(n=(i=this._def).errorMap)===null||n===void 0?void 0:n.call(i,t,a).message)!==null&&s!==void 0?s:a.defaultError;return t.code==="unrecognized_keys"?{message:(o=_.errToObj(e).message)!==null&&o!==void 0?o:d}:{message:d}}}:{}})}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:()=>_e.mergeShapes(this._def.shape(),e._def.shape()),typeName:f.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){let t={};return x.objectKeys(e).forEach(a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])}),new k({...this._def,shape:()=>t})}omit(e){let t={};return x.objectKeys(this.shape).forEach(a=>{e[a]||(t[a]=this.shape[a])}),new k({...this._def,shape:()=>t})}deepPartial(){return M(this)}partial(e){let t={};return x.objectKeys(this.shape).forEach(a=>{let i=this.shape[a];e&&!e[a]?t[a]=i:t[a]=i.optional()}),new k({...this._def,shape:()=>t})}required(e){let t={};return x.objectKeys(this.shape).forEach(a=>{if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof j;)i=i._def.innerType;t[a]=i}}),new k({...this._def,shape:()=>t})}keyof(){return Se(x.objectKeys(this.shape))}},"C");c(k,"ZodObject");k.create=(e,t)=>new k({shape:()=>e,unknownKeys:"strip",catchall:S.create(),typeName:f.ZodObject,...g(t)});k.strictCreate=(e,t)=>new k({shape:()=>e,unknownKeys:"strict",catchall:S.create(),typeName:f.ZodObject,...g(t)});k.lazycreate=(e,t)=>new k({shape:e,unknownKeys:"strip",catchall:S.create(),typeName:f.ZodObject,...g(t)});var G=p(class extends v{_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.options;function i(n){for(let o of n)if(o.result.status==="valid")return o.result;for(let o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let s=n.map(o=>new N(o.ctx.common.issues));return h(t,{code:l.invalid_union,unionErrors:s}),y}if(p(i,"i"),c(i,"handleResults"),t.common.async)return Promise.all(a.map(async n=>{let s={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(i);{let n,s=[];for(let d of a){let m={...t,common:{...t.common,issues:[]},parent:null},b=d._parseSync({data:t.data,path:t.path,parent:m});if(b.status==="valid")return b;b.status==="dirty"&&!n&&(n={result:b,ctx:m}),m.common.issues.length&&s.push(m.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;let o=s.map(d=>new N(d));return h(t,{code:l.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}},"H");c(G,"ZodUnion");G.create=(e,t)=>new G({options:e,typeName:f.ZodUnion,...g(t)});var fe=c(e=>e instanceof Q?fe(e.schema):e instanceof T?fe(e.innerType()):e instanceof Y?[e.value]:e instanceof D?e.options:e instanceof X?Object.keys(e.enum):e instanceof ee?fe(e._def.innerType):e instanceof q?[void 0]:e instanceof J?[null]:null,"getDiscriminator"),we=p(class extends v{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return h(t,{code:l.invalid_type,expected:u.object,received:t.parsedType}),y;let a=this.discriminator,i=t.data[a],n=this.optionsMap.get(i);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:l.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){let i=new Map;for(let n of t){let s=fe(n.shape[e]);if(!s)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of s){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,n)}}return new we({typeName:f.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...g(a)})}},"ie");c(we,"ZodDiscriminatedUnion");function be(e,t){let a=P(e),i=P(t);if(e===t)return{valid:!0,data:e};if(a===u.object&&i===u.object){let n=x.objectKeys(t),s=x.objectKeys(e).filter(d=>n.indexOf(d)!==-1),o={...e,...t};for(let d of s){let m=be(e[d],t[d]);if(!m.valid)return{valid:!1};o[d]=m.data}return{valid:!0,data:o}}else if(a===u.array&&i===u.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let s=0;s<e.length;s++){let o=e[s],d=t[s],m=be(o,d);if(!m.valid)return{valid:!1};n.push(m.data)}return{valid:!0,data:n}}else return a===u.date&&i===u.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}p(be,"Re");c(be,"mergeValues");var H=p(class extends v{_parse(e){let{status:t,ctx:a}=this._processInputParams(e),i=c((n,s)=>{if(Ce(n)||Ce(s))return y;let o=be(n.value,s.value);return o.valid?((Ee(n)||Ee(s))&&t.dirty(),{status:t.value,value:o.data}):(h(a,{code:l.invalid_intersection_types}),y)},"handleParsed");return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([n,s])=>i(n,s)):i(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}},"K");c(H,"ZodIntersection");H.create=(e,t,a)=>new H({left:e,right:t,typeName:f.ZodIntersection,...g(a)});var O=p(class extends v{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.array)return h(a,{code:l.invalid_type,expected:u.array,received:a.parsedType}),y;if(a.data.length<this._def.items.length)return h(a,{code:l.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&a.data.length>this._def.items.length&&(h(a,{code:l.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...a.data].map((n,s)=>{let o=this._def.items[s]||this._def.rest;return o?o._parse(new E(a,n,a.path,s)):null}).filter(n=>!!n);return a.common.async?Promise.all(i).then(n=>w.mergeArray(t,n)):w.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new O({...this._def,rest:e})}},"S");c(O,"ZodTuple");O.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new O({items:e,typeName:f.ZodTuple,rest:null,...g(t)})};var oe=p(class extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.object)return h(a,{code:l.invalid_type,expected:u.object,received:a.parsedType}),y;let i=[],n=this._def.keyType,s=this._def.valueType;for(let o in a.data)i.push({key:n._parse(new E(a,o,a.path,o)),value:s._parse(new E(a,a.data[o],a.path,o))});return a.common.async?w.mergeObjectAsync(t,i):w.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof v?new oe({keyType:e,valueType:t,typeName:f.ZodRecord,...g(a)}):new oe({keyType:I.create(),valueType:e,typeName:f.ZodRecord,...g(t)})}},"Q");c(oe,"ZodRecord");var de=p(class extends v{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.map)return h(a,{code:l.invalid_type,expected:u.map,received:a.parsedType}),y;let i=this._def.keyType,n=this._def.valueType,s=[...a.data.entries()].map(([o,d],m)=>({key:i._parse(new E(a,o,a.path,[m,"key"])),value:n._parse(new E(a,d,a.path,[m,"value"]))}));if(a.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let d of s){let m=await d.key,b=await d.value;if(m.status==="aborted"||b.status==="aborted")return y;(m.status==="dirty"||b.status==="dirty")&&t.dirty(),o.set(m.value,b.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let d of s){let m=d.key,b=d.value;if(m.status==="aborted"||b.status==="aborted")return y;(m.status==="dirty"||b.status==="dirty")&&t.dirty(),o.set(m.value,b.value)}return{status:t.value,value:o}}}},"se");c(de,"ZodMap");de.create=(e,t,a)=>new de({valueType:t,keyType:e,typeName:f.ZodMap,...g(a)});var z=p(class extends v{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==u.set)return h(a,{code:l.invalid_type,expected:u.set,received:a.parsedType}),y;let i=this._def;i.minSize!==null&&a.data.size<i.minSize.value&&(h(a,{code:l.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&a.data.size>i.maxSize.value&&(h(a,{code:l.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let n=this._def.valueType;function s(d){let m=new Set;for(let b of d){if(b.status==="aborted")return y;b.status==="dirty"&&t.dirty(),m.add(b.value)}return{status:t.value,value:m}}p(s,"o"),c(s,"finalizeSet");let o=[...a.data.values()].map((d,m)=>n._parse(new E(a,d,a.path,m)));return a.common.async?Promise.all(o).then(d=>s(d)):s(o)}min(e,t){return new z({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new z({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}},"L");c(z,"ZodSet");z.create=(e,t)=>new z({valueType:e,minSize:null,maxSize:null,typeName:f.ZodSet,...g(t)});var K=p(class extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return h(t,{code:l.invalid_type,expected:u.function,received:t.parsedType}),y;function a(o,d){return ye({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ie(),re].filter(m=>!!m),issueData:{code:l.invalid_arguments,argumentsError:d}})}p(a,"n"),c(a,"makeArgsIssue");function i(o,d){return ye({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ie(),re].filter(m=>!!m),issueData:{code:l.invalid_return_type,returnTypeError:d}})}p(i,"i"),c(i,"makeReturnsIssue");let n={errorMap:t.common.contextualErrorMap},s=t.data;return this._def.returns instanceof B?Z(async(...o)=>{let d=new N([]),m=await this._def.args.parseAsync(o,n).catch(Te=>{throw d.addIssue(a(o,Te)),d}),b=await s(...m);return await this._def.returns._def.type.parseAsync(b,n).catch(Te=>{throw d.addIssue(i(b,Te)),d})}):Z((...o)=>{let d=this._def.args.safeParse(o,n);if(!d.success)throw new N([a(o,d.error)]);let m=s(...d.data),b=this._def.returns.safeParse(m,n);if(!b.success)throw new N([i(m,b.error)]);return b.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new K({...this._def,args:O.create(e).rest(R.create())})}returns(e){return new K({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new K({args:e||O.create([]).rest(R.create()),returns:t||R.create(),typeName:f.ZodFunction,...g(a)})}},"U");c(K,"ZodFunction");var Q=p(class extends v{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},"Y");c(Q,"ZodLazy");Q.create=(e,t)=>new Q({getter:e,typeName:f.ZodLazy,...g(t)});var Y=p(class extends v{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:l.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}},"X");c(Y,"ZodLiteral");Y.create=(e,t)=>new Y({value:e,typeName:f.ZodLiteral,...g(t)});function Se(e,t){return new D({values:e,typeName:f.ZodEnum,...g(t)})}p(Se,"Ue");c(Se,"createZodEnum");var D=p(class extends v{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),a=this._def.values;return h(t,{expected:x.joinValues(a),received:t.parsedType,code:l.invalid_type}),y}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),a=this._def.values;return h(t,{received:t.data,code:l.invalid_enum_value,options:a}),y}return Z(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return D.create(e)}exclude(e){return D.create(this.options.filter(t=>!e.includes(t)))}},"A");c(D,"ZodEnum");D.create=Se;var X=p(class extends v{_parse(e){let t=x.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==u.string&&a.parsedType!==u.number){let i=x.objectValues(t);return h(a,{expected:x.joinValues(i),received:a.parsedType,code:l.invalid_type}),y}if(t.indexOf(e.data)===-1){let i=x.objectValues(t);return h(a,{received:a.data,code:l.invalid_enum_value,options:i}),y}return Z(e.data)}get enum(){return this._def.values}},"F");c(X,"ZodNativeEnum");X.create=(e,t)=>new X({values:e,typeName:f.ZodNativeEnum,...g(t)});var B=p(class extends v{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return h(t,{code:l.invalid_type,expected:u.promise,received:t.parsedType}),y;let a=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return Z(a.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}},"B");c(B,"ZodPromise");B.create=(e,t)=>new B({type:e,typeName:f.ZodPromise,...g(t)});var T=p(class extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===f.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:a}=this._processInputParams(e),i=this._def.effect||null;if(i.type==="preprocess"){let s=i.transform(a.data);return a.common.async?Promise.resolve(s).then(o=>this._def.schema._parseAsync({data:o,path:a.path,parent:a})):this._def.schema._parseSync({data:s,path:a.path,parent:a})}let n={addIssue:s=>{h(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(n.addIssue=n.addIssue.bind(n),i.type==="refinement"){let s=c(o=>{let d=i.refinement(o,n);if(a.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o},"executeRefinement");if(a.common.async===!1){let o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(i.type==="transform")if(a.common.async===!1){let s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!ge(s))return s;let o=i.transform(s.value,n);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:a.data,path:a.path,parent:a}).then(s=>ge(s)?Promise.resolve(i.transform(s.value,n)).then(o=>({status:t.value,value:o})):s);x.assertNever(i)}},"w");c(T,"ZodEffects");T.create=(e,t,a)=>new T({schema:e,typeName:f.ZodEffects,effect:t,...g(a)});T.createWithPreprocess=(e,t,a)=>new T({schema:t,effect:{type:"preprocess",transform:e},typeName:f.ZodEffects,...g(a)});var j=p(class extends v{_parse(e){return this._getType(e)===u.undefined?Z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"I");c(j,"ZodOptional");j.create=(e,t)=>new j({innerType:e,typeName:f.ZodOptional,...g(t)});var L=p(class extends v{_parse(e){return this._getType(e)===u.null?Z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"D");c(L,"ZodNullable");L.create=(e,t)=>new L({innerType:e,typeName:f.ZodNullable,...g(t)});var ee=p(class extends v{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return t.parsedType===u.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},"ee");c(ee,"ZodDefault");ee.create=(e,t)=>new ee({innerType:e,typeName:f.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...g(t)});var le=p(class extends v{_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.innerType._parse({data:t.data,path:t.path,parent:{...t,common:{...t.common,issues:[]}}});return ve(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue()})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue()}}removeCatch(){return this._def.innerType}},"oe");c(le,"ZodCatch");le.create=(e,t)=>new le({innerType:e,typeName:f.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...g(t)});var ce=p(class extends v{_parse(e){if(this._getType(e)!==u.nan){let t=this._getOrReturnCtx(e);return h(t,{code:l.invalid_type,expected:u.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}},"ce");c(ce,"ZodNaN");ce.create=e=>new ce({typeName:f.ZodNaN,...g(e)});var ta=Symbol("zod_brand"),Oe=p(class extends v{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}},"fe");c(Oe,"ZodBranded");var pe=p(class extends v{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return c(async()=>{let i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?y:i.status==="dirty"?(t.dirty(),Ke(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})},"handleAsync")();{let i=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?y:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:a.path,parent:a})}}static create(e,t){return new pe({in:e,out:t,typeName:f.ZodPipeline})}},"te");c(pe,"ZodPipeline");var Fe=c((e,t={},a)=>e?U.create().superRefine((i,n)=>{if(!e(i)){let s=typeof t=="function"?t(i):t,o=typeof s=="string"?{message:s}:s;n.addIssue({code:"custom",...o,fatal:a})}}):U.create(),"custom"),aa={object:k.lazycreate},f;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(f||(f={}));var ra=c((e,t={message:`Input not instance of ${e.name}`})=>Fe(a=>a instanceof e,t,!0),"instanceOfType"),qe=I.create,Je=A.create,ia=ce.create,na=W.create,Ge=F.create,sa=$.create,oa=ne.create,da=q.create,la=J.create,ca=U.create,ua=R.create,pa=S.create,ha=se.create,ma=C.create,fa=k.create,ya=k.strictCreate,ga=G.create,va=we.create,_a=H.create,ba=O.create,xa=oe.create,ka=de.create,Za=z.create,wa=K.create,Ta=Q.create,Ca=Y.create,Ea=D.create,Na=X.create,ja=B.create,$e=T.create,Sa=j.create,Oa=L.create,Ia=T.createWithPreprocess,Va=pe.create,Pa=c(()=>qe().optional(),"ostring"),Ra=c(()=>Je().optional(),"onumber"),Aa=c(()=>Ge().optional(),"oboolean"),Da={string:e=>I.create({...e,coerce:!0}),number:e=>A.create({...e,coerce:!0}),boolean:e=>F.create({...e,coerce:!0}),bigint:e=>W.create({...e,coerce:!0}),date:e=>$.create({...e,coerce:!0})},La=y,r=Object.freeze({__proto__:null,defaultErrorMap:re,setErrorMap:Be,getErrorMap:ie,makeIssue:ye,EMPTY_PATH:Gt,addIssueToContext:h,ParseStatus:w,INVALID:y,DIRTY:Ke,OK:Z,isAborted:Ce,isDirty:Ee,isValid:ge,isAsync:ve,get util(){return x},ZodParsedType:u,getParsedType:P,ZodType:v,ZodString:I,ZodNumber:A,ZodBigInt:W,ZodBoolean:F,ZodDate:$,ZodSymbol:ne,ZodUndefined:q,ZodNull:J,ZodAny:U,ZodUnknown:R,ZodNever:S,ZodVoid:se,ZodArray:C,get objectUtil(){return _e},ZodObject:k,ZodUnion:G,ZodDiscriminatedUnion:we,ZodIntersection:H,ZodTuple:O,ZodRecord:oe,ZodMap:de,ZodSet:z,ZodFunction:K,ZodLazy:Q,ZodLiteral:Y,ZodEnum:D,ZodNativeEnum:X,ZodPromise:B,ZodEffects:T,ZodTransformer:T,ZodOptional:j,ZodNullable:L,ZodDefault:ee,ZodCatch:le,ZodNaN:ce,BRAND:ta,ZodBranded:Oe,ZodPipeline:pe,custom:Fe,Schema:v,ZodSchema:v,late:aa,get ZodFirstPartyTypeKind(){return f},coerce:Da,any:ca,array:ma,bigint:na,boolean:Ge,date:sa,discriminatedUnion:va,effect:$e,enum:Ea,function:wa,instanceof:ra,intersection:_a,lazy:Ta,literal:Ca,map:ka,nan:ia,nativeEnum:Na,never:pa,null:la,nullable:Oa,number:Je,object:fa,oboolean:Aa,onumber:Ra,optional:Sa,ostring:Pa,pipeline:Va,preprocess:Ia,promise:ja,record:xa,set:Za,strictObject:ya,string:qe,symbol:oa,transformer:$e,tuple:ba,undefined:da,union:ga,unknown:ua,void:ha,NEVER:La,ZodIssueCode:l,quotelessJson:Jt,ZodError:N}),Ie=r.array(r.string().or(r.record(r.any()))),Ma=r.object({type:r.string().optional(),narrative:r.string().optional()}),he=r.string().or(r.object({id:r.string(),type:r.string(),caption:r.string().optional()})),He=r.object({type:r.string().min(1).or(r.string().array().nonempty()),latitude:r.number(),longitude:r.number()}),Qe=r.object({type:r.string().min(1).or(r.string().array().nonempty()),addressCountry:r.string().optional(),addressCountryCode:r.string().optional(),addressRegion:r.string().optional(),addressLocality:r.string().optional(),streetAddress:r.string().optional(),postOfficeBoxNumber:r.string().optional(),postalCode:r.string().optional(),geo:He.optional()}),Ye=r.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(r.string()),Ve=r.object({type:r.string().min(1).or(r.string().array().nonempty()),identifier:r.string(),identifierType:Ye}),te=r.string().or(r.object({id:r.string().optional(),type:r.string().or(r.string().array().nonempty().optional()),name:r.string().optional(),url:r.string().optional(),phone:r.string().optional(),description:r.string().optional(),endorsement:r.any().array().optional(),image:he.optional(),email:r.string().email().optional(),address:Qe.optional(),otherIdentifier:Ve.array().optional(),official:r.string().optional(),parentOrg:r.any().optional(),familyName:r.string().optional(),givenName:r.string().optional(),additionalName:r.string().optional(),patronymicName:r.string().optional(),honorificPrefix:r.string().optional(),honorificSuffix:r.string().optional(),familyNamePrefix:r.string().optional(),dateOfBirth:r.string().optional()}).catchall(r.any())),xe=r.object({id:r.string().optional()}).catchall(r.any()),Xe=r.object({type:r.string(),id:r.string()}),et=r.object({id:r.string(),type:r.string()}),tt=r.object({id:r.string(),type:r.string()}).catchall(r.any()),ue=r.object({"@context":Ie,id:r.string().optional(),type:r.string().array().nonempty(),issuer:te,issuanceDate:r.string(),expirationDate:r.string().optional(),credentialSubject:xe.or(xe.array()),credentialStatus:Xe.optional(),credentialSchema:et.array().optional(),refreshService:tt.optional()}).catchall(r.any()),V=r.object({type:r.string(),created:r.string(),challenge:r.string().optional(),domain:r.string().optional(),nonce:r.string().optional(),proofPurpose:r.string(),verificationMethod:r.string(),jws:r.string().optional()}).catchall(r.any()),Ne=ue.extend({proof:V.or(V.array())}),at=r.object({"@context":Ie,id:r.string().optional(),type:r.string().array().nonempty(),verifiableCredential:Ne.or(Ne.array()).optional(),holder:r.string().optional()}).catchall(r.any()),$a=at.extend({proof:V.or(V.array())}),rt=r.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(r.string()),me=r.object({type:r.string().array().nonempty(),targetCode:r.string().optional(),targetDescription:r.string().optional(),targetName:r.string(),targetFramework:r.string().optional(),targetType:rt.optional(),targetUrl:r.string()}),it=r.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),nt=it.or(r.string()),st=r.object({id:r.string().optional(),narrative:r.string().optional()}).catchall(r.any()),ot=r.object({id:r.string(),type:r.string().array().nonempty(),endorsementComment:r.string().optional()}),dt=ue.extend({credentialSubject:ot,proof:V.or(V.array()).optional()}),lt=r.object({id:r.string(),"@language":r.string().optional(),version:r.string().optional()}),ct=r.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(r.string()),ut=r.object({id:r.string(),type:r.string().array().nonempty(),alignment:me.array().optional(),description:r.string().optional(),level:r.string().optional(),name:r.string(),points:r.string().optional()}).catchall(r.any()),pt=r.object({id:r.string(),type:r.string().array().nonempty(),alignment:me.array().optional(),allowedValue:r.string().array().optional(),name:r.string(),requiredLevel:r.string().optional(),requiredValue:r.string().optional(),resultType:ct,rubricCriterionLevel:ut.array().optional(),valueMax:r.string().optional(),valueMin:r.string().optional()}).catchall(r.any()),ht=r.object({id:r.string().optional(),type:r.string().array().nonempty(),alignment:me.array().optional(),achievementType:nt.optional(),creator:te.optional(),creditsAvailable:r.number().optional(),criteria:st,description:r.string(),endorsement:dt.array().optional(),fieldOfStudy:r.string().optional(),humanCode:r.string().optional(),image:he.optional(),"@language":r.string().optional(),name:r.string(),otherIdentifier:Ve.array().optional(),related:lt.array().optional(),resultDescription:pt.array().optional(),specialization:r.string().optional(),tag:r.string().array().optional(),version:r.string().optional()}).catchall(r.any()),mt=r.object({type:r.string(),hashed:r.boolean(),identityHash:r.string(),identityType:r.string(),salt:r.string().optional()}),ft=r.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),yt=r.object({type:r.string().array().nonempty(),achievedLevel:r.string().optional(),alignment:me.array().optional(),resultDescription:r.string().optional(),status:ft.optional(),value:r.string().optional()}).catchall(r.any()),je=r.object({id:r.string().optional(),type:r.string().array().nonempty(),activityEndDate:r.string().optional(),activityStartDate:r.string().optional(),creditsEarned:r.number().optional(),achievement:ht.optional(),identifier:mt.array().optional(),image:he.optional(),licenseNumber:r.string().optional(),narrative:r.string().optional(),result:yt.array().optional(),role:r.string().optional(),source:te.optional(),term:r.string().optional()}).catchall(r.any()),gt=r.object({id:r.string().optional(),type:r.string().array().nonempty(),narrative:r.string().optional(),name:r.string().optional(),description:r.string().optional(),genre:r.string().optional(),audience:r.string().optional()}).catchall(r.any()),vt=ue.extend({name:r.string().optional(),description:r.string().optional(),image:he.optional(),credentialSubject:je.or(je.array()),endorsement:ue.array().optional(),evidence:gt.array().optional()}),Ua=vt.extend({proof:V.or(V.array())}),za=r.object({checks:r.string().array(),warnings:r.string().array(),errors:r.string().array()}),Pe=r.enum(["Success","Failed","Error"]),Ba=Pe.enum,Ka=r.object({check:r.string(),status:Pe,message:r.string().optional(),details:r.string().optional()}),Wa=r.object({title:r.string().optional(),createdAt:r.string().optional(),issuer:te.optional(),issuee:te.optional(),credentialSubject:xe.optional()}),Fa=r.object({id:r.string(),uri:r.string()}).catchall(r.any()),qa=r.object({limit:r.number(),cursor:r.string().optional()}),Re=r.object({cursor:r.string().optional(),hasMore:r.boolean()}),_t=r.object({kty:r.string(),crv:r.string(),x:r.string(),y:r.string().optional(),n:r.string().optional(),d:r.string()}),bt=r.object({alg:r.string(),iv:r.string(),tag:r.string(),epk:_t.partial().optional(),kid:r.string().optional(),apv:r.string().optional(),apu:r.string().optional()}),xt=r.object({header:bt,encrypted_key:r.string()}),kt=r.object({protected:r.string(),iv:r.string(),ciphertext:r.string(),tag:r.string(),aad:r.string().optional(),recipients:xt.array().optional()}),Ae=r.object({encryptedRecord:kt,fields:r.string().array()}).catchall(r.any()),Ja=Re.extend({records:Ae.array()}),Zt=Ae.extend({id:r.string()}),Ga=Re.extend({records:Zt.array()}),ke=r.object({profileId:r.string().min(3).max(40),displayName:r.string().default(""),did:r.string(),email:r.string().optional(),image:r.string().optional(),isServiceProfile:r.boolean().default(!1).optional(),notificationsWebhook:r.string().url().startsWith("https://").optional()}),Ha=r.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),Qa=r.object({uri:r.string(),to:r.string(),from:r.string(),sent:r.string().datetime(),received:r.string().datetime().optional()}),wt=r.enum(["DRAFT","LIVE"]),Ya=r.object({uri:r.string(),name:r.string().optional(),type:r.string().optional(),category:r.string().optional(),status:wt.optional()}),Xa=r.object({to:ke,from:r.string(),received:r.string().optional()}),Tt=r.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),Ct=r.object({title:r.string().optional(),body:r.string().optional()}),Et=r.object({vcUris:r.array(r.string()).optional(),vpUris:r.array(r.string()).optional()}),er=r.object({type:Tt,to:ke.partial().and(r.object({did:r.string()})),from:ke.partial().and(r.object({did:r.string()})),message:Ct.optional(),data:Et.optional(),sent:r.string().datetime().optional()}),tr=r.object({endpoint:r.string(),name:r.string(),did:r.string().optional()}),ar=r.object({ttlSeconds:r.number().optional(),totalUses:r.number().optional()}),Nt=r.object({endpoint:r.string()}),rr=r.object({signingAuthority:Nt,relationship:r.object({name:r.string().max(15).regex(/^[a-z0-9-]+$/,{message:"The input string must contain only lowercase letters, numbers, and hyphens."}),did:r.string()})})});var It=De((Jr,Ot)=>{"use strict";Ot.exports=St()});var sr={};Mt(sr,{isEncrypted:()=>nr,isHex:()=>ir});module.exports=Ut(sr);var Vt=$t(It());var ir=p(e=>/^[0-9a-f]+$/i.test(e),"isHex"),nr=p(e=>Vt.JWEValidator.safeParse(e).success,"isEncrypted");
1
+ var Rt=Object.create;var ae=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Lt=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty;var p=(e,t)=>ae(e,"name",{value:t,configurable:!0});var De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$t=(e,t)=>{for(var a in t)ae(e,a,{get:t[a],enumerable:!0})},Le=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Dt(t))!Mt.call(e,n)&&n!==a&&ae(e,n,{get:()=>t[n],enumerable:!(i=At(t,n))||i.enumerable});return e};var Ut=(e,t,a)=>(a=e!=null?Rt(Lt(e)):{},Le(t||!e||!e.__esModule?ae(a,"default",{value:e,enumerable:!0}):a,e)),zt=e=>Le(ae({},"__esModule",{value:!0}),e);var Ot=De((dr,St)=>{"use strict";var we=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,Bt=Object.getOwnPropertyNames,Wt=Object.prototype.hasOwnProperty,l=p((e,t)=>we(e,"name",{value:t,configurable:!0}),"l"),Ft=p((e,t)=>{for(var a in t)we(e,a,{get:t[a],enumerable:!0})},"St"),qt=p((e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Bt(t))!Wt.call(e,n)&&n!==a&&we(e,n,{get:()=>t[n],enumerable:!(i=Kt(t,n))||i.enumerable});return e},"Nt"),Jt=p(e=>qt(we({},"__esModule",{value:!0}),e),"Rt"),ze={};Ft(ze,{AchievementCredentialValidator:()=>Ua,AchievementCriteriaValidator:()=>Ma,AchievementSubjectValidator:()=>je,AchievementTypeValidator:()=>st,AchievementValidator:()=>mt,AddressValidator:()=>Ye,AlignmentTargetTypeValidator:()=>it,AlignmentValidator:()=>me,BoostRecipientValidator:()=>Xa,BoostValidator:()=>Ya,ContextValidator:()=>Ie,CredentialInfoValidator:()=>Wa,CredentialRecordValidator:()=>Fa,CredentialSchemaValidator:()=>tt,CredentialStatusValidator:()=>et,CredentialSubjectValidator:()=>xe,CriteriaValidator:()=>ot,EncryptedCredentialRecordValidator:()=>kt,EncryptedRecordValidator:()=>Ae,EndorsementCredentialValidator:()=>lt,EndorsementSubjectValidator:()=>dt,EvidenceValidator:()=>vt,GeoCoordinatesValidator:()=>Qe,IdentifierEntryValidator:()=>Ve,IdentifierTypeValidator:()=>Xe,IdentityObjectValidator:()=>ft,ImageValidator:()=>he,JWERecipientHeaderValidator:()=>xt,JWERecipientValidator:()=>Zt,JWEValidator:()=>wt,JWKValidator:()=>bt,KnownAchievementTypeValidator:()=>nt,LCNBoostClaimLinkOptionsValidator:()=>ar,LCNBoostClaimLinkSigningAuthorityValidator:()=>tr,LCNBoostStatus:()=>Tt,LCNNotificationDataValidator:()=>Nt,LCNNotificationMessageValidator:()=>Et,LCNNotificationTypeEnumValidator:()=>Ct,LCNNotificationValidator:()=>er,LCNProfileConnectionStatusEnum:()=>Ha,LCNProfileValidator:()=>Ze,LCNSigningAuthorityForUserValidator:()=>rr,LCNSigningAuthorityValidator:()=>jt,PaginatedEncryptedCredentialRecordsValidator:()=>Ga,PaginatedEncryptedRecordsValidator:()=>Ja,PaginationOptionsValidator:()=>qa,PaginationResponseValidator:()=>Re,ProfileValidator:()=>ee,ProofValidator:()=>V,RefreshServiceValidator:()=>at,RelatedValidator:()=>ut,ResultDescriptionValidator:()=>ht,ResultStatusTypeValidator:()=>yt,ResultTypeValidator:()=>ct,ResultValidator:()=>gt,RubricCriterionValidator:()=>pt,SentCredentialInfoValidator:()=>Qa,UnsignedAchievementCredentialValidator:()=>_t,UnsignedVCValidator:()=>ce,UnsignedVPValidator:()=>rt,VCValidator:()=>Ne,VPValidator:()=>$a,VerificationCheckValidator:()=>za,VerificationItemValidator:()=>Ba,VerificationStatusEnum:()=>Ka,VerificationStatusValidator:()=>Pe});St.exports=Jt(ze);var x;(function(e){e.assertEqual=n=>n;function t(n){}p(t,"e"),l(t,"assertIs"),e.assertIs=t;function a(n){throw new Error}p(a,"t"),l(a,"assertNever"),e.assertNever=a,e.arrayToEnum=n=>{let s={};for(let o of n)s[o]=o;return s},e.getValidEnumValues=n=>{let s=e.objectKeys(n).filter(d=>typeof n[n[d]]!="number"),o={};for(let d of s)o[d]=n[d];return e.objectValues(o)},e.objectValues=n=>e.objectKeys(n).map(function(s){return n[s]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let s=[];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&s.push(o);return s},e.find=(n,s)=>{for(let o of n)if(s(o))return o},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,s=" | "){return n.map(o=>typeof o=="string"?`'${o}'`:o).join(s)}p(i,"n"),l(i,"joinValues"),e.joinValues=i,e.jsonStringifyReplacer=(n,s)=>typeof s=="bigint"?s.toString():s})(x||(x={}));var c=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),P=l(e=>{switch(typeof e){case"undefined":return c.undefined;case"string":return c.string;case"number":return isNaN(e)?c.nan:c.number;case"boolean":return c.boolean;case"function":return c.function;case"bigint":return c.bigint;case"symbol":return c.symbol;case"object":return Array.isArray(e)?c.array:e===null?c.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?c.promise:typeof Map<"u"&&e instanceof Map?c.map:typeof Set<"u"&&e instanceof Set?c.set:typeof Date<"u"&&e instanceof Date?c.date:c.object;default:return c.unknown}},"getParsedType"),u=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"]),Gt=l(e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),"quotelessJson"),j=p(class extends Error{constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};let 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){let t=e||function(n){return n.message},a={_errors:[]},i=l(n=>{for(let s of n.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,d=0;for(;d<s.path.length;){let m=s.path[d];d===s.path.length-1?(o[m]=o[m]||{_errors:[]},o[m]._errors.push(t(s))):o[m]=o[m]||{_errors:[]},o=o[m],d++}}},"processError");return i(this),a}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){let t={},a=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):a.push(e(i));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}},"R");l(j,"ZodError");j.create=e=>new j(e);var re=l((e,t)=>{let a;switch(e.code){case u.invalid_type:e.received===c.undefined?a="Required":a=`Expected ${e.expected}, received ${e.received}`;break;case u.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,x.jsonStringifyReplacer)}`;break;case u.unrecognized_keys:a=`Unrecognized key(s) in object: ${x.joinValues(e.keys,", ")}`;break;case u.invalid_union:a="Invalid input";break;case u.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${x.joinValues(e.options)}`;break;case u.invalid_enum_value:a=`Invalid enum value. Expected ${x.joinValues(e.options)}, received '${e.received}'`;break;case u.invalid_arguments:a="Invalid function arguments";break;case u.invalid_return_type:a="Invalid function return type";break;case u.invalid_date:a="Invalid date";break;case u.invalid_string:typeof e.validation=="object"?"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:x.assertNever(e.validation):e.validation!=="regex"?a=`Invalid ${e.validation}`:a="Invalid";break;case u.too_small:e.type==="array"?a=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?a=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?a=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?a=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(e.minimum)}`:a="Invalid input";break;case u.too_big:e.type==="array"?a=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?a=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?a=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?a=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(e.maximum)}`:a="Invalid input";break;case u.custom:a="Invalid input";break;case u.invalid_intersection_types:a="Intersection results could not be merged";break;case u.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case u.not_finite:a="Number must be finite";break;default:a=t.defaultError,x.assertNever(e)}return{message:a}},"errorMap"),Ke=re;function Be(e){Ke=e}p(Be,"It");l(Be,"setErrorMap");function ie(){return Ke}p(ie,"_e");l(ie,"getErrorMap");var ye=l(e=>{let{data:t,path:a,errorMaps:i,issueData:n}=e,s=[...a,...n.path||[]],o={...n,path:s},d="",m=i.filter(b=>!!b).slice().reverse();for(let b of m)d=b(o,{data:t,defaultError:d}).message;return{...n,path:s,message:n.message||d}},"makeIssue"),Ht=[];function h(e,t){let a=ye({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ie(),re].filter(i=>!!i)});e.common.issues.push(a)}p(h,"h");l(h,"addIssueToContext");var k=p(class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){let a=[];for(let i of t){if(i.status==="aborted")return y;i.status==="dirty"&&e.dirty(),a.push(i.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){let a=[];for(let i of t)a.push({key:await i.key,value:await i.value});return k.mergeObjectSync(e,a)}static mergeObjectSync(e,t){let a={};for(let i of t){let{key:n,value:s}=i;if(n.status==="aborted"||s.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),(typeof s.value<"u"||i.alwaysSet)&&(a[n.value]=s.value)}return{status:e.value,value:a}}},"T");l(k,"ParseStatus");var y=Object.freeze({status:"aborted"}),We=l(e=>({status:"dirty",value:e}),"DIRTY"),w=l(e=>({status:"valid",value:e}),"OK"),Ce=l(e=>e.status==="aborted","isAborted"),Ee=l(e=>e.status==="dirty","isDirty"),ge=l(e=>e.status==="valid","isValid"),ve=l(e=>typeof Promise!==void 0&&e instanceof Promise,"isAsync"),_;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(_||(_={}));var N=p(class{constructor(e,t,a,i){this.parent=e,this.data=t,this._path=a,this._key=i}get path(){return this._path.concat(this._key)}},"E");l(N,"ParseInputLazyPath");var Me=l((e,t)=>{if(ge(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,error:new j(e.common.issues)}},"handleResult");function v(e){if(!e)return{};let{errorMap:t,invalid_type_error:a,required_error:i,description:n}=e;if(t&&(a||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:l((s,o)=>s.code!=="invalid_type"?{message:o.defaultError}:typeof o.data>"u"?{message:i??o.defaultError}:{message:a??o.defaultError},"customMap"),description:n}}p(v,"_");l(v,"processCreateParams");var g=p(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.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return P(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:P(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(ve(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;let i={common:{issues:[],async:(a=t?.async)!==null&&a!==void 0?a:!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},n=this._parseSync({data:e,path:i.path,parent:i});return Me(i,n)}async parseAsync(e,t){let a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){let a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:P(e)},i=this._parse({data:e,path:a.path,parent:a}),n=await(ve(i)?i:Promise.resolve(i));return Me(a,n)}refine(e,t){let a=l(i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t,"getIssueProperties");return this._refinement((i,n)=>{let s=e(i),o=l(()=>n.addIssue({code:u.custom,...a(i)}),"setError");return typeof Promise<"u"&&s instanceof Promise?s.then(d=>d?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,i)=>e(a)?!0:(i.addIssue(typeof t=="function"?t(a,i):t),!1))}_refinement(e){return new T({schema:this,typeName:f.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return E.create(this)}nullable(){return D.create(this)}nullish(){return this.optional().nullable()}array(){return C.create(this)}promise(){return z.create(this)}or(e){return J.create([this,e])}and(e){return G.create(this,e)}transform(e){return new T({schema:this,typeName:f.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let t=typeof e=="function"?e:()=>e;return new X({innerType:this,defaultValue:t,typeName:f.ZodDefault})}brand(){return new Oe({typeName:f.ZodBranded,type:this,...v(void 0)})}catch(e){let t=typeof e=="function"?e:()=>e;return new le({innerType:this,defaultValue:t,typeName:f.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return pe.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},"g");l(g,"ZodType");var Qt=/^c[^\s-]{8,}$/i,Yt=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,Xt=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,ea=l(e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}:\\d{2})|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"),"datetimeRegex"),I=p(class extends g{constructor(){super(...arguments),this._regex=(e,t,a)=>this.refinement(i=>e.test(i),{validation:t,code:u.invalid_string,..._.errToObj(a)}),this.nonempty=e=>this.min(1,_.errToObj(e)),this.trim=()=>new I({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==c.string){let i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_type,expected:c.string,received:i.parsedType}),y}let t=new k,a;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind==="length"){let n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?h(a,{code:u.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&h(a,{code:u.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if(i.kind==="email")Xt.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"email",code:u.invalid_string,message:i.message}),t.dirty());else if(i.kind==="uuid")Yt.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"uuid",code:u.invalid_string,message:i.message}),t.dirty());else if(i.kind==="cuid")Qt.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"cuid",code:u.invalid_string,message:i.message}),t.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),h(a,{validation:"url",code:u.invalid_string,message:i.message}),t.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"regex",code:u.invalid_string,message:i.message}),t.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),h(a,{code:u.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),h(a,{code:u.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty()):i.kind==="datetime"?ea(i).test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:u.invalid_string,validation:"datetime",message:i.message}),t.dirty()):x.assertNever(i);return{status:t.value,value:e.data}}_addCheck(e){return new I({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._.errToObj(e)})}datetime(e){var t;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:(t=e?.offset)!==null&&t!==void 0?t:!1,..._.errToObj(e?.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,..._.errToObj(t)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,..._.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,..._.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,..._.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,..._.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,..._.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get minLength(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}},"j");l(I,"ZodString");I.create=e=>{var t;return new I({checks:[],typeName:f.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...v(e)})};function Fe(e,t){let a=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=a>i?a:i,s=parseInt(e.toFixed(n).replace(".","")),o=parseInt(t.toFixed(n).replace(".",""));return s%o/Math.pow(10,n)}p(Fe,"Dt");l(Fe,"floatSafeRemainder");var A=p(class extends g{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)!==c.number){let i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_type,expected:c.number,received:i.parsedType}),y}let t,a=new k;for(let i of this._def.checks)i.kind==="int"?x.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:u.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:u.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:u.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Fe(e.data,i.value)!==0&&(t=this._getOrReturnCtx(e,t),h(t,{code:u.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:u.not_finite,message:i.message}),a.dirty()):x.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,_.toString(t))}gt(e,t){return this.setLimit("min",e,!1,_.toString(t))}lte(e,t){return this.setLimit("max",e,!0,_.toString(t))}lt(e,t){return this.setLimit("max",e,!1,_.toString(t))}setLimit(e,t,a,i){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:_.toString(i)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:_.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:_.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int")}},"O");l(A,"ZodNumber");A.create=e=>new A({checks:[],typeName:f.ZodNumber,coerce:e?.coerce||!1,...v(e)});var B=p(class extends g{_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==c.bigint){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.bigint,received:t.parsedType}),y}return w(e.data)}},"Z");l(B,"ZodBigInt");B.create=e=>{var t;return new B({typeName:f.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...v(e)})};var W=p(class extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==c.boolean){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.boolean,received:t.parsedType}),y}return w(e.data)}},"W");l(W,"ZodBoolean");W.create=e=>new W({typeName:f.ZodBoolean,coerce:e?.coerce||!1,...v(e)});var M=p(class extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==c.date){let i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_type,expected:c.date,received:i.parsedType}),y}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_date}),y}let t=new k,a;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):x.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:_.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:_.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}},"A");l(M,"ZodDate");M.create=e=>new M({checks:[],coerce:e?.coerce||!1,typeName:f.ZodDate,...v(e)});var ne=p(class extends g{_parse(e){if(this._getType(e)!==c.symbol){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.symbol,received:t.parsedType}),y}return w(e.data)}},"ne");l(ne,"ZodSymbol");ne.create=e=>new ne({typeName:f.ZodSymbol,...v(e)});var F=p(class extends g{_parse(e){if(this._getType(e)!==c.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.undefined,received:t.parsedType}),y}return w(e.data)}},"J");l(F,"ZodUndefined");F.create=e=>new F({typeName:f.ZodUndefined,...v(e)});var q=p(class extends g{_parse(e){if(this._getType(e)!==c.null){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.null,received:t.parsedType}),y}return w(e.data)}},"q");l(q,"ZodNull");q.create=e=>new q({typeName:f.ZodNull,...v(e)});var $=p(class extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}},"M");l($,"ZodAny");$.create=e=>new $({typeName:f.ZodAny,...v(e)});var R=p(class extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}},"z");l(R,"ZodUnknown");R.create=e=>new R({typeName:f.ZodUnknown,...v(e)});var S=p(class extends g{_parse(e){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.never,received:t.parsedType}),y}},"I");l(S,"ZodNever");S.create=e=>new S({typeName:f.ZodNever,...v(e)});var se=p(class extends g{_parse(e){if(this._getType(e)!==c.undefined){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.void,received:t.parsedType}),y}return w(e.data)}},"ae");l(se,"ZodVoid");se.create=e=>new se({typeName:f.ZodVoid,...v(e)});var C=p(class extends g{_parse(e){let{ctx:t,status:a}=this._processInputParams(e),i=this._def;if(t.parsedType!==c.array)return h(t,{code:u.invalid_type,expected:c.array,received:t.parsedType}),y;if(i.exactLength!==null){let s=t.data.length>i.exactLength.value,o=t.data.length<i.exactLength.value;(s||o)&&(h(t,{code:s?u.too_big:u.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),a.dirty())}if(i.minLength!==null&&t.data.length<i.minLength.value&&(h(t,{code:u.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),a.dirty()),i.maxLength!==null&&t.data.length>i.maxLength.value&&(h(t,{code:u.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),a.dirty()),t.common.async)return Promise.all(t.data.map((s,o)=>i.type._parseAsync(new N(t,s,t.path,o)))).then(s=>k.mergeArray(a,s));let n=t.data.map((s,o)=>i.type._parseSync(new N(t,s,t.path,o)));return k.mergeArray(a,n)}get element(){return this._def.type}min(e,t){return new C({...this._def,minLength:{value:e,message:_.toString(t)}})}max(e,t){return new C({...this._def,maxLength:{value:e,message:_.toString(t)}})}length(e,t){return new C({...this._def,exactLength:{value:e,message:_.toString(t)}})}nonempty(e){return this.min(1,e)}},"k");l(C,"ZodArray");C.create=(e,t)=>new C({type:e,minLength:null,maxLength:null,exactLength:null,typeName:f.ZodArray,...v(t)});var _e;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(_e||(_e={}));var $e=l(e=>t=>new Z({...e,shape:()=>({...e.shape(),...t})}),"AugmentFactory");function L(e){if(e instanceof Z){let t={};for(let a in e.shape){let i=e.shape[a];t[a]=E.create(L(i))}return new Z({...e._def,shape:()=>t})}else return e instanceof C?C.create(L(e.element)):e instanceof E?E.create(L(e.unwrap())):e instanceof D?D.create(L(e.unwrap())):e instanceof O?O.create(e.items.map(t=>L(t))):e}p(L,"de");l(L,"deepPartialify");var Z=p(class extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=$e(this._def),this.extend=$e(this._def)}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==c.object){let d=this._getOrReturnCtx(e);return h(d,{code:u.invalid_type,expected:c.object,received:d.parsedType}),y}let{status:t,ctx:a}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),s=[];if(!(this._def.catchall instanceof S&&this._def.unknownKeys==="strip"))for(let d in a.data)n.includes(d)||s.push(d);let o=[];for(let d of n){let m=i[d],b=a.data[d];o.push({key:{status:"valid",value:d},value:m._parse(new N(a,b,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof S){let d=this._def.unknownKeys;if(d==="passthrough")for(let m of s)o.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(d==="strict")s.length>0&&(h(a,{code:u.unrecognized_keys,keys:s}),t.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let m of s){let b=a.data[m];o.push({key:{status:"valid",value:m},value:d._parse(new N(a,b,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let d=[];for(let m of o){let b=await m.key;d.push({key:b,value:await m.value,alwaysSet:m.alwaysSet})}return d}).then(d=>k.mergeObjectSync(t,d)):k.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return _.errToObj,new Z({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,n,s,o;let d=(s=(n=(i=this._def).errorMap)===null||n===void 0?void 0:n.call(i,t,a).message)!==null&&s!==void 0?s:a.defaultError;return t.code==="unrecognized_keys"?{message:(o=_.errToObj(e).message)!==null&&o!==void 0?o:d}:{message:d}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}setKey(e,t){return this.augment({[e]:t})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>_e.mergeShapes(this._def.shape(),e._def.shape()),typeName:f.ZodObject})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){let t={};return x.objectKeys(e).map(a=>{this.shape[a]&&(t[a]=this.shape[a])}),new Z({...this._def,shape:()=>t})}omit(e){let t={};return x.objectKeys(this.shape).map(a=>{x.objectKeys(e).indexOf(a)===-1&&(t[a]=this.shape[a])}),new Z({...this._def,shape:()=>t})}deepPartial(){return L(this)}partial(e){let t={};if(e)return x.objectKeys(this.shape).map(a=>{x.objectKeys(e).indexOf(a)===-1?t[a]=this.shape[a]:t[a]=this.shape[a].optional()}),new Z({...this._def,shape:()=>t});for(let a in this.shape){let i=this.shape[a];t[a]=i.optional()}return new Z({...this._def,shape:()=>t})}required(e){let t={};if(e)x.objectKeys(this.shape).map(a=>{if(x.objectKeys(e).indexOf(a)===-1)t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof E;)i=i._def.innerType;t[a]=i}});else for(let a in this.shape){let i=this.shape[a];for(;i instanceof E;)i=i._def.innerType;t[a]=i}return new Z({...this._def,shape:()=>t})}keyof(){return Se(x.objectKeys(this.shape))}},"C");l(Z,"ZodObject");Z.create=(e,t)=>new Z({shape:()=>e,unknownKeys:"strip",catchall:S.create(),typeName:f.ZodObject,...v(t)});Z.strictCreate=(e,t)=>new Z({shape:()=>e,unknownKeys:"strict",catchall:S.create(),typeName:f.ZodObject,...v(t)});Z.lazycreate=(e,t)=>new Z({shape:e,unknownKeys:"strip",catchall:S.create(),typeName:f.ZodObject,...v(t)});var J=p(class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.options;function i(n){for(let o of n)if(o.result.status==="valid")return o.result;for(let o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;let s=n.map(o=>new j(o.ctx.common.issues));return h(t,{code:u.invalid_union,unionErrors:s}),y}if(p(i,"i"),l(i,"handleResults"),t.common.async)return Promise.all(a.map(async n=>{let s={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(i);{let n,s=[];for(let d of a){let m={...t,common:{...t.common,issues:[]},parent:null},b=d._parseSync({data:t.data,path:t.path,parent:m});if(b.status==="valid")return b;b.status==="dirty"&&!n&&(n={result:b,ctx:m}),m.common.issues.length&&s.push(m.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;let o=s.map(d=>new j(d));return h(t,{code:u.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}},"G");l(J,"ZodUnion");J.create=(e,t)=>new J({options:e,typeName:f.ZodUnion,...v(t)});var fe=l(e=>e instanceof H?fe(e.schema):e instanceof T?fe(e.innerType()):e instanceof Q?[e.value]:e instanceof te?e.options:e instanceof Y?Object.keys(e.enum):e instanceof X?fe(e._def.innerType):e instanceof F?[void 0]:e instanceof q?[null]:null,"getDiscriminator"),ke=p(class extends g{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.object)return h(t,{code:u.invalid_type,expected:c.object,received:t.parsedType}),y;let a=this.discriminator,i=t.data[a],n=this.optionsMap.get(i);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:u.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){let i=new Map;for(let n of t){let s=fe(n.shape[e]);if(!s)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of s){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,n)}}return new ke({typeName:f.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...v(a)})}},"ie");l(ke,"ZodDiscriminatedUnion");function be(e,t){let a=P(e),i=P(t);if(e===t)return{valid:!0,data:e};if(a===c.object&&i===c.object){let n=x.objectKeys(t),s=x.objectKeys(e).filter(d=>n.indexOf(d)!==-1),o={...e,...t};for(let d of s){let m=be(e[d],t[d]);if(!m.valid)return{valid:!1};o[d]=m.data}return{valid:!0,data:o}}else if(a===c.array&&i===c.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let s=0;s<e.length;s++){let o=e[s],d=t[s],m=be(o,d);if(!m.valid)return{valid:!1};n.push(m.data)}return{valid:!0,data:n}}else return a===c.date&&i===c.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}p(be,"Re");l(be,"mergeValues");var G=p(class extends g{_parse(e){let{status:t,ctx:a}=this._processInputParams(e),i=l((n,s)=>{if(Ce(n)||Ce(s))return y;let o=be(n.value,s.value);return o.valid?((Ee(n)||Ee(s))&&t.dirty(),{status:t.value,value:o.data}):(h(a,{code:u.invalid_intersection_types}),y)},"handleParsed");return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([n,s])=>i(n,s)):i(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}},"K");l(G,"ZodIntersection");G.create=(e,t,a)=>new G({left:e,right:t,typeName:f.ZodIntersection,...v(a)});var O=p(class extends g{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.array)return h(a,{code:u.invalid_type,expected:c.array,received:a.parsedType}),y;if(a.data.length<this._def.items.length)return h(a,{code:u.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&a.data.length>this._def.items.length&&(h(a,{code:u.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=a.data.map((n,s)=>{let o=this._def.items[s]||this._def.rest;return o?o._parse(new N(a,n,a.path,s)):null}).filter(n=>!!n);return a.common.async?Promise.all(i).then(n=>k.mergeArray(t,n)):k.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new O({...this._def,rest:e})}},"S");l(O,"ZodTuple");O.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new O({items:e,typeName:f.ZodTuple,rest:null,...v(t)})};var oe=p(class extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.object)return h(a,{code:u.invalid_type,expected:c.object,received:a.parsedType}),y;let i=[],n=this._def.keyType,s=this._def.valueType;for(let o in a.data)i.push({key:n._parse(new N(a,o,a.path,o)),value:s._parse(new N(a,a.data[o],a.path,o))});return a.common.async?k.mergeObjectAsync(t,i):k.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof g?new oe({keyType:e,valueType:t,typeName:f.ZodRecord,...v(a)}):new oe({keyType:I.create(),valueType:e,typeName:f.ZodRecord,...v(t)})}},"H");l(oe,"ZodRecord");var de=p(class extends g{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.map)return h(a,{code:u.invalid_type,expected:c.map,received:a.parsedType}),y;let i=this._def.keyType,n=this._def.valueType,s=[...a.data.entries()].map(([o,d],m)=>({key:i._parse(new N(a,o,a.path,[m,"key"])),value:n._parse(new N(a,d,a.path,[m,"value"]))}));if(a.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let d of s){let m=await d.key,b=await d.value;if(m.status==="aborted"||b.status==="aborted")return y;(m.status==="dirty"||b.status==="dirty")&&t.dirty(),o.set(m.value,b.value)}return{status:t.value,value:o}})}else{let o=new Map;for(let d of s){let m=d.key,b=d.value;if(m.status==="aborted"||b.status==="aborted")return y;(m.status==="dirty"||b.status==="dirty")&&t.dirty(),o.set(m.value,b.value)}return{status:t.value,value:o}}}},"se");l(de,"ZodMap");de.create=(e,t,a)=>new de({valueType:t,keyType:e,typeName:f.ZodMap,...v(a)});var U=p(class extends g{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==c.set)return h(a,{code:u.invalid_type,expected:c.set,received:a.parsedType}),y;let i=this._def;i.minSize!==null&&a.data.size<i.minSize.value&&(h(a,{code:u.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),i.maxSize!==null&&a.data.size>i.maxSize.value&&(h(a,{code:u.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let n=this._def.valueType;function s(d){let m=new Set;for(let b of d){if(b.status==="aborted")return y;b.status==="dirty"&&t.dirty(),m.add(b.value)}return{status:t.value,value:m}}p(s,"o"),l(s,"finalizeSet");let o=[...a.data.values()].map((d,m)=>n._parse(new N(a,d,a.path,m)));return a.common.async?Promise.all(o).then(d=>s(d)):s(o)}min(e,t){return new U({...this._def,minSize:{value:e,message:_.toString(t)}})}max(e,t){return new U({...this._def,maxSize:{value:e,message:_.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}},"P");l(U,"ZodSet");U.create=(e,t)=>new U({valueType:e,minSize:null,maxSize:null,typeName:f.ZodSet,...v(t)});var K=p(class extends g{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.function)return h(t,{code:u.invalid_type,expected:c.function,received:t.parsedType}),y;function a(o,d){return ye({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ie(),re].filter(m=>!!m),issueData:{code:u.invalid_arguments,argumentsError:d}})}p(a,"n"),l(a,"makeArgsIssue");function i(o,d){return ye({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ie(),re].filter(m=>!!m),issueData:{code:u.invalid_return_type,returnTypeError:d}})}p(i,"i"),l(i,"makeReturnsIssue");let n={errorMap:t.common.contextualErrorMap},s=t.data;return this._def.returns instanceof z?w(async(...o)=>{let d=new j([]),m=await this._def.args.parseAsync(o,n).catch(Te=>{throw d.addIssue(a(o,Te)),d}),b=await s(...m);return await this._def.returns._def.type.parseAsync(b,n).catch(Te=>{throw d.addIssue(i(b,Te)),d})}):w((...o)=>{let d=this._def.args.safeParse(o,n);if(!d.success)throw new j([a(o,d.error)]);let m=s(...d.data),b=this._def.returns.safeParse(m,n);if(!b.success)throw new j([i(m,b.error)]);return b.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new K({...this._def,args:O.create(e).rest(R.create())})}returns(e){return new K({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new K({args:e||O.create([]).rest(R.create()),returns:t||R.create(),typeName:f.ZodFunction,...v(a)})}},"$");l(K,"ZodFunction");var H=p(class extends g{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},"Q");l(H,"ZodLazy");H.create=(e,t)=>new H({getter:e,typeName:f.ZodLazy,...v(t)});var Q=p(class extends g{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}},"Y");l(Q,"ZodLiteral");Q.create=(e,t)=>new Q({value:e,typeName:f.ZodLiteral,...v(t)});function Se(e,t){return new te({values:e,typeName:f.ZodEnum,...v(t)})}p(Se,"Be");l(Se,"createZodEnum");var te=p(class extends g{_parse(e){if(typeof e.data!="string"){let t=this._getOrReturnCtx(e),a=this._def.values;return h(t,{expected:x.joinValues(a),received:t.parsedType,code:u.invalid_type}),y}if(this._def.values.indexOf(e.data)===-1){let t=this._getOrReturnCtx(e),a=this._def.values;return h(t,{received:t.data,code:u.invalid_enum_value,options:a}),y}return w(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}},"X");l(te,"ZodEnum");te.create=Se;var Y=p(class extends g{_parse(e){let t=x.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==c.string&&a.parsedType!==c.number){let i=x.objectValues(t);return h(a,{expected:x.joinValues(i),received:a.parsedType,code:u.invalid_type}),y}if(t.indexOf(e.data)===-1){let i=x.objectValues(t);return h(a,{received:a.data,code:u.invalid_enum_value,options:i}),y}return w(e.data)}get enum(){return this._def.values}},"F");l(Y,"ZodNativeEnum");Y.create=(e,t)=>new Y({values:e,typeName:f.ZodNativeEnum,...v(t)});var z=p(class extends g{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==c.promise&&t.common.async===!1)return h(t,{code:u.invalid_type,expected:c.promise,received:t.parsedType}),y;let a=t.parsedType===c.promise?t.data:Promise.resolve(t.data);return w(a.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}},"U");l(z,"ZodPromise");z.create=(e,t)=>new z({type:e,typeName:f.ZodPromise,...v(t)});var T=p(class extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===f.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:a}=this._processInputParams(e),i=this._def.effect||null;if(i.type==="preprocess"){let s=i.transform(a.data);return a.common.async?Promise.resolve(s).then(o=>this._def.schema._parseAsync({data:o,path:a.path,parent:a})):this._def.schema._parseSync({data:s,path:a.path,parent:a})}let n={addIssue:s=>{h(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(n.addIssue=n.addIssue.bind(n),i.type==="refinement"){let s=l(o=>{let d=i.refinement(o,n);if(a.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o},"executeRefinement");if(a.common.async===!1){let o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(i.type==="transform")if(a.common.async===!1){let s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!ge(s))return s;let o=i.transform(s.value,n);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:a.data,path:a.path,parent:a}).then(s=>ge(s)?Promise.resolve(i.transform(s.value,n)).then(o=>({status:t.value,value:o})):s);x.assertNever(i)}},"w");l(T,"ZodEffects");T.create=(e,t,a)=>new T({schema:e,typeName:f.ZodEffects,effect:t,...v(a)});T.createWithPreprocess=(e,t,a)=>new T({schema:t,effect:{type:"preprocess",transform:e},typeName:f.ZodEffects,...v(a)});var E=p(class extends g{_parse(e){return this._getType(e)===c.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"N");l(E,"ZodOptional");E.create=(e,t)=>new E({innerType:e,typeName:f.ZodOptional,...v(t)});var D=p(class extends g{_parse(e){return this._getType(e)===c.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},"L");l(D,"ZodNullable");D.create=(e,t)=>new D({innerType:e,typeName:f.ZodNullable,...v(t)});var X=p(class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return t.parsedType===c.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},"ee");l(X,"ZodDefault");X.create=(e,t)=>new X({innerType:e,typeName:f.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...v(t)});var le=p(class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.innerType._parse({data:t.data,path:t.path,parent:t});return ve(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.defaultValue()})):{status:"valid",value:a.status==="valid"?a.value:this._def.defaultValue()}}removeDefault(){return this._def.innerType}},"oe");l(le,"ZodCatch");le.create=(e,t)=>new le({innerType:e,typeName:f.ZodCatch,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...v(t)});var ue=p(class extends g{_parse(e){if(this._getType(e)!==c.nan){let t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:c.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}},"ce");l(ue,"ZodNaN");ue.create=e=>new ue({typeName:f.ZodNaN,...v(e)});var ta=Symbol("zod_brand"),Oe=p(class extends g{_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}},"fe");l(Oe,"ZodBranded");var pe=p(class extends g{_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return l(async()=>{let i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?y:i.status==="dirty"?(t.dirty(),We(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})},"handleAsync")();{let i=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?y:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:a.path,parent:a})}}static create(e,t){return new pe({in:e,out:t,typeName:f.ZodPipeline})}},"te");l(pe,"ZodPipeline");var qe=l((e,t={},a)=>e?$.create().superRefine((i,n)=>{if(!e(i)){let s=typeof t=="function"?t(i):t,o=typeof s=="string"?{message:s}:s;n.addIssue({code:"custom",...o,fatal:a})}}):$.create(),"custom"),aa={object:Z.lazycreate},f;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(f||(f={}));var ra=l((e,t={message:`Input not instance of ${e.name}`})=>qe(a=>a instanceof e,t,!0),"instanceOfType"),Je=I.create,Ge=A.create,ia=ue.create,na=B.create,He=W.create,sa=M.create,oa=ne.create,da=F.create,la=q.create,ua=$.create,ca=R.create,pa=S.create,ha=se.create,ma=C.create,fa=Z.create,ya=Z.strictCreate,ga=J.create,va=ke.create,_a=G.create,ba=O.create,xa=oe.create,Za=de.create,wa=U.create,ka=K.create,Ta=H.create,Ca=Q.create,Ea=te.create,Na=Y.create,ja=z.create,Ue=T.create,Sa=E.create,Oa=D.create,Ia=T.createWithPreprocess,Va=pe.create,Pa=l(()=>Je().optional(),"ostring"),Ra=l(()=>Ge().optional(),"onumber"),Aa=l(()=>He().optional(),"oboolean"),Da={string:e=>I.create({...e,coerce:!0}),number:e=>A.create({...e,coerce:!0}),boolean:e=>W.create({...e,coerce:!0}),bigint:e=>B.create({...e,coerce:!0}),date:e=>M.create({...e,coerce:!0})},La=y,r=Object.freeze({__proto__:null,defaultErrorMap:re,setErrorMap:Be,getErrorMap:ie,makeIssue:ye,EMPTY_PATH:Ht,addIssueToContext:h,ParseStatus:k,INVALID:y,DIRTY:We,OK:w,isAborted:Ce,isDirty:Ee,isValid:ge,isAsync:ve,get util(){return x},ZodParsedType:c,getParsedType:P,ZodType:g,ZodString:I,ZodNumber:A,ZodBigInt:B,ZodBoolean:W,ZodDate:M,ZodSymbol:ne,ZodUndefined:F,ZodNull:q,ZodAny:$,ZodUnknown:R,ZodNever:S,ZodVoid:se,ZodArray:C,get objectUtil(){return _e},ZodObject:Z,ZodUnion:J,ZodDiscriminatedUnion:ke,ZodIntersection:G,ZodTuple:O,ZodRecord:oe,ZodMap:de,ZodSet:U,ZodFunction:K,ZodLazy:H,ZodLiteral:Q,ZodEnum:te,ZodNativeEnum:Y,ZodPromise:z,ZodEffects:T,ZodTransformer:T,ZodOptional:E,ZodNullable:D,ZodDefault:X,ZodCatch:le,ZodNaN:ue,BRAND:ta,ZodBranded:Oe,ZodPipeline:pe,custom:qe,Schema:g,ZodSchema:g,late:aa,get ZodFirstPartyTypeKind(){return f},coerce:Da,any:ua,array:ma,bigint:na,boolean:He,date:sa,discriminatedUnion:va,effect:Ue,enum:Ea,function:ka,instanceof:ra,intersection:_a,lazy:Ta,literal:Ca,map:Za,nan:ia,nativeEnum:Na,never:pa,null:la,nullable:Oa,number:Ge,object:fa,oboolean:Aa,onumber:Ra,optional:Sa,ostring:Pa,pipeline:Va,preprocess:Ia,promise:ja,record:xa,set:wa,strictObject:ya,string:Je,symbol:oa,transformer:Ue,tuple:ba,undefined:da,union:ga,unknown:ca,void:ha,NEVER:La,ZodIssueCode:u,quotelessJson:Gt,ZodError:j}),Ie=r.array(r.string().or(r.record(r.any()))),Ma=r.object({type:r.string().optional(),narrative:r.string().optional()}),he=r.string().or(r.object({id:r.string(),type:r.string(),caption:r.string().optional()})),Qe=r.object({type:r.string().min(1).or(r.string().array().nonempty()),latitude:r.number(),longitude:r.number()}),Ye=r.object({type:r.string().min(1).or(r.string().array().nonempty()),addressCountry:r.string().optional(),addressCountryCode:r.string().optional(),addressRegion:r.string().optional(),addressLocality:r.string().optional(),streetAddress:r.string().optional(),postOfficeBoxNumber:r.string().optional(),postalCode:r.string().optional(),geo:Qe.optional()}),Xe=r.enum(["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]).or(r.string()),Ve=r.object({type:r.string().min(1).or(r.string().array().nonempty()),identifier:r.string(),identifierType:Xe}),ee=r.string().or(r.object({id:r.string().optional(),type:r.string().or(r.string().array().nonempty().optional()),name:r.string().optional(),url:r.string().optional(),phone:r.string().optional(),description:r.string().optional(),endorsement:r.any().array().optional(),image:he.optional(),email:r.string().email().optional(),address:Ye.optional(),otherIdentifier:Ve.array().optional(),official:r.string().optional(),parentOrg:r.any().optional(),familyName:r.string().optional(),givenName:r.string().optional(),additionalName:r.string().optional(),patronymicName:r.string().optional(),honorificPrefix:r.string().optional(),honorificSuffix:r.string().optional(),familyNamePrefix:r.string().optional(),dateOfBirth:r.string().optional()}).catchall(r.any())),xe=r.object({id:r.string().optional()}).catchall(r.any()),et=r.object({type:r.string(),id:r.string()}).catchall(r.any()),tt=r.object({id:r.string(),type:r.string()}).catchall(r.any()),at=r.object({id:r.string(),type:r.string()}).catchall(r.any()),ce=r.object({"@context":Ie,id:r.string().optional(),type:r.string().array().nonempty(),issuer:ee,issuanceDate:r.string(),expirationDate:r.string().optional(),credentialSubject:xe.or(xe.array()),credentialStatus:et.optional(),credentialSchema:tt.array().optional(),refreshService:at.optional()}).catchall(r.any()),V=r.object({type:r.string(),created:r.string(),challenge:r.string().optional(),domain:r.string().optional(),nonce:r.string().optional(),proofPurpose:r.string(),verificationMethod:r.string(),jws:r.string().optional()}).catchall(r.any()),Ne=ce.extend({proof:V.or(V.array())}),rt=r.object({"@context":Ie,id:r.string().optional(),type:r.string().or(r.string().array().nonempty()),verifiableCredential:Ne.or(Ne.array()).optional(),holder:r.string().optional()}).catchall(r.any()),$a=rt.extend({proof:V.or(V.array())}),it=r.enum(["ceasn:Competency","ceterms:Credential","CFItem","CFRubric","CFRubricCriterion","CFRubricCriterionLevel","CTDL"]).or(r.string()),me=r.object({type:r.string().array().nonempty(),targetCode:r.string().optional(),targetDescription:r.string().optional(),targetName:r.string(),targetFramework:r.string().optional(),targetType:it.optional(),targetUrl:r.string()}),nt=r.enum(["Achievement","ApprenticeshipCertificate","Assessment","Assignment","AssociateDegree","Award","Badge","BachelorDegree","Certificate","CertificateOfCompletion","Certification","CommunityService","Competency","Course","CoCurricular","Degree","Diploma","DoctoralDegree","Fieldwork","GeneralEducationDevelopment","JourneymanCertificate","LearningProgram","License","Membership","ProfessionalDoctorate","QualityAssuranceCredential","MasterCertificate","MasterDegree","MicroCredential","ResearchDoctorate","SecondarySchoolDiploma"]),st=nt.or(r.string()),ot=r.object({id:r.string().optional(),narrative:r.string().optional()}).catchall(r.any()),dt=r.object({id:r.string(),type:r.string().array().nonempty(),endorsementComment:r.string().optional()}),lt=ce.extend({credentialSubject:dt,proof:V.or(V.array()).optional()}),ut=r.object({id:r.string(),"@language":r.string().optional(),version:r.string().optional()}),ct=r.enum(["GradePointAverage","LetterGrade","Percent","PerformanceLevel","PredictedScore","RawScore","Result","RubricCriterion","RubricCriterionLevel","RubricScore","ScaledScore","Status"]).or(r.string()),pt=r.object({id:r.string(),type:r.string().array().nonempty(),alignment:me.array().optional(),description:r.string().optional(),level:r.string().optional(),name:r.string(),points:r.string().optional()}).catchall(r.any()),ht=r.object({id:r.string(),type:r.string().array().nonempty(),alignment:me.array().optional(),allowedValue:r.string().array().optional(),name:r.string(),requiredLevel:r.string().optional(),requiredValue:r.string().optional(),resultType:ct,rubricCriterionLevel:pt.array().optional(),valueMax:r.string().optional(),valueMin:r.string().optional()}).catchall(r.any()),mt=r.object({id:r.string().optional(),type:r.string().array().nonempty(),alignment:me.array().optional(),achievementType:st.optional(),creator:ee.optional(),creditsAvailable:r.number().optional(),criteria:ot,description:r.string(),endorsement:lt.array().optional(),fieldOfStudy:r.string().optional(),humanCode:r.string().optional(),image:he.optional(),"@language":r.string().optional(),name:r.string(),otherIdentifier:Ve.array().optional(),related:ut.array().optional(),resultDescription:ht.array().optional(),specialization:r.string().optional(),tag:r.string().array().optional(),version:r.string().optional()}).catchall(r.any()),ft=r.object({type:r.string(),hashed:r.boolean(),identityHash:r.string(),identityType:r.string(),salt:r.string().optional()}),yt=r.enum(["Completed","Enrolled","Failed","InProgress","OnHold","Withdrew"]),gt=r.object({type:r.string().array().nonempty(),achievedLevel:r.string().optional(),alignment:me.array().optional(),resultDescription:r.string().optional(),status:yt.optional(),value:r.string().optional()}).catchall(r.any()),je=r.object({id:r.string().optional(),type:r.string().array().nonempty(),activityEndDate:r.string().optional(),activityStartDate:r.string().optional(),creditsEarned:r.number().optional(),achievement:mt.optional(),identifier:ft.array().optional(),image:he.optional(),licenseNumber:r.string().optional(),narrative:r.string().optional(),result:gt.array().optional(),role:r.string().optional(),source:ee.optional(),term:r.string().optional()}).catchall(r.any()),vt=r.object({id:r.string().optional(),type:r.string().array().nonempty(),narrative:r.string().optional(),name:r.string().optional(),description:r.string().optional(),genre:r.string().optional(),audience:r.string().optional()}).catchall(r.any()),_t=ce.extend({name:r.string().optional(),description:r.string().optional(),image:he.optional(),credentialSubject:je.or(je.array()),endorsement:ce.array().optional(),evidence:vt.array().optional()}),Ua=_t.extend({proof:V.or(V.array())}),za=r.object({checks:r.string().array(),warnings:r.string().array(),errors:r.string().array()}),Pe=r.enum(["Success","Failed","Error"]),Ka=Pe.enum,Ba=r.object({check:r.string(),status:Pe,message:r.string().optional(),details:r.string().optional()}),Wa=r.object({title:r.string().optional(),createdAt:r.string().optional(),issuer:ee.optional(),issuee:ee.optional(),credentialSubject:xe.optional()}),Fa=r.object({id:r.string(),uri:r.string()}).catchall(r.any()),qa=r.object({limit:r.number(),cursor:r.string().optional()}),Re=r.object({cursor:r.string().optional(),hasMore:r.boolean()}),bt=r.object({kty:r.string(),crv:r.string(),x:r.string(),y:r.string().optional(),n:r.string().optional(),d:r.string()}),xt=r.object({alg:r.string(),iv:r.string(),tag:r.string(),epk:bt.partial().optional(),kid:r.string().optional(),apv:r.string().optional(),apu:r.string().optional()}),Zt=r.object({header:xt,encrypted_key:r.string()}),wt=r.object({protected:r.string(),iv:r.string(),ciphertext:r.string(),tag:r.string(),aad:r.string().optional(),recipients:Zt.array().optional()}),Ae=r.object({encryptedRecord:wt,fields:r.string().array()}).catchall(r.any()),Ja=Re.extend({records:Ae.array()}),kt=Ae.extend({id:r.string()}),Ga=Re.extend({records:kt.array()}),Ze=r.object({profileId:r.string().min(3).max(40),displayName:r.string().default(""),did:r.string(),email:r.string().optional(),image:r.string().optional(),isServiceProfile:r.boolean().default(!1).optional(),notificationsWebhook:r.string().url().startsWith("https://").optional()}),Ha=r.enum(["CONNECTED","PENDING_REQUEST_SENT","PENDING_REQUEST_RECEIVED","NOT_CONNECTED"]),Qa=r.object({uri:r.string(),to:r.string(),from:r.string(),sent:r.string().datetime(),received:r.string().datetime().optional()}),Tt=r.enum(["DRAFT","LIVE"]),Ya=r.object({uri:r.string(),name:r.string().optional(),type:r.string().optional(),category:r.string().optional(),status:Tt.optional()}),Xa=r.object({to:Ze,from:r.string(),received:r.string().optional()}),Ct=r.enum(["CONNECTION_REQUEST","CONNECTION_ACCEPTED","CREDENTIAL_RECEIVED","CREDENTIAL_ACCEPTED","BOOST_RECEIVED","BOOST_ACCEPTED","PRESENTATION_REQUEST","PRESENTATION_RECEIVED"]),Et=r.object({title:r.string().optional(),body:r.string().optional()}),Nt=r.object({vcUris:r.array(r.string()).optional(),vpUris:r.array(r.string()).optional()}),er=r.object({type:Ct,to:Ze.partial().and(r.object({did:r.string()})),from:Ze.partial().and(r.object({did:r.string()})),message:Et.optional(),data:Nt.optional(),sent:r.string().datetime().optional()}),tr=r.object({endpoint:r.string(),name:r.string(),did:r.string().optional()}),ar=r.object({ttlSeconds:r.number().optional(),totalUses:r.number().optional()}),jt=r.object({endpoint:r.string()}),rr=r.object({signingAuthority:jt,relationship:r.object({name:r.string().max(15).regex(/^[a-z0-9-]+$/,{message:"The input string must contain only lowercase letters, numbers, and hyphens."}),did:r.string()})})});var Vt=De((Jr,It)=>{"use strict";It.exports=Ot()});var sr={};$t(sr,{isEncrypted:()=>nr,isHex:()=>ir});module.exports=zt(sr);var Pt=Ut(Vt()),ir=p(e=>/^[0-9a-f]+$/i.test(e),"isHex"),nr=p(e=>Pt.JWEValidator.safeParse(e).success,"isEncrypted");