@huddle01/iframe
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -7,5 +7,4 @@ import HuddleIframe from './components/HuddleIframe'; | ||
background?: string | undefined; | ||
gradientAndMesh?: boolean | undefined; | ||
redirectUrlOnLeave?: string | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "okxwallet" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
lobbyLoginMessage?: string | undefined; | ||
@@ -12,0 +11,0 @@ lobbyTitle?: string | undefined; |
@@ -1,2 +0,2 @@ | ||
import { IRoleEnum, TRejectReasons } from 'types/dist/common.types'; | ||
import { IRoleEnum, TRecData, TRejectReasons } from 'types/dist/common.types'; | ||
import { z } from 'zod'; | ||
@@ -10,2 +10,3 @@ export declare const AllowedWallets: { | ||
readonly phantom: "phantom"; | ||
readonly beacon: "beacon"; | ||
readonly okxwallet: "okxwallet"; | ||
@@ -21,5 +22,4 @@ readonly lens: "lens"; | ||
background: z.ZodOptional<z.ZodString>; | ||
gradientAndMesh: z.ZodOptional<z.ZodBoolean>; | ||
redirectUrlOnLeave: z.ZodOptional<z.ZodString>; | ||
wallets: z.ZodOptional<z.ZodArray<z.ZodEnum<["*", ...("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "okxwallet" | "lens" | "ud" | "cyberconnect")[]]>, "many">>; | ||
wallets: z.ZodOptional<z.ZodArray<z.ZodEnum<["*", ...("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "lens" | "ud" | "cyberconnect")[]]>, "many">>; | ||
lobbyLoginMessage: z.ZodOptional<z.ZodString>; | ||
@@ -31,5 +31,4 @@ lobbyTitle: z.ZodOptional<z.ZodString>; | ||
background?: string | undefined; | ||
gradientAndMesh?: boolean | undefined; | ||
redirectUrlOnLeave?: string | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "okxwallet" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
lobbyLoginMessage?: string | undefined; | ||
@@ -41,5 +40,4 @@ lobbyTitle?: string | undefined; | ||
background?: string | undefined; | ||
gradientAndMesh?: boolean | undefined; | ||
redirectUrlOnLeave?: string | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "okxwallet" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
wallets?: ("*" | "metamask" | "walletconnect" | "keplr" | "templewallet" | "phantom" | "beacon" | "okxwallet" | "lens" | "ud" | "cyberconnect")[] | undefined; | ||
lobbyLoginMessage?: string | undefined; | ||
@@ -74,2 +72,3 @@ lobbyTitle?: string | undefined; | ||
'room:recording-stopped': []; | ||
'room:recording-data': [TRecData]; | ||
'room:livestream-started': []; | ||
@@ -76,0 +75,0 @@ 'room:livestream-stopped': []; |
export * from "./declarations/src/index"; | ||
//# sourceMappingURL=huddle01-iframe.cjs.d.ts.map |
{ | ||
"name": "@huddle01/iframe", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "", | ||
@@ -10,4 +10,5 @@ "main": "dist/huddle01-iframe.cjs.js", | ||
"fix": "pnpm preconstruct fix", | ||
"build": "pnpm preconstruct build", | ||
"watch": "pnpm preconstruct watch" | ||
"build": "pnpm del && pnpm preconstruct build", | ||
"watch": "pnpm preconstruct watch", | ||
"del": "rimraf dist types/dist " | ||
}, | ||
@@ -41,2 +42,3 @@ "keywords": [], | ||
"react": "^18.2.0", | ||
"rimraf": "^4.1.2", | ||
"types": "workspace:*" | ||
@@ -43,0 +45,0 @@ }, |
export * from "../../dist/declarations/src/types/index"; | ||
//# sourceMappingURL=huddle01-iframe-types.cjs.d.ts.map |
@@ -39,3 +39,3 @@ 'use strict'; | ||
// Can be used in future to restrict wallets based on chain | ||
// const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana']; | ||
// const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana', "etc"]; | ||
@@ -50,2 +50,3 @@ // keys are the names of the connectors from wallet01, values are the names of the wallets for iframe | ||
phantom: 'phantom', | ||
beacon: 'beacon', | ||
okxwallet: 'okxwallet', | ||
@@ -61,3 +62,2 @@ // or | ||
background: zod.z.string().optional(), | ||
gradientAndMesh: zod.z["boolean"]().optional(), | ||
redirectUrlOnLeave: zod.z.string().optional(), | ||
@@ -64,0 +64,0 @@ wallets: zod.z.array(zod.z["enum"](['*'].concat(_toConsumableArray(Object.values(AllowedWallets))))).optional(), |
@@ -39,3 +39,3 @@ 'use strict'; | ||
// Can be used in future to restrict wallets based on chain | ||
// const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana']; | ||
// const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana', "etc"]; | ||
@@ -50,2 +50,3 @@ // keys are the names of the connectors from wallet01, values are the names of the wallets for iframe | ||
phantom: 'phantom', | ||
beacon: 'beacon', | ||
okxwallet: 'okxwallet', | ||
@@ -61,3 +62,2 @@ // or | ||
background: zod.z.string().optional(), | ||
gradientAndMesh: zod.z["boolean"]().optional(), | ||
redirectUrlOnLeave: zod.z.string().optional(), | ||
@@ -64,0 +64,0 @@ wallets: zod.z.array(zod.z["enum"](['*'].concat(_toConsumableArray(Object.values(AllowedWallets))))).optional(), |
@@ -35,3 +35,3 @@ import { z } from 'zod'; | ||
// Can be used in future to restrict wallets based on chain | ||
// const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana']; | ||
// const allowedChains = ['ethereum', 'tezos', 'cosmos', 'solana', "etc"]; | ||
@@ -46,2 +46,3 @@ // keys are the names of the connectors from wallet01, values are the names of the wallets for iframe | ||
phantom: 'phantom', | ||
beacon: 'beacon', | ||
okxwallet: 'okxwallet', | ||
@@ -57,3 +58,2 @@ // or | ||
background: z.string().optional(), | ||
gradientAndMesh: z["boolean"]().optional(), | ||
redirectUrlOnLeave: z.string().optional(), | ||
@@ -60,0 +60,0 @@ wallets: z.array(z["enum"](['*'].concat(_toConsumableArray(Object.values(AllowedWallets))))).optional(), |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HuddleIframeTypes={})}(this,(function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}var a,s;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of a)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(a||(a={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(s||(s={}));const n=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),r=e=>{switch(typeof e){case"undefined":return n.undefined;case"string":return n.string;case"number":return isNaN(e)?n.nan:n.number;case"boolean":return n.boolean;case"function":return n.function;case"bigint":return n.bigint;case"symbol":return n.symbol;case"object":return Array.isArray(e)?n.array:null===e?n.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?n.promise:"undefined"!=typeof Map&&e instanceof Map?n.map:"undefined"!=typeof Set&&e instanceof Set?n.set:"undefined"!=typeof Date&&e instanceof Date?n.date:n.object;default:return n.unknown}},i=a.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"]);class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(s);else if("invalid_return_type"===n.code)s(n.returnTypeError);else if("invalid_arguments"===n.code)s(n.argumentsError);else if(0===n.path.length)a._errors.push(t(n));else{let e=a,s=0;for(;s<n.path.length;){const a=n.path[s];s===n.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(n))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>new o(e);const d=(e,t)=>{let s;switch(e.code){case i.invalid_type:s=e.received===n.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case i.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case i.unrecognized_keys:s=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case i.invalid_union:s="Invalid input";break;case i.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case i.invalid_enum_value:s=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case i.invalid_arguments:s="Invalid function arguments";break;case i.invalid_return_type:s="Invalid function return type";break;case i.invalid_date:s="Invalid date";break;case i.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:a.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case i.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case i.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case i.custom:s="Invalid input";break;case i.invalid_intersection_types:s="Intersection results could not be merged";break;case i.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case i.not_finite:s="Number must be finite";break;default:s=t.defaultError,a.assertNever(e)}return{message:s}};let c=d;function u(){return c}const l=e=>{const{data:t,path:a,errorMaps:s,issueData:n}=e,r=[...a,...n.path||[]],i={...n,path:r};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...n,path:r,message:n.message||o}};function p(e,t){const a=l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,u(),d].filter((e=>!!e))});e.common.issues.push(a)}class h{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return m;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return h.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:n}=s;if("aborted"===t.status)return m;if("aborted"===n.status)return m;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),(void 0!==n.value||s.alwaysSet)&&(a[t.value]=n.value)}return{status:e.value,value:a}}}const m=Object.freeze({status:"aborted"}),f=e=>({status:"dirty",value:e}),y=e=>({status:"valid",value:e}),_=e=>"aborted"===e.status,v=e=>"dirty"===e.status,g=e=>"valid"===e.status,x=e=>"undefined"!=typeof Promise&&e instanceof Promise;var b;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(b||(b={}));class k{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const w=(e,t)=>{if(g(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new o(e.common.issues);return this._error=t,this._error}}};function Z(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:n}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:n};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=s?s:t.defaultError}:{message:null!=a?a:t.defaultError},description:n}}class T{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 r(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new h,ctx:{common:e.parent.common,data:e.data,parsedType:r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(x(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r(e)},n=this._parseSync({data:e,path:s.path,parent:s});return w(s,n)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r(e)},s=this._parse({data:e,path:a.path,parent:a}),n=await(x(s)?s:Promise.resolve(s));return w(a,n)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const n=e(t),r=()=>s.addIssue({code:i.custom,...a(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(r(),!1))):!!n||(r(),!1)}))}refinement(e,t){return this._refinement(((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1)))}_refinement(e){return new pe({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return he.create(this,this._def)}nullable(){return me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return F.create(this,this._def)}promise(){return le.create(this,this._def)}or(e){return Y.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new pe({...Z(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new fe({...Z(this._def),innerType:this,defaultValue:t,typeName:we.ZodDefault})}brand(){return new ge({typeName:we.ZodBranded,type:this,...Z(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ye({...Z(this._def),innerType:this,catchValue:t,typeName:we.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return xe.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const O=/^c[^\s-]{8,}$/i,N=/^[a-z][a-z0-9]*$/,S=/[0-9A-HJKMNP-TV-Z]{26}/,C=/^([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,j=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,E=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,I=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,P=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class A extends T{constructor(){super(...arguments),this._regex=(e,t,a)=>this.refinement((t=>e.test(t)),{validation:t,code:i.invalid_string,...b.errToObj(a)}),this.nonempty=e=>this.min(1,b.errToObj(e)),this.trim=()=>new A({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new A({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==n.string){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.string,received:t.parsedType}),m}const t=new h;let s;for(const n of this._def.checks)if("min"===n.kind)e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("max"===n.kind)e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("length"===n.kind){const a=e.data.length>n.value,r=e.data.length<n.value;(a||r)&&(s=this._getOrReturnCtx(e,s),a?p(s,{code:i.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):r&&p(s,{code:i.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if("email"===n.kind)j.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"email",code:i.invalid_string,message:n.message}),t.dirty());else if("emoji"===n.kind)E.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"emoji",code:i.invalid_string,message:n.message}),t.dirty());else if("uuid"===n.kind)C.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"uuid",code:i.invalid_string,message:n.message}),t.dirty());else if("cuid"===n.kind)O.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid",code:i.invalid_string,message:n.message}),t.dirty());else if("cuid2"===n.kind)N.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid2",code:i.invalid_string,message:n.message}),t.dirty());else if("ulid"===n.kind)S.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ulid",code:i.invalid_string,message:n.message}),t.dirty());else if("url"===n.kind)try{new URL(e.data)}catch(a){s=this._getOrReturnCtx(e,s),p(s,{validation:"url",code:i.invalid_string,message:n.message}),t.dirty()}else if("regex"===n.kind){n.regex.lastIndex=0;n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"regex",code:i.invalid_string,message:n.message}),t.dirty())}else if("trim"===n.kind)e.data=e.data.trim();else if("includes"===n.kind)e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty());else if("toLowerCase"===n.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===n.kind)e.data=e.data.toUpperCase();else if("startsWith"===n.kind)e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty());else if("endsWith"===n.kind)e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty());else if("datetime"===n.kind){((d=n).precision?d.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}Z$`):0===d.precision?d.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$"):d.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$")).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:"datetime",message:n.message}),t.dirty())}else"ip"===n.kind?(r=e.data,("v4"!==(o=n.version)&&o||!I.test(r))&&("v6"!==o&&o||!P.test(r))&&(s=this._getOrReturnCtx(e,s),p(s,{validation:"ip",code:i.invalid_string,message:n.message}),t.dirty())):a.assertNever(n);var r,o,d;return{status:t.value,value:e.data}}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...b.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...b.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...b.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...b.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...b.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...b.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function R(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,n=a>s?a:s;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}A.create=e=>{var t;return new A({checks:[],typeName:we.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Z(e)})};class M extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==n.number){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.number,received:t.parsedType}),m}let t;const s=new h;for(const n of this._def.checks)if("int"===n.kind)a.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:i.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty())}else"multipleOf"===n.kind?0!==R(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_finite,message:n.message}),s.dirty()):a.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,s){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(s)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=e=>new M({checks:[],typeName:we.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Z(e)});class $ extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==n.bigint){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.bigint,received:t.parsedType}),m}let t;const s=new h;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):a.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,s){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(s)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}$.create=e=>{var t;return new $({checks:[],typeName:we.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Z(e)})};class L extends T{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==n.boolean){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.boolean,received:t.parsedType}),m}return y(e.data)}}L.create=e=>new L({typeName:we.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Z(e)});class D extends T{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==n.date){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.date,received:t.parsedType}),m}if(isNaN(e.data.getTime())){return p(this._getOrReturnCtx(e),{code:i.invalid_date}),m}const t=new h;let s;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):a.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}D.create=e=>new D({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:we.ZodDate,...Z(e)});class z extends T{_parse(e){if(this._getType(e)!==n.symbol){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.symbol,received:t.parsedType}),m}return y(e.data)}}z.create=e=>new z({typeName:we.ZodSymbol,...Z(e)});class U extends T{_parse(e){if(this._getType(e)!==n.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.undefined,received:t.parsedType}),m}return y(e.data)}}U.create=e=>new U({typeName:we.ZodUndefined,...Z(e)});class V extends T{_parse(e){if(this._getType(e)!==n.null){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.null,received:t.parsedType}),m}return y(e.data)}}V.create=e=>new V({typeName:we.ZodNull,...Z(e)});class K extends T{constructor(){super(...arguments),this._any=!0}_parse(e){return y(e.data)}}K.create=e=>new K({typeName:we.ZodAny,...Z(e)});class B extends T{constructor(){super(...arguments),this._unknown=!0}_parse(e){return y(e.data)}}B.create=e=>new B({typeName:we.ZodUnknown,...Z(e)});class W extends T{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.never,received:t.parsedType}),m}}W.create=e=>new W({typeName:we.ZodNever,...Z(e)});class q extends T{_parse(e){if(this._getType(e)!==n.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.void,received:t.parsedType}),m}return y(e.data)}}q.create=e=>new q({typeName:we.ZodVoid,...Z(e)});class F extends T{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==n.array)return p(t,{code:i.invalid_type,expected:n.array,received:t.parsedType}),m;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,n=t.data.length<s.exactLength.value;(e||n)&&(p(t,{code:e?i.too_big:i.too_small,minimum:n?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(p(t,{code:i.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(p(t,{code:i.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>s.type._parseAsync(new k(t,e,t.path,a))))).then((e=>h.mergeArray(a,e)));const r=[...t.data].map(((e,a)=>s.type._parseSync(new k(t,e,t.path,a))));return h.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new F({...this._def,minLength:{value:e,message:b.toString(t)}})}max(e,t){return new F({...this._def,maxLength:{value:e,message:b.toString(t)}})}length(e,t){return new F({...this._def,exactLength:{value:e,message:b.toString(t)}})}nonempty(e){return this.min(1,e)}}function J(e){if(e instanceof H){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=he.create(J(s))}return new H({...e._def,shape:()=>t})}return e instanceof F?new F({...e._def,type:J(e.element)}):e instanceof he?he.create(J(e.unwrap())):e instanceof me?me.create(J(e.unwrap())):e instanceof te?te.create(e.items.map((e=>J(e)))):e}F.create=(e,t)=>new F({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Z(t)});class H extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==n.object){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.object,received:t.parsedType}),m}const{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:r}=this._getCached(),o=[];if(!(this._def.catchall instanceof W&&"strip"===this._def.unknownKeys))for(const e in a.data)r.includes(e)||o.push(e);const d=[];for(const e of r){const t=s[e],n=a.data[e];d.push({key:{status:"valid",value:e},value:t._parse(new k(a,n,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof W){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)d.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)o.length>0&&(p(a,{code:i.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const s=a.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new k(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>h.mergeObjectSync(t,e))):h.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new H({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var s,n,r,i;const o=null!==(r=null===(n=(s=this._def).errorMap)||void 0===n?void 0:n.call(s,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=b.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new H({...this._def,unknownKeys:"strip"})}passthrough(){return new H({...this._def,unknownKeys:"passthrough"})}extend(e){return new H({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new H({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new H({...this._def,catchall:e})}pick(e){const t={};return a.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new H({...this._def,shape:()=>t})}omit(e){const t={};return a.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new H({...this._def,shape:()=>t})}deepPartial(){return J(this)}partial(e){const t={};return a.objectKeys(this.shape).forEach((a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()})),new H({...this._def,shape:()=>t})}required(e){const t={};return a.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof he;)e=e._def.innerType;t[a]=e}})),new H({...this._def,shape:()=>t})}keyof(){return de(a.objectKeys(this.shape))}}H.create=(e,t)=>new H({shape:()=>e,unknownKeys:"strip",catchall:W.create(),typeName:we.ZodObject,...Z(t)}),H.strictCreate=(e,t)=>new H({shape:()=>e,unknownKeys:"strict",catchall:W.create(),typeName:we.ZodObject,...Z(t)}),H.lazycreate=(e,t)=>new H({shape:e,unknownKeys:"strip",catchall:W.create(),typeName:we.ZodObject,...Z(t)});class Y extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new o(e.ctx.common.issues)));return p(t,{code:i.invalid_union,unionErrors:a}),m}));{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=s.map((e=>new o(e)));return p(t,{code:i.invalid_union,unionErrors:n}),m}}get options(){return this._def.options}}Y.create=(e,t)=>new Y({options:e,typeName:we.ZodUnion,...Z(t)});const G=e=>e instanceof ie?G(e.schema):e instanceof pe?G(e.innerType()):e instanceof oe?[e.value]:e instanceof ce?e.options:e instanceof ue?Object.keys(e.enum):e instanceof fe?G(e._def.innerType):e instanceof U?[void 0]:e instanceof V?[null]:null;class X extends T{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.object)return p(t,{code:i.invalid_type,expected:n.object,received:t.parsedType}),m;const a=this.discriminator,s=t.data[a],r=this.optionsMap.get(s);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:i.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=G(a.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(s.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);s.set(n,a)}}return new X({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...Z(a)})}}function Q(e,t){const s=r(e),i=r(t);if(e===t)return{valid:!0,data:e};if(s===n.object&&i===n.object){const s=a.objectKeys(t),n=a.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...t};for(const a of n){const s=Q(e[a],t[a]);if(!s.valid)return{valid:!1};r[a]=s.data}return{valid:!0,data:r}}if(s===n.array&&i===n.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const n=Q(e[s],t[s]);if(!n.valid)return{valid:!1};a.push(n.data)}return{valid:!0,data:a}}return s===n.date&&i===n.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ee extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(_(e)||_(s))return m;const n=Q(e.value,s.value);return n.valid?((v(e)||v(s))&&t.dirty(),{status:t.value,value:n.data}):(p(a,{code:i.invalid_intersection_types}),m)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>s(e,t))):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ee.create=(e,t,a)=>new ee({left:e,right:t,typeName:we.ZodIntersection,...Z(a)});class te extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.array)return p(a,{code:i.invalid_type,expected:n.array,received:a.parsedType}),m;if(a.data.length<this._def.items.length)return p(a,{code:i.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&a.data.length>this._def.items.length&&(p(a,{code:i.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...a.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new k(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(s).then((e=>h.mergeArray(t,e))):h.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new te({...this._def,rest:e})}}te.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new te({items:e,typeName:we.ZodTuple,rest:null,...Z(t)})};class ae extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.object)return p(a,{code:i.invalid_type,expected:n.object,received:a.parsedType}),m;const s=[],r=this._def.keyType,o=this._def.valueType;for(const e in a.data)s.push({key:r._parse(new k(a,e,a.path,e)),value:o._parse(new k(a,a.data[e],a.path,e))});return a.common.async?h.mergeObjectAsync(t,s):h.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new ae(t instanceof T?{keyType:e,valueType:t,typeName:we.ZodRecord,...Z(a)}:{keyType:A.create(),valueType:e,typeName:we.ZodRecord,...Z(t)})}}class se extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.map)return p(a,{code:i.invalid_type,expected:n.map,received:a.parsedType}),m;const s=this._def.keyType,r=this._def.valueType,o=[...a.data.entries()].map((([e,t],n)=>({key:s._parse(new k(a,e,a.path,[n,"key"])),value:r._parse(new k(a,t,a.path,[n,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of o){const s=await a.key,n=await a.value;if("aborted"===s.status||"aborted"===n.status)return m;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of o){const s=a.key,n=a.value;if("aborted"===s.status||"aborted"===n.status)return m;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}}}se.create=(e,t,a)=>new se({valueType:t,keyType:e,typeName:we.ZodMap,...Z(a)});class ne extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.set)return p(a,{code:i.invalid_type,expected:n.set,received:a.parsedType}),m;const s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(p(a,{code:i.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(p(a,{code:i.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const r=this._def.valueType;function o(e){const a=new Set;for(const s of e){if("aborted"===s.status)return m;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const d=[...a.data.values()].map(((e,t)=>r._parse(new k(a,e,a.path,t))));return a.common.async?Promise.all(d).then((e=>o(e))):o(d)}min(e,t){return new ne({...this._def,minSize:{value:e,message:b.toString(t)}})}max(e,t){return new ne({...this._def,maxSize:{value:e,message:b.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ne.create=(e,t)=>new ne({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...Z(t)});class re extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.function)return p(t,{code:i.invalid_type,expected:n.function,received:t.parsedType}),m;function a(e,a){return l({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u(),d].filter((e=>!!e)),issueData:{code:i.invalid_arguments,argumentsError:a}})}function s(e,a){return l({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u(),d].filter((e=>!!e)),issueData:{code:i.invalid_return_type,returnTypeError:a}})}const r={errorMap:t.common.contextualErrorMap},c=t.data;return this._def.returns instanceof le?y((async(...e)=>{const t=new o([]),n=await this._def.args.parseAsync(e,r).catch((s=>{throw t.addIssue(a(e,s)),t})),i=await c(...n);return await this._def.returns._def.type.parseAsync(i,r).catch((e=>{throw t.addIssue(s(i,e)),t}))})):y(((...e)=>{const t=this._def.args.safeParse(e,r);if(!t.success)throw new o([a(e,t.error)]);const n=c(...t.data),i=this._def.returns.safeParse(n,r);if(!i.success)throw new o([s(n,i.error)]);return i.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new re({...this._def,args:te.create(e).rest(B.create())})}returns(e){return new re({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new re({args:e||te.create([]).rest(B.create()),returns:t||B.create(),typeName:we.ZodFunction,...Z(a)})}}class ie extends T{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ie.create=(e,t)=>new ie({getter:e,typeName:we.ZodLazy,...Z(t)});class oe extends T{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:i.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}function de(e,t){return new ce({values:e,typeName:we.ZodEnum,...Z(t)})}oe.create=(e,t)=>new oe({value:e,typeName:we.ZodLiteral,...Z(t)});class ce extends T{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:a.joinValues(s),received:t.parsedType,code:i.invalid_type}),m}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return p(t,{received:t.data,code:i.invalid_enum_value,options:a}),m}return y(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return ce.create(e)}exclude(e){return ce.create(this.options.filter((t=>!e.includes(t))))}}ce.create=de;class ue extends T{_parse(e){const t=a.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==n.string&&s.parsedType!==n.number){const e=a.objectValues(t);return p(s,{expected:a.joinValues(e),received:s.parsedType,code:i.invalid_type}),m}if(-1===t.indexOf(e.data)){const e=a.objectValues(t);return p(s,{received:s.data,code:i.invalid_enum_value,options:e}),m}return y(e.data)}get enum(){return this._def.values}}ue.create=(e,t)=>new ue({values:e,typeName:we.ZodNativeEnum,...Z(t)});class le extends T{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.promise&&!1===t.common.async)return p(t,{code:i.invalid_type,expected:n.promise,received:t.parsedType}),m;const a=t.parsedType===n.promise?t.data:Promise.resolve(t.data);return y(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}le.create=(e,t)=>new le({type:e,typeName:we.ZodPromise,...Z(t)});class pe extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null;if("preprocess"===n.type){const e=n.transform(s.data);return s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}const r={addIssue:e=>{p(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===a.status?m:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((a=>"aborted"===a.status?m:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!g(e))return e;const a=n.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>g(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}a.assertNever(n)}}pe.create=(e,t,a)=>new pe({schema:e,typeName:we.ZodEffects,effect:t,...Z(a)}),pe.createWithPreprocess=(e,t,a)=>new pe({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...Z(a)});class he extends T{_parse(e){return this._getType(e)===n.undefined?y(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}he.create=(e,t)=>new he({innerType:e,typeName:we.ZodOptional,...Z(t)});class me extends T{_parse(e){return this._getType(e)===n.null?y(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}me.create=(e,t)=>new me({innerType:e,typeName:we.ZodNullable,...Z(t)});class fe extends T{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===n.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}fe.create=(e,t)=>new fe({innerType:e,typeName:we.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Z(t)});class ye extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return x(s)?s.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new o(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}ye.create=(e,t)=>new ye({innerType:e,typeName:we.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Z(t)});class _e extends T{_parse(e){if(this._getType(e)!==n.nan){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.nan,received:t.parsedType}),m}return{status:"valid",value:e.data}}}_e.create=e=>new _e({typeName:we.ZodNaN,...Z(e)});const ve=Symbol("zod_brand");class ge extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class xe extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),f(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new xe({in:e,out:t,typeName:we.ZodPipeline})}}const be=(e,t={},a)=>e?K.create().superRefine(((s,n)=>{var r,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(r=e.fatal)&&void 0!==r?r:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...d,fatal:o})}})):K.create(),ke={object:H.lazycreate};var we;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(we||(we={}));const Ze=A.create,Te=M.create,Oe=_e.create,Ne=$.create,Se=L.create,Ce=D.create,je=z.create,Ee=U.create,Ie=V.create,Pe=K.create,Ae=B.create,Re=W.create,Me=q.create,$e=F.create,Le=H.create,De=H.strictCreate,ze=Y.create,Ue=X.create,Ve=ee.create,Ke=te.create,Be=ae.create,We=se.create,qe=ne.create,Fe=re.create,Je=ie.create,He=oe.create,Ye=ce.create,Ge=ue.create,Xe=le.create,Qe=pe.create,et=he.create,tt=me.create,at=pe.createWithPreprocess,st=xe.create,nt={string:e=>A.create({...e,coerce:!0}),number:e=>M.create({...e,coerce:!0}),boolean:e=>L.create({...e,coerce:!0}),bigint:e=>$.create({...e,coerce:!0}),date:e=>D.create({...e,coerce:!0})},rt=m;var it,ot=Object.freeze({__proto__:null,defaultErrorMap:d,setErrorMap:function(e){c=e},getErrorMap:u,makeIssue:l,EMPTY_PATH:[],addIssueToContext:p,ParseStatus:h,INVALID:m,DIRTY:f,OK:y,isAborted:_,isDirty:v,isValid:g,isAsync:x,get util(){return a},get objectUtil(){return s},ZodParsedType:n,getParsedType:r,ZodType:T,ZodString:A,ZodNumber:M,ZodBigInt:$,ZodBoolean:L,ZodDate:D,ZodSymbol:z,ZodUndefined:U,ZodNull:V,ZodAny:K,ZodUnknown:B,ZodNever:W,ZodVoid:q,ZodArray:F,ZodObject:H,ZodUnion:Y,ZodDiscriminatedUnion:X,ZodIntersection:ee,ZodTuple:te,ZodRecord:ae,ZodMap:se,ZodSet:ne,ZodFunction:re,ZodLazy:ie,ZodLiteral:oe,ZodEnum:ce,ZodNativeEnum:ue,ZodPromise:le,ZodEffects:pe,ZodTransformer:pe,ZodOptional:he,ZodNullable:me,ZodDefault:fe,ZodCatch:ye,ZodNaN:_e,BRAND:ve,ZodBranded:ge,ZodPipeline:xe,custom:be,Schema:T,ZodSchema:T,late:ke,get ZodFirstPartyTypeKind(){return we},coerce:nt,any:Pe,array:$e,bigint:Ne,boolean:Se,date:Ce,discriminatedUnion:Ue,effect:Qe,enum:Ye,function:Fe,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>be((t=>t instanceof e),t),intersection:Ve,lazy:Je,literal:He,map:We,nan:Oe,nativeEnum:Ge,never:Re,null:Ie,nullable:tt,number:Te,object:Le,oboolean:()=>Se().optional(),onumber:()=>Te().optional(),optional:et,ostring:()=>Ze().optional(),pipeline:st,preprocess:at,promise:Xe,record:Be,set:qe,strictObject:De,string:Ze,symbol:je,transformer:Qe,tuple:Ke,undefined:Ee,union:ze,unknown:Ae,void:Me,NEVER:rt,ZodIssueCode:i,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o}),dt={all:"*",injected:"metamask",walletconnect:"walletconnect",keplr:"keplr",templewallet:"templewallet",phantom:"phantom",okxwallet:"okxwallet",lens:"lens",ud:"ud",cyberconnect:"cyberconnect"},ct=ot.object({logoUrl:ot.string().optional(),background:ot.string().optional(),gradientAndMesh:ot.boolean().optional(),redirectUrlOnLeave:ot.string().optional(),wallets:ot.array(ot.enum(["*"].concat((it=Object.values(dt),function(e){if(Array.isArray(e))return t(e)}(it)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(it)||function(e,a){if(e){if("string"==typeof e)return t(e,a);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,a):void 0}}(it)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())))).optional(),lobbyLoginMessage:ot.string().optional(),lobbyTitle:ot.string().optional(),lobbyDescription:ot.string().optional()});e.AllowedWallets=dt,e.ClientConfigSchema=ct,e.reactions=["😂","😢","😦","😍","🤔","👀","🙌","👍","👎","🔥","🍻","🚀","🎉","❤️","💯"],Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).HuddleIframeTypes={})}(this,(function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}var a,s;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),s={};for(const e of a)s[e]=t[e];return e.objectValues(s)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(a||(a={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(s||(s={}));const n=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),r=e=>{switch(typeof e){case"undefined":return n.undefined;case"string":return n.string;case"number":return isNaN(e)?n.nan:n.number;case"boolean":return n.boolean;case"function":return n.function;case"bigint":return n.bigint;case"symbol":return n.symbol;case"object":return Array.isArray(e)?n.array:null===e?n.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?n.promise:"undefined"!=typeof Map&&e instanceof Map?n.map:"undefined"!=typeof Set&&e instanceof Set?n.set:"undefined"!=typeof Date&&e instanceof Date?n.date:n.object;default:return n.unknown}},i=a.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"]);class o extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(s);else if("invalid_return_type"===n.code)s(n.returnTypeError);else if("invalid_arguments"===n.code)s(n.argumentsError);else if(0===n.path.length)a._errors.push(t(n));else{let e=a,s=0;for(;s<n.path.length;){const a=n.path[s];s===n.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(n))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,a.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}o.create=e=>new o(e);const d=(e,t)=>{let s;switch(e.code){case i.invalid_type:s=e.received===n.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case i.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case i.unrecognized_keys:s=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case i.invalid_union:s="Invalid input";break;case i.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case i.invalid_enum_value:s=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case i.invalid_arguments:s="Invalid function arguments";break;case i.invalid_return_type:s="Invalid function return type";break;case i.invalid_date:s="Invalid date";break;case i.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:a.assertNever(e.validation):s="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case i.too_small:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case i.too_big:s="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case i.custom:s="Invalid input";break;case i.invalid_intersection_types:s="Intersection results could not be merged";break;case i.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case i.not_finite:s="Number must be finite";break;default:s=t.defaultError,a.assertNever(e)}return{message:s}};let c=d;function u(){return c}const l=e=>{const{data:t,path:a,errorMaps:s,issueData:n}=e,r=[...a,...n.path||[]],i={...n,path:r};let o="";const d=s.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...n,path:r,message:n.message||o}};function p(e,t){const a=l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,u(),d].filter((e=>!!e))});e.common.issues.push(a)}class h{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if("aborted"===s.status)return m;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return h.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:t,value:n}=s;if("aborted"===t.status)return m;if("aborted"===n.status)return m;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),(void 0!==n.value||s.alwaysSet)&&(a[t.value]=n.value)}return{status:e.value,value:a}}}const m=Object.freeze({status:"aborted"}),f=e=>({status:"dirty",value:e}),y=e=>({status:"valid",value:e}),_=e=>"aborted"===e.status,v=e=>"dirty"===e.status,g=e=>"valid"===e.status,x=e=>"undefined"!=typeof Promise&&e instanceof Promise;var b;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(b||(b={}));class k{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const w=(e,t)=>{if(g(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new o(e.common.issues);return this._error=t,this._error}}};function Z(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:s,description:n}=e;if(t&&(a||s))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:n};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=s?s:t.defaultError}:{message:null!=a?a:t.defaultError},description:n}}class T{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 r(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new h,ctx:{common:e.parent.common,data:e.data,parsedType:r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(x(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r(e)},n=this._parseSync({data:e,path:s.path,parent:s});return w(s,n)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:r(e)},s=this._parse({data:e,path:a.path,parent:a}),n=await(x(s)?s:Promise.resolve(s));return w(a,n)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,s)=>{const n=e(t),r=()=>s.addIssue({code:i.custom,...a(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then((e=>!!e||(r(),!1))):!!n||(r(),!1)}))}refinement(e,t){return this._refinement(((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1)))}_refinement(e){return new pe({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return he.create(this,this._def)}nullable(){return me.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return F.create(this,this._def)}promise(){return le.create(this,this._def)}or(e){return Y.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new pe({...Z(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new fe({...Z(this._def),innerType:this,defaultValue:t,typeName:we.ZodDefault})}brand(){return new ge({typeName:we.ZodBranded,type:this,...Z(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ye({...Z(this._def),innerType:this,catchValue:t,typeName:we.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return xe.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const O=/^c[^\s-]{8,}$/i,N=/^[a-z][a-z0-9]*$/,S=/[0-9A-HJKMNP-TV-Z]{26}/,C=/^([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,j=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,E=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,I=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,P=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;class A extends T{constructor(){super(...arguments),this._regex=(e,t,a)=>this.refinement((t=>e.test(t)),{validation:t,code:i.invalid_string,...b.errToObj(a)}),this.nonempty=e=>this.min(1,b.errToObj(e)),this.trim=()=>new A({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new A({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==n.string){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.string,received:t.parsedType}),m}const t=new h;let s;for(const n of this._def.checks)if("min"===n.kind)e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("max"===n.kind)e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("length"===n.kind){const a=e.data.length>n.value,r=e.data.length<n.value;(a||r)&&(s=this._getOrReturnCtx(e,s),a?p(s,{code:i.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):r&&p(s,{code:i.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if("email"===n.kind)j.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"email",code:i.invalid_string,message:n.message}),t.dirty());else if("emoji"===n.kind)E.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"emoji",code:i.invalid_string,message:n.message}),t.dirty());else if("uuid"===n.kind)C.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"uuid",code:i.invalid_string,message:n.message}),t.dirty());else if("cuid"===n.kind)O.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid",code:i.invalid_string,message:n.message}),t.dirty());else if("cuid2"===n.kind)N.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"cuid2",code:i.invalid_string,message:n.message}),t.dirty());else if("ulid"===n.kind)S.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"ulid",code:i.invalid_string,message:n.message}),t.dirty());else if("url"===n.kind)try{new URL(e.data)}catch(a){s=this._getOrReturnCtx(e,s),p(s,{validation:"url",code:i.invalid_string,message:n.message}),t.dirty()}else if("regex"===n.kind){n.regex.lastIndex=0;n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{validation:"regex",code:i.invalid_string,message:n.message}),t.dirty())}else if("trim"===n.kind)e.data=e.data.trim();else if("includes"===n.kind)e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty());else if("toLowerCase"===n.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===n.kind)e.data=e.data.toUpperCase();else if("startsWith"===n.kind)e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty());else if("endsWith"===n.kind)e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty());else if("datetime"===n.kind){((d=n).precision?d.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${d.precision}}Z$`):0===d.precision?d.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$"):d.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$")).test(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:i.invalid_string,validation:"datetime",message:n.message}),t.dirty())}else"ip"===n.kind?(r=e.data,("v4"!==(o=n.version)&&o||!I.test(r))&&("v6"!==o&&o||!P.test(r))&&(s=this._getOrReturnCtx(e,s),p(s,{validation:"ip",code:i.invalid_string,message:n.message}),t.dirty())):a.assertNever(n);var r,o,d;return{status:t.value,value:e.data}}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...b.errToObj(e)})}url(e){return this._addCheck({kind:"url",...b.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...b.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...b.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...b.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...b.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...b.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...b.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...b.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...b.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...b.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...b.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...b.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...b.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...b.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...b.errToObj(t)})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function R(e,t){const a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,n=a>s?a:s;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}A.create=e=>{var t;return new A({checks:[],typeName:we.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Z(e)})};class M extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==n.number){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.number,received:t.parsedType}),m}let t;const s=new h;for(const n of this._def.checks)if("int"===n.kind)a.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:i.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty())}else"multipleOf"===n.kind?0!==R(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_finite,message:n.message}),s.dirty()):a.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,s){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(s)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:b.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:b.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:b.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:b.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=e=>new M({checks:[],typeName:we.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Z(e)});class $ extends T{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==n.bigint){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.bigint,received:t.parsedType}),m}let t;const s=new h;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:i.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):a.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,b.toString(t))}gt(e,t){return this.setLimit("min",e,!1,b.toString(t))}lte(e,t){return this.setLimit("max",e,!0,b.toString(t))}lt(e,t){return this.setLimit("max",e,!1,b.toString(t))}setLimit(e,t,a,s){return new $({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:b.toString(s)}]})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:b.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:b.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:b.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:b.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:b.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}$.create=e=>{var t;return new $({checks:[],typeName:we.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Z(e)})};class L extends T{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==n.boolean){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.boolean,received:t.parsedType}),m}return y(e.data)}}L.create=e=>new L({typeName:we.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Z(e)});class D extends T{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==n.date){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.date,received:t.parsedType}),m}if(isNaN(e.data.getTime())){return p(this._getOrReturnCtx(e),{code:i.invalid_date}),m}const t=new h;let s;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),p(s,{code:i.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):a.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new D({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:b.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:b.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}D.create=e=>new D({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:we.ZodDate,...Z(e)});class z extends T{_parse(e){if(this._getType(e)!==n.symbol){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.symbol,received:t.parsedType}),m}return y(e.data)}}z.create=e=>new z({typeName:we.ZodSymbol,...Z(e)});class U extends T{_parse(e){if(this._getType(e)!==n.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.undefined,received:t.parsedType}),m}return y(e.data)}}U.create=e=>new U({typeName:we.ZodUndefined,...Z(e)});class V extends T{_parse(e){if(this._getType(e)!==n.null){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.null,received:t.parsedType}),m}return y(e.data)}}V.create=e=>new V({typeName:we.ZodNull,...Z(e)});class K extends T{constructor(){super(...arguments),this._any=!0}_parse(e){return y(e.data)}}K.create=e=>new K({typeName:we.ZodAny,...Z(e)});class B extends T{constructor(){super(...arguments),this._unknown=!0}_parse(e){return y(e.data)}}B.create=e=>new B({typeName:we.ZodUnknown,...Z(e)});class W extends T{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.never,received:t.parsedType}),m}}W.create=e=>new W({typeName:we.ZodNever,...Z(e)});class q extends T{_parse(e){if(this._getType(e)!==n.undefined){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.void,received:t.parsedType}),m}return y(e.data)}}q.create=e=>new q({typeName:we.ZodVoid,...Z(e)});class F extends T{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==n.array)return p(t,{code:i.invalid_type,expected:n.array,received:t.parsedType}),m;if(null!==s.exactLength){const e=t.data.length>s.exactLength.value,n=t.data.length<s.exactLength.value;(e||n)&&(p(t,{code:e?i.too_big:i.too_small,minimum:n?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(p(t,{code:i.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(p(t,{code:i.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>s.type._parseAsync(new k(t,e,t.path,a))))).then((e=>h.mergeArray(a,e)));const r=[...t.data].map(((e,a)=>s.type._parseSync(new k(t,e,t.path,a))));return h.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new F({...this._def,minLength:{value:e,message:b.toString(t)}})}max(e,t){return new F({...this._def,maxLength:{value:e,message:b.toString(t)}})}length(e,t){return new F({...this._def,exactLength:{value:e,message:b.toString(t)}})}nonempty(e){return this.min(1,e)}}function J(e){if(e instanceof H){const t={};for(const a in e.shape){const s=e.shape[a];t[a]=he.create(J(s))}return new H({...e._def,shape:()=>t})}return e instanceof F?new F({...e._def,type:J(e.element)}):e instanceof he?he.create(J(e.unwrap())):e instanceof me?me.create(J(e.unwrap())):e instanceof te?te.create(e.items.map((e=>J(e)))):e}F.create=(e,t)=>new F({type:e,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Z(t)});class H extends T{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==n.object){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.object,received:t.parsedType}),m}const{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:r}=this._getCached(),o=[];if(!(this._def.catchall instanceof W&&"strip"===this._def.unknownKeys))for(const e in a.data)r.includes(e)||o.push(e);const d=[];for(const e of r){const t=s[e],n=a.data[e];d.push({key:{status:"valid",value:e},value:t._parse(new k(a,n,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof W){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)d.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)o.length>0&&(p(a,{code:i.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const s=a.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new k(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>h.mergeObjectSync(t,e))):h.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return b.errToObj,new H({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var s,n,r,i;const o=null!==(r=null===(n=(s=this._def).errorMap)||void 0===n?void 0:n.call(s,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=b.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new H({...this._def,unknownKeys:"strip"})}passthrough(){return new H({...this._def,unknownKeys:"passthrough"})}extend(e){return new H({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new H({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new H({...this._def,catchall:e})}pick(e){const t={};return a.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new H({...this._def,shape:()=>t})}omit(e){const t={};return a.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new H({...this._def,shape:()=>t})}deepPartial(){return J(this)}partial(e){const t={};return a.objectKeys(this.shape).forEach((a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()})),new H({...this._def,shape:()=>t})}required(e){const t={};return a.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof he;)e=e._def.innerType;t[a]=e}})),new H({...this._def,shape:()=>t})}keyof(){return de(a.objectKeys(this.shape))}}H.create=(e,t)=>new H({shape:()=>e,unknownKeys:"strip",catchall:W.create(),typeName:we.ZodObject,...Z(t)}),H.strictCreate=(e,t)=>new H({shape:()=>e,unknownKeys:"strict",catchall:W.create(),typeName:we.ZodObject,...Z(t)}),H.lazycreate=(e,t)=>new H({shape:e,unknownKeys:"strip",catchall:W.create(),typeName:we.ZodObject,...Z(t)});class Y extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new o(e.ctx.common.issues)));return p(t,{code:i.invalid_union,unionErrors:a}),m}));{let e;const s=[];for(const n of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=n._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const n=s.map((e=>new o(e)));return p(t,{code:i.invalid_union,unionErrors:n}),m}}get options(){return this._def.options}}Y.create=(e,t)=>new Y({options:e,typeName:we.ZodUnion,...Z(t)});const G=e=>e instanceof ie?G(e.schema):e instanceof pe?G(e.innerType()):e instanceof oe?[e.value]:e instanceof ce?e.options:e instanceof ue?Object.keys(e.enum):e instanceof fe?G(e._def.innerType):e instanceof U?[void 0]:e instanceof V?[null]:null;class X extends T{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.object)return p(t,{code:i.invalid_type,expected:n.object,received:t.parsedType}),m;const a=this.discriminator,s=t.data[a],r=this.optionsMap.get(s);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:i.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const a of t){const t=G(a.shape[e]);if(!t)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(s.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);s.set(n,a)}}return new X({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...Z(a)})}}function Q(e,t){const s=r(e),i=r(t);if(e===t)return{valid:!0,data:e};if(s===n.object&&i===n.object){const s=a.objectKeys(t),n=a.objectKeys(e).filter((e=>-1!==s.indexOf(e))),r={...e,...t};for(const a of n){const s=Q(e[a],t[a]);if(!s.valid)return{valid:!1};r[a]=s.data}return{valid:!0,data:r}}if(s===n.array&&i===n.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const n=Q(e[s],t[s]);if(!n.valid)return{valid:!1};a.push(n.data)}return{valid:!0,data:a}}return s===n.date&&i===n.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ee extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(_(e)||_(s))return m;const n=Q(e.value,s.value);return n.valid?((v(e)||v(s))&&t.dirty(),{status:t.value,value:n.data}):(p(a,{code:i.invalid_intersection_types}),m)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then((([e,t])=>s(e,t))):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ee.create=(e,t,a)=>new ee({left:e,right:t,typeName:we.ZodIntersection,...Z(a)});class te extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.array)return p(a,{code:i.invalid_type,expected:n.array,received:a.parsedType}),m;if(a.data.length<this._def.items.length)return p(a,{code:i.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&a.data.length>this._def.items.length&&(p(a,{code:i.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const s=[...a.data].map(((e,t)=>{const s=this._def.items[t]||this._def.rest;return s?s._parse(new k(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(s).then((e=>h.mergeArray(t,e))):h.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new te({...this._def,rest:e})}}te.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new te({items:e,typeName:we.ZodTuple,rest:null,...Z(t)})};class ae extends T{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.object)return p(a,{code:i.invalid_type,expected:n.object,received:a.parsedType}),m;const s=[],r=this._def.keyType,o=this._def.valueType;for(const e in a.data)s.push({key:r._parse(new k(a,e,a.path,e)),value:o._parse(new k(a,a.data[e],a.path,e))});return a.common.async?h.mergeObjectAsync(t,s):h.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new ae(t instanceof T?{keyType:e,valueType:t,typeName:we.ZodRecord,...Z(a)}:{keyType:A.create(),valueType:e,typeName:we.ZodRecord,...Z(t)})}}class se extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.map)return p(a,{code:i.invalid_type,expected:n.map,received:a.parsedType}),m;const s=this._def.keyType,r=this._def.valueType,o=[...a.data.entries()].map((([e,t],n)=>({key:s._parse(new k(a,e,a.path,[n,"key"])),value:r._parse(new k(a,t,a.path,[n,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of o){const s=await a.key,n=await a.value;if("aborted"===s.status||"aborted"===n.status)return m;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of o){const s=a.key,n=a.value;if("aborted"===s.status||"aborted"===n.status)return m;"dirty"!==s.status&&"dirty"!==n.status||t.dirty(),e.set(s.value,n.value)}return{status:t.value,value:e}}}}se.create=(e,t,a)=>new se({valueType:t,keyType:e,typeName:we.ZodMap,...Z(a)});class ne extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==n.set)return p(a,{code:i.invalid_type,expected:n.set,received:a.parsedType}),m;const s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(p(a,{code:i.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(p(a,{code:i.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const r=this._def.valueType;function o(e){const a=new Set;for(const s of e){if("aborted"===s.status)return m;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}const d=[...a.data.values()].map(((e,t)=>r._parse(new k(a,e,a.path,t))));return a.common.async?Promise.all(d).then((e=>o(e))):o(d)}min(e,t){return new ne({...this._def,minSize:{value:e,message:b.toString(t)}})}max(e,t){return new ne({...this._def,maxSize:{value:e,message:b.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ne.create=(e,t)=>new ne({valueType:e,minSize:null,maxSize:null,typeName:we.ZodSet,...Z(t)});class re extends T{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.function)return p(t,{code:i.invalid_type,expected:n.function,received:t.parsedType}),m;function a(e,a){return l({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u(),d].filter((e=>!!e)),issueData:{code:i.invalid_arguments,argumentsError:a}})}function s(e,a){return l({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u(),d].filter((e=>!!e)),issueData:{code:i.invalid_return_type,returnTypeError:a}})}const r={errorMap:t.common.contextualErrorMap},c=t.data;return this._def.returns instanceof le?y((async(...e)=>{const t=new o([]),n=await this._def.args.parseAsync(e,r).catch((s=>{throw t.addIssue(a(e,s)),t})),i=await c(...n);return await this._def.returns._def.type.parseAsync(i,r).catch((e=>{throw t.addIssue(s(i,e)),t}))})):y(((...e)=>{const t=this._def.args.safeParse(e,r);if(!t.success)throw new o([a(e,t.error)]);const n=c(...t.data),i=this._def.returns.safeParse(n,r);if(!i.success)throw new o([s(n,i.error)]);return i.data}))}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new re({...this._def,args:te.create(e).rest(B.create())})}returns(e){return new re({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new re({args:e||te.create([]).rest(B.create()),returns:t||B.create(),typeName:we.ZodFunction,...Z(a)})}}class ie extends T{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ie.create=(e,t)=>new ie({getter:e,typeName:we.ZodLazy,...Z(t)});class oe extends T{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:i.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}function de(e,t){return new ce({values:e,typeName:we.ZodEnum,...Z(t)})}oe.create=(e,t)=>new oe({value:e,typeName:we.ZodLiteral,...Z(t)});class ce extends T{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:a.joinValues(s),received:t.parsedType,code:i.invalid_type}),m}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return p(t,{received:t.data,code:i.invalid_enum_value,options:a}),m}return y(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return ce.create(e)}exclude(e){return ce.create(this.options.filter((t=>!e.includes(t))))}}ce.create=de;class ue extends T{_parse(e){const t=a.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==n.string&&s.parsedType!==n.number){const e=a.objectValues(t);return p(s,{expected:a.joinValues(e),received:s.parsedType,code:i.invalid_type}),m}if(-1===t.indexOf(e.data)){const e=a.objectValues(t);return p(s,{received:s.data,code:i.invalid_enum_value,options:e}),m}return y(e.data)}get enum(){return this._def.values}}ue.create=(e,t)=>new ue({values:e,typeName:we.ZodNativeEnum,...Z(t)});class le extends T{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==n.promise&&!1===t.common.async)return p(t,{code:i.invalid_type,expected:n.promise,received:t.parsedType}),m;const a=t.parsedType===n.promise?t.data:Promise.resolve(t.data);return y(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}le.create=(e,t)=>new le({type:e,typeName:we.ZodPromise,...Z(t)});class pe extends T{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null;if("preprocess"===n.type){const e=n.transform(s.data);return s.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:s.path,parent:s}))):this._def.schema._parseSync({data:e,path:s.path,parent:s})}const r={addIssue:e=>{p(s,e),e.fatal?t.abort():t.dirty()},get path(){return s.path}};if(r.addIssue=r.addIssue.bind(r),"refinement"===n.type){const e=e=>{const t=n.refinement(e,r);if(s.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.common.async){const a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return"aborted"===a.status?m:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((a=>"aborted"===a.status?m:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===s.common.async){const e=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!g(e))return e;const a=n.transform(e.value,r);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then((e=>g(e)?Promise.resolve(n.transform(e.value,r)).then((e=>({status:t.value,value:e}))):e))}a.assertNever(n)}}pe.create=(e,t,a)=>new pe({schema:e,typeName:we.ZodEffects,effect:t,...Z(a)}),pe.createWithPreprocess=(e,t,a)=>new pe({schema:t,effect:{type:"preprocess",transform:e},typeName:we.ZodEffects,...Z(a)});class he extends T{_parse(e){return this._getType(e)===n.undefined?y(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}he.create=(e,t)=>new he({innerType:e,typeName:we.ZodOptional,...Z(t)});class me extends T{_parse(e){return this._getType(e)===n.null?y(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}me.create=(e,t)=>new me({innerType:e,typeName:we.ZodNullable,...Z(t)});class fe extends T{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===n.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}fe.create=(e,t)=>new fe({innerType:e,typeName:we.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Z(t)});class ye extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return x(s)?s.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new o(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}ye.create=(e,t)=>new ye({innerType:e,typeName:we.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Z(t)});class _e extends T{_parse(e){if(this._getType(e)!==n.nan){const t=this._getOrReturnCtx(e);return p(t,{code:i.invalid_type,expected:n.nan,received:t.parsedType}),m}return{status:"valid",value:e.data}}}_e.create=e=>new _e({typeName:we.ZodNaN,...Z(e)});const ve=Symbol("zod_brand");class ge extends T{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class xe extends T{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),f(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?m:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new xe({in:e,out:t,typeName:we.ZodPipeline})}}const be=(e,t={},a)=>e?K.create().superRefine(((s,n)=>{var r,i;if(!e(s)){const e="function"==typeof t?t(s):"string"==typeof t?{message:t}:t,o=null===(i=null!==(r=e.fatal)&&void 0!==r?r:a)||void 0===i||i,d="string"==typeof e?{message:e}:e;n.addIssue({code:"custom",...d,fatal:o})}})):K.create(),ke={object:H.lazycreate};var we;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"}(we||(we={}));const Ze=A.create,Te=M.create,Oe=_e.create,Ne=$.create,Se=L.create,Ce=D.create,je=z.create,Ee=U.create,Ie=V.create,Pe=K.create,Ae=B.create,Re=W.create,Me=q.create,$e=F.create,Le=H.create,De=H.strictCreate,ze=Y.create,Ue=X.create,Ve=ee.create,Ke=te.create,Be=ae.create,We=se.create,qe=ne.create,Fe=re.create,Je=ie.create,He=oe.create,Ye=ce.create,Ge=ue.create,Xe=le.create,Qe=pe.create,et=he.create,tt=me.create,at=pe.createWithPreprocess,st=xe.create,nt={string:e=>A.create({...e,coerce:!0}),number:e=>M.create({...e,coerce:!0}),boolean:e=>L.create({...e,coerce:!0}),bigint:e=>$.create({...e,coerce:!0}),date:e=>D.create({...e,coerce:!0})},rt=m;var it,ot=Object.freeze({__proto__:null,defaultErrorMap:d,setErrorMap:function(e){c=e},getErrorMap:u,makeIssue:l,EMPTY_PATH:[],addIssueToContext:p,ParseStatus:h,INVALID:m,DIRTY:f,OK:y,isAborted:_,isDirty:v,isValid:g,isAsync:x,get util(){return a},get objectUtil(){return s},ZodParsedType:n,getParsedType:r,ZodType:T,ZodString:A,ZodNumber:M,ZodBigInt:$,ZodBoolean:L,ZodDate:D,ZodSymbol:z,ZodUndefined:U,ZodNull:V,ZodAny:K,ZodUnknown:B,ZodNever:W,ZodVoid:q,ZodArray:F,ZodObject:H,ZodUnion:Y,ZodDiscriminatedUnion:X,ZodIntersection:ee,ZodTuple:te,ZodRecord:ae,ZodMap:se,ZodSet:ne,ZodFunction:re,ZodLazy:ie,ZodLiteral:oe,ZodEnum:ce,ZodNativeEnum:ue,ZodPromise:le,ZodEffects:pe,ZodTransformer:pe,ZodOptional:he,ZodNullable:me,ZodDefault:fe,ZodCatch:ye,ZodNaN:_e,BRAND:ve,ZodBranded:ge,ZodPipeline:xe,custom:be,Schema:T,ZodSchema:T,late:ke,get ZodFirstPartyTypeKind(){return we},coerce:nt,any:Pe,array:$e,bigint:Ne,boolean:Se,date:Ce,discriminatedUnion:Ue,effect:Qe,enum:Ye,function:Fe,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>be((t=>t instanceof e),t),intersection:Ve,lazy:Je,literal:He,map:We,nan:Oe,nativeEnum:Ge,never:Re,null:Ie,nullable:tt,number:Te,object:Le,oboolean:()=>Se().optional(),onumber:()=>Te().optional(),optional:et,ostring:()=>Ze().optional(),pipeline:st,preprocess:at,promise:Xe,record:Be,set:qe,strictObject:De,string:Ze,symbol:je,transformer:Qe,tuple:Ke,undefined:Ee,union:ze,unknown:Ae,void:Me,NEVER:rt,ZodIssueCode:i,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:o}),dt={all:"*",injected:"metamask",walletconnect:"walletconnect",keplr:"keplr",templewallet:"templewallet",phantom:"phantom",beacon:"beacon",okxwallet:"okxwallet",lens:"lens",ud:"ud",cyberconnect:"cyberconnect"},ct=ot.object({logoUrl:ot.string().optional(),background:ot.string().optional(),redirectUrlOnLeave:ot.string().optional(),wallets:ot.array(ot.enum(["*"].concat((it=Object.values(dt),function(e){if(Array.isArray(e))return t(e)}(it)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(it)||function(e,a){if(e){if("string"==typeof e)return t(e,a);var s=Object.prototype.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?t(e,a):void 0}}(it)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())))).optional(),lobbyLoginMessage:ot.string().optional(),lobbyTitle:ot.string().optional(),lobbyDescription:ot.string().optional()});e.AllowedWallets=dt,e.ClientConfigSchema=ct,e.reactions=["😂","😢","😦","😍","🤔","👀","🙌","👍","👎","🔥","🍻","🚀","🎉","❤️","💯"],Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=huddle01-iframe-types.umd.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
637397
8
21
2350